-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
.\" Copyright 2009 Intel Corporation
.\" Author: Andi Kleen
.\" Based on the move_pages manpage which was
.\" This manpage is Copyright (C) 2006 Silicon Graphics, Inc.
.\" Christoph Lameter
.\"
+.\" %%%LICENSE_START(VERBATIM_TWO_PARA)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
-.TH MIGRATE_PAGES 2 2010-11-01 "Linux" "Linux Programmer's Manual"
+.\" %%%LICENSE_END
+.\"
+.TH MIGRATE_PAGES 2 2012-08-01 "Linux" "Linux Programmer's Manual"
.SH NAME
migrate_pages \- move all pages in a process to another set of nodes
.SH SYNOPSIS
.sp
.BI "long migrate_pages(int " pid ", unsigned long " maxnode,
.BI " const unsigned long *" old_nodes,
-.BI " const unsigned long *" new_nodes);
+.BI " const unsigned long *" new_nodes );
.fi
.sp
Link with \fI\-lnuma\fP.
.SH DESCRIPTION
.BR migrate_pages ()
-moves all pages of the process
+attempts to move all pages of the process
.I pid
that are in memory nodes
.I old_nodes
.BR migrate_pages ()
moves pages of the calling process.
-Pages shared with another process will only be moved if the initiating
+Pages shared with another process will be moved only if the initiating
process has the
.B CAP_SYS_NICE
privilege.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
On success
.BR migrate_pages ()
-returns zero.
+returns the number of pages that could not be moved
+(i.e., a return of zero means that all pages were successfully moved).
On error, it returns \-1, and sets
.I errno
to indicate the error.
system call first appeared on Linux in version 2.6.16.
.SH CONFORMING TO
This system call is Linux-specific.
-.SH "NOTES"
+.SH NOTES
For information on library support, see
.BR numa (7).
header is not included with glibc, but requires installing
.I libnuma-devel
or a similar package.
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR get_mempolicy (2),
.BR mbind (2),
.BR set_mempolicy (2),
.BR cpuset (7),
.BR numa (7),
.BR migratepages (8),
-.BR numa_stat (8);
-.br
-the kernel source file
-.IR Documentation/vm/page_migration .
+.BR numastat (8)
+
+.IR Documentation/vm/page_migration
+in the Linux kernel source tree
+.SH COLOPHON
+This page is part of release 3.68 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.