Manual Pages for Linux CentOS command on man migrate_pages
MyWebUniversity

Manual Pages for Linux CentOS command on man migrate_pages

MIGRATEPAGES(2) Linux Programmer's Manual MIGRATEPAGES(2)

NAME

migratepages - move all pages in a process to another set of nodes SYNOPSIS

#include long migratepages(int pid, unsigned long maxnode, const unsigned long *oldnodes, const unsigned long *newnodes);

Link with -lnuma. DESCRIPTION migratepages() attempts to move all pages of the process pid that are in memory nodes oldnodes to the memory nodes in newnodes. Pages not located in any node in oldnodes will not be migrated. As far as pos‐ sible, the kernel maintains the relative topology relationship inside oldnodes during the migration to newnodes. The oldnodes and newnodes arguments are pointers to bit masks of node numbers, with up to maxnode bits in each mask. These masks are main‐ tained as arrays of unsigned long integers (in the last long integer, the bits beyond those specified by maxnode are ignored). The maxnode argument is the maximum node number in the bit mask plus one (this is the same as in mbind(2), but different from select(2)). The pid argument is the ID of the process whose pages are to be moved. To move pages in another process, the caller must be privileged (CAPSYSNICE) or the real or effective user ID of the calling process

must match the real or saved-set user ID of the target process. If pid is 0, then migratepages() moves pages of the calling process. Pages shared with another process will be moved only if the initiating process has the CAPSYSNICE privilege. RETURN VALUE On success migratepages() 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 errno to indicate the error. ERRORS EPERM Insufficient privilege (CAPSYSNICE) to move pages of the process specified by pid, or insufficient privilege (CAPSYSNICE) to access the specified target nodes. ESRCH No process matching pid could be found. VERSIONS The migratepages() system call first appeared on Linux in version 2.6.16. CONFORMING TO

This system call is Linux-specific. NOTES For information on library support, see numa(7). Use getmempolicy(2) with the MPOLFMEMSALLOWED flag to obtain the set of nodes that are allowed by the calling process's cpuset. Note that this information is subject to change at any time by manual or automatic reconfiguration of the cpuset. Use of migratepages() may result in pages whose location (node) vio‐ lates the memory policy established for the specified addresses (see mbind(2)) and/or the specified process (see setmempolicy(2)). That is, memory policy does not constrain the destination nodes used by migratepages(). The header is not included with glibc, but requires

installing libnuma-devel or a similar package. SEE ALSO getmempolicy(2), mbind(2), setmempolicy(2), numa(3), numamaps(5), cpuset(7), numa(7), migratepages(8), numastat(8) Documentation/vm/pagemigration in the Linux kernel source tree COLOPHON

This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can

be found at http://www.kernel.org/doc/man-pages/.

Linux 2012-08-01 MIGRATEPAGES(2)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™