1MOVE_PAGES(2)                 Linux System Calls                 MOVE_PAGES(2)
2
3
4

NAME

6       move_pages - move a set of pages of a process to a different NUMA node
7

SYNOPSIS

9       #include <syscall.h>
10       long move_pages(pid_t pid, unsigned long nr_pages,
11                       const void **address,
12                       const int *nodes, int *status,
13                       int flags);
14
15

DESCRIPTION

17       move_pages  moves  a  set  of  pages in the address space of a executed
18       process to a different NUMA node.  The function can  also  be  used  to
19       determine the nodes to which the pages are currently mapped.
20
21       pid  is  the  process whose pages will be moved.  The value 0 specifies
22       the current process.
23
24       The argument nr_pages specifies the number of pages which would require
25       moving.
26
27       addresses is an array of addresses of pages which would require moving
28
29       nodes  is  an array of numbers of nodes to move the corresponding pages
30       to.  If set to NULL, status is filled with current NUMA node  IDs,  but
31       no migrations occur.
32
33       The flags argument describes the type of pages which will be moved:
34
35       MPOL_MF_MOVE
36              Syscall  will  move  only  pages  which  are  mapped only by the
37              process pid.
38
39       MPOL_MF_MOVE_ALL
40              Syscall will move pages which are mapped by  multiple  processes
41              too (this mode needs to have sufficient permissions).
42
43
44       The  status  field  is  only valid if move_pages finished successfully.
45       This field contains the status of the specified pages.   If  the  nodes
46       argument  is NULL or the migration succeeded, it is set to the node ID.
47       Otherwise it contains a negative number, one  of  the  following  error
48       codes:
49
50       -EFAULT the specified address does not point to a valid mapping
51
52       -ENOENT the page does not exist
53
54       -EPERM the page can't be moved (it is mlocked)
55
56       -EACCES  the  page  is  shared  by  multiple  processes  and  the  flag
57       MPOL_MF_MOVE_ALL was not set
58
59       -EBUSY the page could not be moved - it is busy now
60
61       -EFAULT the page address is not valid
62
63       -ENOMEM insufficient memory
64
65       -EIO the page can't be written
66
67       -EINVAL the page can't be moved because the file system does not imple‐
68       ment the necessary interface
69
70

RETURN VALUE

72       If  nodes is not NULL, move_pages returns the number of valid migration
73       requests which could not currently be performed.  Otherwise it  returns
74       0.
75
76       An error indication is returned on error.
77
78

ERRORS

80       EACCES  one of the nodes specified by the nodes argument is not allowed
81       for the specified process.
82
83       EINVAL the man pages to be moved are  in  kernel  thread  or  the  flag
84       parameter is invalid.
85
86       ENODEV  one  of the nodes specified by the nodes argument is not avail‐
87       able.
88
89       ENOENT there is no page which would be moved.
90
91       EPERM the flag is set to MPOL_MF_MOVE_ALL or pid  doesn't  specify  the
92       current process, and the process has insufficient privileges.
93
94       ENOMEM insufficient memory
95
96       E2BIG the number of pages to move is too big
97
98       ESRCH the process pid can't be found
99
100
101
102

AVAILABILITY

104       This  syscall  is  implemented only on the i386 and IA-64 architectures
105       since kernel 2.6.
106
107
108
109Linux                            8 August 2006                   MOVE_PAGES(2)
Impressum