1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2012-05-01 04:38+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=CHARSET\n"
17 "Content-Transfer-Encoding: 8bit\n"
20 #: build/C/man2/get_mempolicy.2:25
26 #: build/C/man2/get_mempolicy.2:25 build/C/man2/mbind.2:25 build/C/man7/numa.7:27 build/C/man2/set_mempolicy.2:25
32 #: build/C/man2/get_mempolicy.2:25 build/C/man2/getcpu.2:7 build/C/man2/mbind.2:25 build/C/man2/migrate_pages.2:17 build/C/man2/move_pages.2:18 build/C/man7/numa.7:27 build/C/man2/set_mempolicy.2:25
38 #: build/C/man2/get_mempolicy.2:25 build/C/man2/getcpu.2:7 build/C/man2/mbind.2:25 build/C/man2/migrate_pages.2:17 build/C/man2/move_pages.2:18 build/C/man7/numa.7:27 build/C/man2/set_mempolicy.2:25
40 msgid "Linux Programmer's Manual"
44 #: build/C/man2/get_mempolicy.2:26 build/C/man2/getcpu.2:8 build/C/man2/mbind.2:26 build/C/man2/migrate_pages.2:18 build/C/man2/move_pages.2:19 build/C/man7/numa.7:28 build/C/man2/set_mempolicy.2:26
50 #: build/C/man2/get_mempolicy.2:28
51 msgid "get_mempolicy - Retrieve NUMA memory policy for a process"
55 #: build/C/man2/get_mempolicy.2:28 build/C/man2/getcpu.2:10 build/C/man2/mbind.2:28 build/C/man2/migrate_pages.2:20 build/C/man2/move_pages.2:21 build/C/man2/set_mempolicy.2:28
61 #: build/C/man2/get_mempolicy.2:30
62 msgid "B<#include E<lt>numaif.hE<gt>>"
66 #: build/C/man2/get_mempolicy.2:35
69 "B<int get_mempolicy(int *>I<mode>B<, unsigned long *>I<nodemask>B<,>\n"
70 "B< unsigned long >I<maxnode>B<, unsigned long "
72 "B< unsigned long >I<flags>B<);>\n"
76 #: build/C/man2/get_mempolicy.2:37 build/C/man2/mbind.2:37 build/C/man2/set_mempolicy.2:36
78 msgid "Link with I<-lnuma>.\n"
82 #: build/C/man2/get_mempolicy.2:38 build/C/man2/getcpu.2:17 build/C/man2/mbind.2:38 build/C/man2/migrate_pages.2:30 build/C/man2/move_pages.2:30 build/C/man7/numa.7:30 build/C/man2/set_mempolicy.2:37
88 #: build/C/man2/get_mempolicy.2:43
90 "B<get_mempolicy>() retrieves the NUMA policy of the calling process or of a "
91 "memory address, depending on the setting of I<flags>."
95 #: build/C/man2/get_mempolicy.2:48 build/C/man2/set_mempolicy.2:52
97 "A NUMA machine has different memory controllers with different distances to "
98 "specific CPUs. The memory policy defines from which node memory is "
99 "allocated for the process."
103 #: build/C/man2/get_mempolicy.2:65
105 "If I<flags> is specified as 0, then information about the calling process's "
106 "default policy (as set by B<set_mempolicy>(2)) is returned. The policy "
107 "returned [I<mode> and I<nodemask>] may be used to restore the process's "
108 "policy to its state at the time of the call to B<get_mempolicy>() using "
109 "B<set_mempolicy>(2)."
113 #: build/C/man2/get_mempolicy.2:87
115 "If I<flags> specifies B<MPOL_F_MEMS_ALLOWED> (available since Linux 2.6.24), "
116 "the I<mode> argument is ignored and the set of nodes [memories] that the "
117 "process is allowed to specify in subsequent calls to B<mbind>(2) or "
118 "B<set_mempolicy>(2) [in the absence of any I<mode flags>] is returned in "
119 "I<nodemask>. It is not permitted to combine B<MPOL_F_MEMS_ALLOWED> with "
120 "either B<MPOL_F_ADDR> or B<MPOL_F_NODE>."
124 #: build/C/man2/get_mempolicy.2:101
126 "If I<flags> specifies B<MPOL_F_ADDR>, then information is returned about the "
127 "policy governing the memory address given in I<addr>. This policy may be "
128 "different from the process's default policy if B<mbind>(2) or one of the "
129 "helper functions described in B<numa>(3) has been used to establish a "
130 "policy for the memory range containing I<addr>."
134 #: build/C/man2/get_mempolicy.2:122
136 "If the I<mode> argument is not NULL, then B<get_mempolicy>() will store the "
137 "policy mode and any optional I<mode flags> of the requested NUMA policy in "
138 "the location pointed to by this argument. If I<nodemask> is not NULL, then "
139 "the nodemask associated with the policy will be stored in the location "
140 "pointed to by this argument. I<maxnode> specifies the number of node IDs "
141 "that can be stored into I<nodemask>\\(emthat is, the maximum node ID plus "
142 "one. The value specified by I<maxnode> is always rounded to a multiple of "
143 "I<sizeof(unsigned long)>."
147 #: build/C/man2/get_mempolicy.2:139
149 "If I<flags> specifies both B<MPOL_F_NODE> and B<MPOL_F_ADDR>, "
150 "B<get_mempolicy>() will return the node ID of the node on which the address "
151 "I<addr> is allocated into the location pointed to by I<mode>. If no page "
152 "has yet been allocated for the specified address, B<get_mempolicy>() will "
153 "allocate a page as if the process had performed a read [load] access to that "
154 "address, and return the ID of the node where that page was allocated."
157 #. Note: code returns next interleave node via 'mode' argument -Lee Schermerhorn
159 #: build/C/man2/get_mempolicy.2:164
161 "If I<flags> specifies B<MPOL_F_NODE>, but not B<MPOL_F_ADDR>, and the "
162 "process's current policy is B<MPOL_INTERLEAVE>, then B<get_mempolicy>() "
163 "will return in the location pointed to by a non-NULL I<mode> argument, the "
164 "node ID of the next node that will be used for interleaving of internal "
165 "kernel pages allocated on behalf of the process. These allocations include "
166 "pages for memory mapped files in process memory ranges mapped using the "
167 "B<mmap>(2) call with the B<MAP_PRIVATE> flag for read accesses, and in "
168 "memory ranges mapped with the B<MAP_SHARED> flag for all accesses."
172 #: build/C/man2/get_mempolicy.2:166
173 msgid "Other flag values are reserved."
177 #: build/C/man2/get_mempolicy.2:169
178 msgid "For an overview of the possible policies see B<set_mempolicy>(2)."
182 #: build/C/man2/get_mempolicy.2:169 build/C/man2/mbind.2:289 build/C/man2/migrate_pages.2:87 build/C/man2/move_pages.2:141 build/C/man2/set_mempolicy.2:218
188 #: build/C/man2/get_mempolicy.2:176
190 "On success, B<get_mempolicy>() returns 0; on error, -1 is returned and "
191 "I<errno> is set to indicate the error."
195 #: build/C/man2/get_mempolicy.2:176 build/C/man2/mbind.2:297 build/C/man2/migrate_pages.2:94 build/C/man2/move_pages.2:150 build/C/man2/set_mempolicy.2:225
201 #: build/C/man2/get_mempolicy.2:177 build/C/man2/mbind.2:299 build/C/man2/move_pages.2:159 build/C/man2/set_mempolicy.2:226
207 #: build/C/man2/get_mempolicy.2:184 build/C/man2/set_mempolicy.2:233
209 "Part of all of the memory range specified by I<nodemask> and I<maxnode> "
210 "points outside your accessible address space."
214 #: build/C/man2/get_mempolicy.2:184 build/C/man2/mbind.2:307 build/C/man2/move_pages.2:162 build/C/man2/set_mempolicy.2:233
220 #: build/C/man2/get_mempolicy.2:228
222 "The value specified by I<maxnode> is less than the number of node IDs "
223 "supported by the system. Or I<flags> specified values other than "
224 "B<MPOL_F_NODE> or B<MPOL_F_ADDR>; or I<flags> specified B<MPOL_F_ADDR> and "
225 "I<addr> is NULL, or I<flags> did not specify B<MPOL_F_ADDR> and I<addr> is "
226 "not NULL. Or, I<flags> specified B<MPOL_F_NODE> but not B<MPOL_F_ADDR> and "
227 "the current process policy is not B<MPOL_INTERLEAVE>. Or, I<flags> "
228 "specified B<MPOL_F_MEMS_ALLOWED> with either B<MPOL_F_ADDR> or "
229 "B<MPOL_F_NODE>. (And there are other B<EINVAL> cases.)"
233 #: build/C/man2/get_mempolicy.2:228 build/C/man2/getcpu.2:51 build/C/man2/mbind.2:379 build/C/man2/migrate_pages.2:110 build/C/man2/move_pages.2:190 build/C/man2/set_mempolicy.2:273
239 #: build/C/man2/get_mempolicy.2:232
241 "The B<get_mempolicy>() system call was added to the Linux kernel in version "
246 #: build/C/man2/get_mempolicy.2:232 build/C/man2/getcpu.2:54 build/C/man2/mbind.2:383 build/C/man2/migrate_pages.2:114 build/C/man2/move_pages.2:193 build/C/man7/numa.7:178 build/C/man2/set_mempolicy.2:277
248 msgid "CONFORMING TO"
252 #: build/C/man2/get_mempolicy.2:234 build/C/man2/mbind.2:385 build/C/man2/migrate_pages.2:116 build/C/man2/move_pages.2:195 build/C/man2/set_mempolicy.2:279
253 msgid "This system call is Linux-specific."
257 #: build/C/man2/get_mempolicy.2:234 build/C/man2/getcpu.2:57 build/C/man2/mbind.2:385 build/C/man2/migrate_pages.2:116 build/C/man2/move_pages.2:195 build/C/man7/numa.7:146 build/C/man2/set_mempolicy.2:279
263 #: build/C/man2/get_mempolicy.2:237 build/C/man2/mbind.2:388 build/C/man2/migrate_pages.2:119 build/C/man2/move_pages.2:198 build/C/man2/set_mempolicy.2:287
264 msgid "For information on library support, see B<numa>(7)."
268 #: build/C/man2/get_mempolicy.2:237 build/C/man2/getcpu.2:120 build/C/man2/mbind.2:437 build/C/man2/migrate_pages.2:146 build/C/man2/move_pages.2:225 build/C/man7/numa.7:180 build/C/man2/set_mempolicy.2:287
274 #: build/C/man2/get_mempolicy.2:245
276 "B<getcpu>(2), B<mbind>(2), B<mmap>(2), B<set_mempolicy>(2), B<numa>(3), "
277 "B<numa>(7), B<numactl>(8)"
281 #: build/C/man2/get_mempolicy.2:245 build/C/man2/getcpu.2:126 build/C/man2/mbind.2:448 build/C/man2/migrate_pages.2:159 build/C/man2/move_pages.2:235 build/C/man7/numa.7:188 build/C/man2/set_mempolicy.2:296
287 #: build/C/man2/get_mempolicy.2:252 build/C/man2/getcpu.2:133 build/C/man2/mbind.2:455 build/C/man2/migrate_pages.2:166 build/C/man2/move_pages.2:242 build/C/man7/numa.7:195 build/C/man2/set_mempolicy.2:303
289 "This page is part of release 3.40 of the Linux I<man-pages> project. A "
290 "description of the project, and information about reporting bugs, can be "
291 "found at http://www.kernel.org/doc/man-pages/."
295 #: build/C/man2/getcpu.2:7
301 #: build/C/man2/getcpu.2:7
307 #: build/C/man2/getcpu.2:10
308 msgid "getcpu - determine CPU and NUMA node on which the calling thread is running"
312 #: build/C/man2/getcpu.2:13
314 msgid "B<#include E<lt>linux/getcpu.hE<gt>>\n"
318 #: build/C/man2/getcpu.2:16
321 "B<int getcpu(unsigned *>I<cpu>B<, unsigned *>I<node>B<, struct getcpu_cache "
326 #: build/C/man2/getcpu.2:34
328 "The B<getcpu>() system call identifies the processor and node on which the "
329 "calling thread or process is currently running and writes them into the "
330 "integers pointed to by the I<cpu> and I<node> arguments. The processor is a "
331 "unique small integer identifying a CPU. The node is a unique small "
332 "identifier identifying a NUMA node. When either I<cpu> or I<node> is NULL "
333 "nothing is written to the respective pointer."
337 #: build/C/man2/getcpu.2:36
338 msgid "The third argument to this system call is nowadays unused."
342 #: build/C/man2/getcpu.2:51
344 "The information placed in I<cpu> is only guaranteed to be current at the "
345 "time of the call: unless the CPU affinity has been fixed using "
346 "B<sched_setaffinity>(2), the kernel might change the CPU at any time. "
347 "(Normally this does not happen because the scheduler tries to minimize "
348 "movements between CPUs to keep caches hot, but it is possible.) The caller "
349 "must be prepared to handle the situation when I<cpu> and I<node> are no "
350 "longer the current CPU and node."
354 #: build/C/man2/getcpu.2:54
355 msgid "B<getcpu>() was added in kernel 2.6.19 for x86_64 and i386."
359 #: build/C/man2/getcpu.2:57
360 msgid "B<getcpu>() is Linux specific."
364 #: build/C/man2/getcpu.2:63
366 "Linux makes a best effort to make this call as fast possible. The intention "
367 "of B<getcpu>() is to allow programs to make optimizations with per-CPU data "
368 "or for NUMA optimization."
372 #: build/C/man2/getcpu.2:69
374 "Glibc does not provide a wrapper for this system call; call it using "
375 "B<syscall>(2); or use B<sched_getcpu>(3) instead."
378 #. commit 4307d1e5ada595c87f9a4d16db16ba5edb70dcb1
379 #. Author: Ingo Molnar <mingo@elte.hu>
380 #. Date: Wed Nov 7 18:37:48 2007 +0100
381 #. x86: ignore the sys_getcpu() tcache parameter
383 #. ===== Before kernel 2.6.24: =====
386 #. .IR "struct getcpu_cache"
387 #. that is used as a cache by
389 #. The caller should put the cache into a thread-local variable
390 #. if the process is multithreaded,
391 #. because the cache cannot be shared between different threads.
396 #. will use it to speed up operation.
397 #. The information inside the cache is private to the system call
398 #. and should not be accessed by the user program.
399 #. The information placed in the cache can change between kernel releases.
401 #. When no cache is specified
404 #. but always retrieve the current CPU and node information.
408 #. However, the cached information is only updated once per jiffy (see
410 #. This means that the information could theoretically be out of date,
411 #. although in practice the scheduler's attempt to maintain
412 #. soft CPU affinity means that the information is unlikely to change
413 #. over the course of the caching interval.
415 #: build/C/man2/getcpu.2:120
417 "The I<tcache> argument is unused since Linux 2.6.24. In earlier kernels, if "
418 "this argument was non-NULL, then it specified a pointer to a "
419 "caller-allocated buffer in thread-local storage that was used to provide a "
420 "caching mechanism for B<getcpu>(). Use of the cache could speed B<getcpu>() "
421 "calls, at the cost that there was a very small chance that the returned "
422 "information would be out of date. The caching mechanism was considered to "
423 "cause problems when migrating threads between CPUs, and so the argument is "
428 #: build/C/man2/getcpu.2:126
430 "B<mbind>(2), B<sched_setaffinity>(2), B<set_mempolicy>(2), "
431 "B<sched_getcpu>(3), B<cpuset>(7)"
435 #: build/C/man2/mbind.2:25
441 #: build/C/man2/mbind.2:28
442 msgid "mbind - Set memory policy for a memory range"
446 #: build/C/man2/mbind.2:31 build/C/man2/migrate_pages.2:23 build/C/man2/move_pages.2:24 build/C/man2/set_mempolicy.2:31
448 msgid "B<#include E<lt>numaif.hE<gt>>\n"
452 #: build/C/man2/mbind.2:35
455 "B<int mbind(void *>I<addr>B<, unsigned long >I<len>B<, int >I<mode>B<,>\n"
456 "B< unsigned long *>I<nodemask>B<, unsigned long >I<maxnode>B<,>\n"
457 "B< unsigned >I<flags>B<);>\n"
461 #: build/C/man2/mbind.2:48
463 "B<mbind>() sets the NUMA memory policy, which consists of a policy mode and "
464 "zero or more nodes, for the memory range starting with I<addr> and "
465 "continuing for I<len> bytes. The memory policy defines from which node "
466 "memory is allocated."
470 #: build/C/man2/mbind.2:70
472 "If the memory range specified by the I<addr> and I<len> arguments includes "
473 "an \"anonymous\" region of memory\\(emthat is a region of memory created "
474 "using the B<mmap>(2) system call with the B<MAP_ANONYMOUS>\\(emor a memory "
475 "mapped file, mapped using the B<mmap>(2) system call with the "
476 "B<MAP_PRIVATE> flag, pages will only be allocated according to the specified "
477 "policy when the application writes [stores] to the page. For anonymous "
478 "regions, an initial read access will use a shared page in the kernel "
479 "containing all zeros. For a file mapped with B<MAP_PRIVATE>, an initial "
480 "read access will allocate pages according to the process policy of the "
481 "process that causes the page to be allocated. This may not be the process "
482 "that called B<mbind>()."
486 #: build/C/man2/mbind.2:78
488 "The specified policy will be ignored for any B<MAP_SHARED> mappings in the "
489 "specified memory range. Rather the pages will be allocated according to the "
490 "process policy of the process that caused the page to be allocated. Again, "
491 "this may not be the process that called B<mbind>()."
495 #: build/C/man2/mbind.2:95
497 "If the specified memory range includes a shared memory region created using "
498 "the B<shmget>(2) system call and attached using the B<shmat>(2) system "
499 "call, pages allocated for the anonymous or shared memory region will be "
500 "allocated according to the policy specified, regardless which process "
501 "attached to the shared memory segment causes the allocation. If, however, "
502 "the shared memory region was created with the B<SHM_HUGETLB> flag, the huge "
503 "pages will be allocated according to the policy specified only if the page "
504 "allocation is caused by the process that calls B<mbind>() for that region."
508 #: build/C/man2/mbind.2:106
510 "By default, B<mbind>() only has an effect for new allocations; if the pages "
511 "inside the range have been already touched before setting the policy, then "
512 "the policy has no effect. This default behavior may be overridden by the "
513 "B<MPOL_MF_MOVE> and B<MPOL_MF_MOVE_ALL> flags described below."
517 #: build/C/man2/mbind.2:121
519 "The I<mode> argument must specify one of B<MPOL_DEFAULT>, B<MPOL_BIND>, "
520 "B<MPOL_INTERLEAVE> or B<MPOL_PREFERRED>. All policy modes except "
521 "B<MPOL_DEFAULT> require the caller to specify via the I<nodemask> argument, "
522 "the node or nodes to which the mode applies."
526 #: build/C/man2/mbind.2:129
528 "The I<mode> argument may also include an optional I<mode flag >. The "
529 "supported I<mode flags> are:"
533 #: build/C/man2/mbind.2:129
535 msgid "B<MPOL_F_STATIC_NODES> (since Linux-2.6.26)"
539 #: build/C/man2/mbind.2:139
541 "A nonempty I<nodemask> specifies physical node ids. Linux does not remap "
542 "the I<nodemask> when the process moves to a different cpuset context, nor "
543 "when the set of nodes allowed by the process's current cpuset context "
548 #: build/C/man2/mbind.2:139
550 msgid "B<MPOL_F_RELATIVE_NODES> (since Linux-2.6.26)"
554 #: build/C/man2/mbind.2:145 build/C/man2/set_mempolicy.2:111
556 "A nonempty I<nodemask> specifies node ids that are relative to the set of "
557 "node ids allowed by the process's current cpuset."
561 #: build/C/man2/mbind.2:173
563 "I<nodemask> points to a bitmask of nodes containing up to I<maxnode> bits. "
564 "The bit mask size is rounded to the next multiple of I<sizeof(unsigned "
565 "long)>, but the kernel will only use bits up to I<maxnode>. A NULL value of "
566 "I<nodemask> or a I<maxnode> value of zero specifies the empty set of nodes. "
567 "If the value of I<maxnode> is zero, the I<nodemask> argument is ignored. "
568 "Where a I<nodemask> is required, it must contain at least one node that is "
569 "on-line, allowed by the process's current cpuset context [unless the "
570 "B<MPOL_F_STATIC_NODES> mode flag is specified], and contains memory."
574 #: build/C/man2/mbind.2:195
576 "The B<MPOL_DEFAULT> mode requests that any nondefault policy be removed, "
577 "restoring default behavior. When applied to a range of memory via "
578 "B<mbind>(), this means to use the process policy, which may have been set "
579 "with B<set_mempolicy>(2). If the mode of the process policy is also "
580 "B<MPOL_DEFAULT>, the system-wide default policy will be used. The "
581 "system-wide default policy allocates pages on the node of the CPU that "
582 "triggers the allocation. For B<MPOL_DEFAULT>, the I<nodemask> and "
583 "I<maxnode> arguments must be specify the empty set of nodes."
587 #: build/C/man2/mbind.2:212
589 "The B<MPOL_BIND> mode specifies a strict policy that restricts memory "
590 "allocation to the nodes specified in I<nodemask>. If I<nodemask> specifies "
591 "more than one node, page allocations will come from the node with the lowest "
592 "numeric node ID first, until that node contains no free memory. Allocations "
593 "will then come from the node with the next highest node ID specified in "
594 "I<nodemask> and so forth, until none of the specified nodes contain free "
595 "memory. Pages will not be allocated from any node not specified in the "
600 #: build/C/man2/mbind.2:225
602 "The B<MPOL_INTERLEAVE> mode specifies that page allocations be interleaved "
603 "across the set of nodes specified in I<nodemask>. This optimizes for "
604 "bandwidth instead of latency by spreading out pages and memory accesses to "
605 "those pages across multiple nodes. To be effective the memory area should "
606 "be fairly large, at least 1MB or bigger with a fairly uniform access "
607 "pattern. Accesses to a single page of the area will still be limited to the "
608 "memory bandwidth of a single node."
612 #: build/C/man2/mbind.2:244
614 "B<MPOL_PREFERRED> sets the preferred node for allocation. The kernel will "
615 "try to allocate pages from this node first and fall back to other nodes if "
616 "the preferred nodes is low on free memory. If I<nodemask> specifies more "
617 "than one node ID, the first node in the mask will be selected as the "
618 "preferred node. If the I<nodemask> and I<maxnode> arguments specify the "
619 "empty set, then the memory is allocated on the node of the CPU that "
620 "triggered the allocation. This is the only way to specify \"local "
621 "allocation\" for a range of memory via B<mbind>()."
624 #. According to the kernel code, the following is not true
625 #. --Lee Schermerhorn
626 #. In 2.6.16 or later the kernel will also try to move pages
627 #. to the requested node with this flag.
629 #: build/C/man2/mbind.2:260
631 "If B<MPOL_MF_STRICT> is passed in I<flags> and I<mode> is not "
632 "B<MPOL_DEFAULT>, then the call will fail with the error B<EIO> if the "
633 "existing pages in the memory range don't follow the policy."
637 #: build/C/man2/mbind.2:273
639 "If B<MPOL_MF_MOVE> is specified in I<flags>, then the kernel will attempt to "
640 "move all the existing pages in the memory range so that they follow the "
641 "policy. Pages that are shared with other processes will not be moved. If "
642 "B<MPOL_MF_STRICT> is also specified, then the call will fail with the error "
643 "B<EIO> if some pages could not be moved."
646 #. ---------------------------------------------------------------
648 #: build/C/man2/mbind.2:289
650 "If B<MPOL_MF_MOVE_ALL> is passed in I<flags>, then the kernel will attempt "
651 "to move all existing pages in the memory range regardless of whether other "
652 "processes use the pages. The calling process must be privileged "
653 "(B<CAP_SYS_NICE>) to use this flag. If B<MPOL_MF_STRICT> is also "
654 "specified, then the call will fail with the error B<EIO> if some pages could "
658 #. ---------------------------------------------------------------
660 #: build/C/man2/mbind.2:297
662 "On success, B<mbind>() returns 0; on error, -1 is returned and I<errno> is "
663 "set to indicate the error."
667 #: build/C/man2/mbind.2:307
669 "Part or all of the memory range specified by I<nodemask> and I<maxnode> "
670 "points outside your accessible address space. Or, there was an unmapped "
671 "hole in the specified memory range."
674 #. As at 2.6.23, this limit is "a page worth of bits", e.g.,
675 #. 8 * 4096 bits, assuming a 4kB page size.
677 #: build/C/man2/mbind.2:355
679 "An invalid value was specified for I<flags> or I<mode>; or I<addr + len> was "
680 "less than I<addr>; or I<addr> is not a multiple of the system page size. "
681 "Or, I<mode> is B<MPOL_DEFAULT> and I<nodemask> specified a nonempty set; or "
682 "I<mode> is B<MPOL_BIND> or B<MPOL_INTERLEAVE> and I<nodemask> is empty. Or, "
683 "I<maxnode> exceeds a kernel-imposed limit. Or, I<nodemask> specifies one or "
684 "more node IDs that are greater than the maximum supported node ID. Or, none "
685 "of the node IDs specified by I<nodemask> are on-line and allowed by the "
686 "process's current cpuset context, or none of the specified nodes contain "
687 "memory. Or, the I<mode> argument specified both B<MPOL_F_STATIC_NODES> and "
688 "B<MPOL_F_RELATIVE_NODES>."
692 #: build/C/man2/mbind.2:355
698 #: build/C/man2/mbind.2:366
700 "B<MPOL_MF_STRICT> was specified and an existing page was already on a node "
701 "that does not follow the policy; or B<MPOL_MF_MOVE> or B<MPOL_MF_MOVE_ALL> "
702 "was specified and the kernel was unable to move all existing pages in the "
707 #: build/C/man2/mbind.2:366 build/C/man2/set_mempolicy.2:270
713 #: build/C/man2/mbind.2:369 build/C/man2/set_mempolicy.2:273
714 msgid "Insufficient kernel memory was available."
718 #: build/C/man2/mbind.2:369 build/C/man2/migrate_pages.2:95 build/C/man2/move_pages.2:178
723 #. ---------------------------------------------------------------
725 #: build/C/man2/mbind.2:379
727 "The I<flags> argument included the B<MPOL_MF_MOVE_ALL> flag and the caller "
728 "does not have the B<CAP_SYS_NICE> privilege."
732 #: build/C/man2/mbind.2:383
733 msgid "The B<mbind>() system call was added to the Linux kernel in version 2.6.7."
737 #: build/C/man2/mbind.2:393
739 "NUMA policy is not supported on a memory mapped file range that was mapped "
740 "with the B<MAP_SHARED> flag."
744 #: build/C/man2/mbind.2:425
746 "The B<MPOL_DEFAULT> mode can have different effects for B<mbind>() and "
747 "B<set_mempolicy>(2). When B<MPOL_DEFAULT> is specified for "
748 "B<set_mempolicy>(2), the process's policy reverts to system default policy "
749 "or local allocation. When B<MPOL_DEFAULT> is specified for a range of "
750 "memory using B<mbind>(), any pages subsequently allocated for that range "
751 "will use the process's policy, as set by B<set_mempolicy>(2). This "
752 "effectively removes the explicit policy from the specified range, \"falling "
753 "back\" to a possibly nondefault policy. To select explicit \"local "
754 "allocation\" for a memory range, specify a I<mode> of B<MPOL_PREFERRED> with "
755 "an empty set of nodes. This method will work for B<set_mempolicy>(2), as "
760 #: build/C/man2/mbind.2:429
762 "Support for huge page policy was added with 2.6.16. For interleave policy "
763 "to be effective on huge page mappings the policied memory needs to be tens "
764 "of megabytes or larger."
768 #: build/C/man2/mbind.2:432
769 msgid "B<MPOL_MF_STRICT> is ignored on huge page mappings."
773 #: build/C/man2/mbind.2:437
775 "B<MPOL_MF_MOVE> and B<MPOL_MF_MOVE_ALL> are only available on Linux 2.6.16 "
780 #: build/C/man2/mbind.2:448
782 "B<get_mempolicy>(2), B<getcpu>(2), B<mmap>(2), B<set_mempolicy>(2), "
783 "B<shmat>(2), B<shmget>(2), B<numa>(3), B<cpuset>(7), B<numa>(7), "
788 #: build/C/man2/migrate_pages.2:17
790 msgid "MIGRATE_PAGES"
794 #: build/C/man2/migrate_pages.2:17
800 #: build/C/man2/migrate_pages.2:20
801 msgid "migrate_pages - move all pages in a process to another set of nodes"
805 #: build/C/man2/migrate_pages.2:27
808 "B<long migrate_pages(int >I<pid>B<, unsigned long >I<maxnode,>\n"
809 "B< const unsigned long *>I<old_nodes,>\n"
810 "B< const unsigned long *>I<new_nodes);>\n"
814 #: build/C/man2/migrate_pages.2:30 build/C/man2/move_pages.2:30
815 msgid "Link with I<-lnuma>."
819 #: build/C/man2/migrate_pages.2:46
821 "B<migrate_pages>() moves all pages of the process I<pid> that are in memory "
822 "nodes I<old_nodes> to the memory nodes in I<new_nodes>. Pages not located "
823 "in any node in I<old_nodes> will not be migrated. As far as possible, the "
824 "kernel maintains the relative topology relationship inside I<old_nodes> "
825 "during the migration to I<new_nodes>."
829 #: build/C/man2/migrate_pages.2:68
831 "The I<old_nodes> and I<new_nodes> arguments are pointers to bit masks of "
832 "node numbers, with up to I<maxnode> bits in each mask. These masks are "
833 "maintained as arrays of unsigned I<long> integers (in the last I<long> "
834 "integer, the bits beyond those specified by I<maxnode> are ignored). The "
835 "I<maxnode> argument is the maximum node number in the bit mask plus one "
836 "(this is the same as in B<mbind>(2), but different from B<select>(2))."
840 #: build/C/man2/migrate_pages.2:82
842 "The I<pid> argument is the ID of the process whose pages are to be moved. "
843 "To move pages in another process, the caller must be privileged "
844 "(B<CAP_SYS_NICE>) or the real or effective user ID of the calling process "
845 "must match the real or saved-set user ID of the target process. If I<pid> "
846 "is 0, then B<migrate_pages>() moves pages of the calling process."
850 #: build/C/man2/migrate_pages.2:87
852 "Pages shared with another process will only be moved if the initiating "
853 "process has the B<CAP_SYS_NICE> privilege."
857 #: build/C/man2/migrate_pages.2:94
859 "On success B<migrate_pages>() returns zero. On error, it returns -1, and "
860 "sets I<errno> to indicate the error."
864 #: build/C/man2/migrate_pages.2:104
866 "Insufficient privilege (B<CAP_SYS_NICE>) to move pages of the process "
867 "specified by I<pid>, or insufficient privilege (B<CAP_SYS_NICE>) to access "
868 "the specified target nodes."
872 #: build/C/man2/migrate_pages.2:104 build/C/man2/move_pages.2:187
877 #. FIXME There are other errors
879 #: build/C/man2/migrate_pages.2:110
880 msgid "No process matching I<pid> could be found."
884 #: build/C/man2/migrate_pages.2:114
886 "The B<migrate_pages>() system call first appeared on Linux in version "
891 #: build/C/man2/migrate_pages.2:128
893 "Use B<get_mempolicy>(2) with the B<MPOL_F_MEMS_ALLOWED> flag to obtain the "
894 "set of nodes that are allowed by the calling process's cpuset. Note that "
895 "this information is subject to change at any time by manual or automatic "
896 "reconfiguration of the cpuset."
900 #: build/C/man2/migrate_pages.2:140
902 "Use of B<migrate_pages>() may result in pages whose location (node) "
903 "violates the memory policy established for the specified addresses (see "
904 "B<mbind>(2)) and/or the specified process (see B<set_mempolicy>(2)). That "
905 "is, memory policy does not constrain the destination nodes used by "
906 "B<migrate_pages>()."
910 #: build/C/man2/migrate_pages.2:146 build/C/man2/move_pages.2:225
912 "The I<E<lt>numaif.hE<gt>> header is not included with glibc, but requires "
913 "installing I<libnuma-devel> or a similar package."
917 #: build/C/man2/migrate_pages.2:156
919 "B<get_mempolicy>(2), B<mbind>(2), B<set_mempolicy>(2), B<numa>(3), "
920 "B<numa_maps>(5), B<cpuset>(7), B<numa>(7), B<migratepages>(8), "
925 #: build/C/man2/migrate_pages.2:159
926 msgid "the kernel source file I<Documentation/vm/page_migration>."
930 #: build/C/man2/move_pages.2:18
936 #: build/C/man2/move_pages.2:18
942 #: build/C/man2/move_pages.2:21
943 msgid "move_pages - move individual pages of a process to another node"
947 #: build/C/man2/move_pages.2:27
950 "B<long move_pages(int >I<pid>B<, unsigned long count, void **>I<pages>B<,>\n"
951 "B< const int *>I<nodes>B<, int *>I<status>B<, int "
956 #: build/C/man2/move_pages.2:43
958 "B<move_pages>() moves the specified I<pages> of the process I<pid> to the "
959 "memory nodes specified by I<nodes>. The result of the move is reflected in "
960 "I<status>. The I<flags> indicate constraints on the pages to be moved."
964 #: build/C/man2/move_pages.2:56
966 "I<pid> is the ID of the process in which pages are to be moved. To move "
967 "pages in another process, the caller must be privileged (B<CAP_SYS_NICE>) "
968 "or the real or effective user ID of the calling process must match the real "
969 "or saved-set user ID of the target process. If I<pid> is 0, then "
970 "B<move_pages>() moves pages of the calling process."
974 #: build/C/man2/move_pages.2:64
976 "I<count> is the number of pages to move. It defines the size of the three "
977 "arrays I<pages>, I<nodes>, and I<status>."
980 #. FIXME what if they are not aligned?
982 #: build/C/man2/move_pages.2:71
984 "I<pages> is an array of pointers to the pages that should be moved. These "
985 "are pointers that should be aligned to page boundaries. Addresses are "
986 "specified as seen by the process specified by I<pid>."
990 #: build/C/man2/move_pages.2:84
992 "I<nodes> is an array of integers that specify the desired location for each "
993 "page. Each element in the array is a node number. I<nodes> can also be "
994 "NULL, in which case B<move_pages>() does not move any pages but instead "
995 "will return the node where each page currently resides, in the I<status> "
996 "array. Obtaining the status of each page may be necessary to determine "
997 "pages that need to be moved."
1001 #: build/C/man2/move_pages.2:90
1003 "I<status> is an array of integers that return the status of each page. The "
1004 "array only contains valid values if B<move_pages>() did not return an "
1009 #: build/C/man2/move_pages.2:102
1011 "I<flags> specify what types of pages to move. B<MPOL_MF_MOVE> means that "
1012 "only pages that are in exclusive use by the process are to be moved. "
1013 "B<MPOL_MF_MOVE_ALL> means that pages shared between multiple processes can "
1014 "also be moved. The process must be privileged (B<CAP_SYS_NICE>) to use "
1015 "B<MPOL_MF_MOVE_ALL>."
1019 #: build/C/man2/move_pages.2:102
1021 msgid "Page states in the status array"
1025 #: build/C/man2/move_pages.2:106
1026 msgid "The following values can be returned in each element of the I<status> array."
1030 #: build/C/man2/move_pages.2:106
1032 msgid "B<0..MAX_NUMNODES>"
1036 #: build/C/man2/move_pages.2:109
1037 msgid "Identifies the node on which the page resides."
1041 #: build/C/man2/move_pages.2:109
1047 #: build/C/man2/move_pages.2:114
1049 "The page is mapped by multiple processes and can only be moved if "
1050 "B<MPOL_MF_MOVE_ALL> is specified."
1054 #: build/C/man2/move_pages.2:114
1060 #: build/C/man2/move_pages.2:120
1062 "The page is currently busy and cannot be moved. Try again later. This "
1063 "occurs if a page is undergoing I/O or another kernel subsystem is holding a "
1064 "reference to the page."
1068 #: build/C/man2/move_pages.2:120
1074 #: build/C/man2/move_pages.2:123
1075 msgid "This is a zero page or the memory area is not mapped by the process."
1079 #: build/C/man2/move_pages.2:123
1085 #: build/C/man2/move_pages.2:130
1087 "Unable to write back a page. The page has to be written back in order to "
1088 "move it since the page is dirty and the file system does not provide a "
1089 "migration function that would allow the move of dirty pages."
1093 #: build/C/man2/move_pages.2:130
1099 #: build/C/man2/move_pages.2:135
1101 "A dirty page cannot be moved. The file system does not provide a migration "
1102 "function and has no ability to write back pages."
1106 #: build/C/man2/move_pages.2:135
1112 #: build/C/man2/move_pages.2:138
1113 msgid "The page is not present."
1117 #: build/C/man2/move_pages.2:138
1123 #: build/C/man2/move_pages.2:141
1124 msgid "Unable to allocate memory on target node."
1127 #. FIXME Is the following quite true: does the wrapper in numactl
1128 #. do the right thing?
1130 #: build/C/man2/move_pages.2:150
1132 "On success B<move_pages>() returns zero. On error, it returns -1, and sets "
1133 "I<errno> to indicate the error."
1137 #: build/C/man2/move_pages.2:151
1143 #: build/C/man2/move_pages.2:154
1144 msgid "Too many pages to move."
1148 #: build/C/man2/move_pages.2:154
1153 #. FIXME Clarify "current cpuset". Is that the cpuset of the caller
1156 #: build/C/man2/move_pages.2:159
1157 msgid "One of the target nodes is not allowed by the current cpuset."
1161 #: build/C/man2/move_pages.2:162
1162 msgid "Parameter array could not be accessed."
1166 #: build/C/man2/move_pages.2:169
1168 "Flags other than B<MPOL_MF_MOVE> and B<MPOL_MF_MOVE_ALL> was specified or an "
1169 "attempt was made to migrate pages of a kernel thread."
1173 #: build/C/man2/move_pages.2:169
1179 #: build/C/man2/move_pages.2:172
1180 msgid "One of the target nodes is not online."
1184 #: build/C/man2/move_pages.2:172
1190 #: build/C/man2/move_pages.2:178
1192 "No pages were found that require moving. All pages are either already on "
1193 "the target node, not present, had an invalid address or could not be moved "
1194 "because they were mapped by multiple processes."
1198 #: build/C/man2/move_pages.2:187
1200 "The caller specified B<MPOL_MF_MOVE_ALL> without sufficient privileges "
1201 "(B<CAP_SYS_NICE>). Or, the caller attempted to move pages of a process "
1202 "belonging to another user but did not have privilege to do so "
1203 "(B<CAP_SYS_NICE>)."
1207 #: build/C/man2/move_pages.2:190
1208 msgid "Process does not exist."
1212 #: build/C/man2/move_pages.2:193
1213 msgid "B<move_pages>() first appeared on Linux in version 2.6.18."
1216 #. FIXME Clarify "current cpuset". Is that the cpuset of the caller
1219 #: build/C/man2/move_pages.2:209
1221 "Use B<get_mempolicy>(2) with the B<MPOL_F_MEMS_ALLOWED> flag to obtain the "
1222 "set of nodes that are allowed by the current cpuset. Note that this "
1223 "information is subject to change at any time by manual or automatic "
1224 "reconfiguration of the cpuset."
1228 #: build/C/man2/move_pages.2:219
1230 "Use of this function may result in pages whose location (node) violates the "
1231 "memory policy established for the specified addresses (See B<mbind>(2)) "
1232 "and/or the specified process (See B<set_mempolicy>(2)). That is, memory "
1233 "policy does not constrain the destination nodes used by B<move_pages>()."
1237 #: build/C/man2/move_pages.2:235
1239 "B<get_mempolicy>(2), B<mbind>(2), B<set_mempolicy>(2), B<numa>(3), "
1240 "B<numa_maps>(5), B<cpuset>(7), B<numa>(7), B<migratepages>(8), "
1245 #: build/C/man7/numa.7:27
1251 #: build/C/man7/numa.7:30
1252 msgid "numa - overview of Non-Uniform Memory Architecture"
1256 #: build/C/man7/numa.7:41
1258 "Non-Uniform Memory Access (NUMA) refers to multiprocessor systems whose "
1259 "memory is divided into multiple memory nodes. The access time of a memory "
1260 "node depends on the relative locations of the accessing CPU and the accessed "
1261 "node. (This contrasts with a symmetric multiprocessor system, where the "
1262 "access time for all of the memory is the same for all CPUs.) Normally, each "
1263 "CPU on a NUMA system has a local memory node whose contents can be accessed "
1264 "faster than the memory in the node local to another CPU or the memory on a "
1265 "bus shared by all CPUs."
1269 #: build/C/man7/numa.7:41
1271 msgid "NUMA system calls"
1275 #: build/C/man7/numa.7:52
1277 "The Linux kernel implements the following NUMA-related system calls: "
1278 "B<get_mempolicy>(2), B<mbind>(2), B<migrate_pages>(2), B<move_pages>(2), and "
1279 "B<set_mempolicy>(2). However, applications should normally use the "
1280 "interface provided by I<libnuma>; see \"Library Support\" below."
1284 #: build/C/man7/numa.7:52
1286 msgid "/proc/[number]/numa_maps (since Linux 2.6.14)"
1289 #. See also Changelog-2.6.14
1291 #: build/C/man7/numa.7:56
1293 "This file displays information about a process's NUMA memory policy and "
1298 #: build/C/man7/numa.7:60
1300 "Each line contains information about a memory range used by the process, "
1301 "displaying\\(emamong other information\\(emthe effective memory policy for "
1302 "that memory range and on which nodes the pages have been allocated."
1306 #: build/C/man7/numa.7:68
1308 "I<numa_maps> is a read-only file. When I</proc/E<lt>pidE<gt>/numa_maps> is "
1309 "read, the kernel will scan the virtual address space of the process and "
1310 "report how memory is used. One line is displayed for each unique memory "
1311 "range of the process."
1315 #: build/C/man7/numa.7:75
1317 "The first field of each line shows the starting address of the memory "
1318 "range. This field allows a correlation with the contents of the "
1319 "I</proc/E<lt>pidE<gt>/maps> file, which contains the end address of the "
1320 "range and other information, such as the access permissions and sharing."
1324 #: build/C/man7/numa.7:83
1326 "The second field shows the memory policy currently in effect for the memory "
1327 "range. Note that the effective policy is not necessarily the policy "
1328 "installed by the process for that memory range. Specifically, if the "
1329 "process installed a \"default\" policy for that range, the effective policy "
1330 "for that range will be the process policy, which may or may not be "
1335 #: build/C/man7/numa.7:86
1337 "The rest of the line contains information about the pages allocated in the "
1338 "memory range, as follows:"
1342 #: build/C/man7/numa.7:86
1344 msgid "I<NE<lt>nodeE<gt>=E<lt>nr_pagesE<gt>>"
1348 #: build/C/man7/numa.7:99
1350 "The number of pages allocated on I<E<lt>nodeE<gt>>. I<E<lt>nr_pagesE<gt>> "
1351 "includes only pages currently mapped by the process. Page migration and "
1352 "memory reclaim may have temporarily unmapped pages associated with this "
1353 "memory range. These pages may only show up again after the process has "
1354 "attempted to reference them. If the memory range represents a shared memory "
1355 "area or file mapping, other processes may currently have additional pages "
1356 "mapped in a corresponding memory range."
1360 #: build/C/man7/numa.7:99
1362 msgid "I<file=E<lt>filenameE<gt>>"
1366 #: build/C/man7/numa.7:105
1368 "The file backing the memory range. If the file is mapped as private, write "
1369 "accesses may have generated COW (Copy-On-Write) pages in this memory range. "
1370 "These pages are displayed as anonymous pages."
1374 #: build/C/man7/numa.7:105
1380 #: build/C/man7/numa.7:108
1381 msgid "Memory range is used for the heap."
1385 #: build/C/man7/numa.7:108
1391 #: build/C/man7/numa.7:111
1392 msgid "Memory range is used for the stack."
1396 #: build/C/man7/numa.7:111
1402 #: build/C/man7/numa.7:115
1404 "Huge memory range. The page counts shown are huge pages and not regular "
1409 #: build/C/man7/numa.7:115
1411 msgid "I<anon=E<lt>pagesE<gt>>"
1415 #: build/C/man7/numa.7:118
1416 msgid "The number of anonymous page in the range."
1420 #: build/C/man7/numa.7:118
1422 msgid "I<dirty=E<lt>pagesE<gt>>"
1426 #: build/C/man7/numa.7:121
1427 msgid "Number of dirty pages."
1431 #: build/C/man7/numa.7:121
1433 msgid "I<mapped=E<lt>pagesE<gt>>"
1437 #: build/C/man7/numa.7:128
1438 msgid "Total number of mapped pages, if different from I<dirty> and I<anon> pages."
1442 #: build/C/man7/numa.7:128
1444 msgid "I<mapmax=E<lt>countE<gt>>"
1448 #: build/C/man7/numa.7:134
1450 "Maximum mapcount (number of processes mapping a single page) encountered "
1451 "during the scan. This may be used as an indicator of the degree of sharing "
1452 "occurring in a given memory range."
1456 #: build/C/man7/numa.7:134
1458 msgid "I<swapcache=E<lt>countE<gt>>"
1462 #: build/C/man7/numa.7:137
1463 msgid "Number of pages that have an associated entry on a swap device."
1467 #: build/C/man7/numa.7:137
1469 msgid "I<active=E<lt>pagesE<gt>>"
1473 #: build/C/man7/numa.7:143
1475 "The number of pages on the active list. This field is only shown if "
1476 "different from the number of pages in this range. This means that some "
1477 "inactive pages exist in the memory range that may be removed from memory by "
1482 #: build/C/man7/numa.7:143
1484 msgid "I<writeback=E<lt>pagesE<gt>>"
1488 #: build/C/man7/numa.7:146
1489 msgid "Number of pages that are currently being written out to disk."
1493 #: build/C/man7/numa.7:153
1495 "The Linux NUMA system calls and I</proc> interface are only available if the "
1496 "kernel was configured and built with the B<CONFIG_NUMA> option."
1500 #: build/C/man7/numa.7:153
1502 msgid "Library Support"
1506 #: build/C/man7/numa.7:162
1508 "Link with I<-lnuma> to get the system call definitions. I<libnuma> and the "
1509 "required I<E<lt>numaif.hE<gt>> header are available in the I<numactl> "
1514 #: build/C/man7/numa.7:178
1516 "However, applications should not use these system calls directly. Instead, "
1517 "the higher level interface provided by the B<numa>(3) functions in the "
1518 "I<numactl> package is recommended. The I<numactl> package is available at "
1519 "I<ftp://oss.sgi.com/www/projects/libnuma/download/>. The package is also "
1520 "included in some Linux distributions. Some distributions include the "
1521 "development library and header in the separate I<numactl-devel> package."
1525 #: build/C/man7/numa.7:180
1526 msgid "No standards govern NUMA interfaces."
1530 #: build/C/man7/numa.7:188
1532 "B<get_mempolicy>(2), B<mbind>(2), B<move_pages>(2), B<set_mempolicy>(2), "
1533 "B<numa>(3), B<cpuset>(7), B<numactl>(8)"
1537 #: build/C/man2/set_mempolicy.2:25
1539 msgid "SET_MEMPOLICY"
1543 #: build/C/man2/set_mempolicy.2:28
1545 "set_mempolicy - set default NUMA memory policy for a process and its "
1550 #: build/C/man2/set_mempolicy.2:34
1553 "B<int set_mempolicy(int >I<mode>B<, unsigned long *>I<nodemask>B<,>\n"
1554 "B< unsigned long >I<maxnode>B<);>\n"
1558 #: build/C/man2/set_mempolicy.2:47
1560 "B<set_mempolicy>() sets the NUMA memory policy of the calling process, "
1561 "which consists of a policy mode and zero or more nodes, to the values "
1562 "specified by the I<mode>, I<nodemask> and I<maxnode> arguments."
1566 #: build/C/man2/set_mempolicy.2:73
1568 "This system call defines the default policy for the process. The process "
1569 "policy governs allocation of pages in the process's address space outside of "
1570 "memory ranges controlled by a more specific policy set by B<mbind>(2). The "
1571 "process default policy also controls allocation of any pages for memory "
1572 "mapped files mapped using the B<mmap>(2) call with the B<MAP_PRIVATE> flag "
1573 "and that are only read [loaded] from by the process and of memory mapped "
1574 "files mapped using the B<mmap>(2) call with the B<MAP_SHARED> flag, "
1575 "regardless of the access type. The policy is only applied when a new page "
1576 "is allocated for the process. For anonymous memory this is when the page is "
1577 "first touched by the application."
1581 #: build/C/man2/set_mempolicy.2:87
1583 "The I<mode> argument must specify one of B<MPOL_DEFAULT>, B<MPOL_BIND>, "
1584 "B<MPOL_INTERLEAVE> or B<MPOL_PREFERRED>. All modes except B<MPOL_DEFAULT> "
1585 "require the caller to specify via the I<nodemask> argument one or more "
1590 #: build/C/man2/set_mempolicy.2:95
1592 "The I<mode> argument may also include an optional I<mode flag>. The "
1593 "supported I<mode flags> are:"
1597 #: build/C/man2/set_mempolicy.2:95
1599 msgid "B<MPOL_F_STATIC_NODES> (since Linux 2.6.26)"
1603 #: build/C/man2/set_mempolicy.2:105
1605 "A nonempty I<nodemask> specifies physical node ids. Linux does will not "
1606 "remap the I<nodemask> when the process moves to a different cpuset context, "
1607 "nor when the set of nodes allowed by the process's current cpuset context "
1612 #: build/C/man2/set_mempolicy.2:105
1614 msgid "B<MPOL_F_RELATIVE_NODES> (since Linux 2.6.26)"
1618 #: build/C/man2/set_mempolicy.2:131
1620 "I<nodemask> points to a bit mask of node IDs that contains up to I<maxnode> "
1621 "bits. The bit mask size is rounded to the next multiple of "
1622 "I<sizeof(unsigned long)>, but the kernel will only use bits up to "
1623 "I<maxnode>. A NULL value of I<nodemask> or a I<maxnode> value of zero "
1624 "specifies the empty set of nodes. If the value of I<maxnode> is zero, the "
1625 "I<nodemask> argument is ignored."
1629 #: build/C/man2/set_mempolicy.2:152
1631 "Where a I<nodemask> is required, it must contain at least one node that is "
1632 "on-line, allowed by the process's current cpuset context, [unless the "
1633 "B<MPOL_F_STATIC_NODES> mode flag is specified], and contains memory. If the "
1634 "B<MPOL_F_STATIC_NODES> is set in I<mode> and a required I<nodemask> contains "
1635 "no nodes that are allowed by the process's current cpuset context, the "
1636 "memory policy reverts to I<local allocation>. This effectively overrides "
1637 "the specified policy until the process's cpuset context includes one or more "
1638 "of the nodes specified by I<nodemask>."
1642 #: build/C/man2/set_mempolicy.2:163
1644 "The B<MPOL_DEFAULT> mode specifies that any nondefault process memory policy "
1645 "be removed, so that the memory policy \"falls back\" to the system default "
1646 "policy. The system default policy is \"local allocation\"-- i.e., allocate "
1647 "memory on the node of the CPU that triggered the allocation. I<nodemask> "
1648 "must be specified as NULL. If the \"local node\" contains no free memory, "
1649 "the system will attempt to allocate memory from a \"near by\" node."
1653 #: build/C/man2/set_mempolicy.2:180
1655 "The B<MPOL_BIND> mode defines a strict policy that restricts memory "
1656 "allocation to the nodes specified in I<nodemask>. If I<nodemask> specifies "
1657 "more than one node, page allocations will come from the node with the lowest "
1658 "numeric node ID first, until that node contains no free memory. Allocations "
1659 "will then come from the node with the next highest node ID specified in "
1660 "I<nodemask> and so forth, until none of the specified nodes contain free "
1661 "memory. Pages will not be allocated from any node not specified in the "
1665 #. NOTE: the following sentence doesn't make sense in the context
1666 #. of set_mempolicy() -- no memory area specified.
1667 #. To be effective the memory area should be fairly large,
1668 #. at least 1MB or bigger.
1670 #: build/C/man2/set_mempolicy.2:194
1672 "B<MPOL_INTERLEAVE> interleaves page allocations across the nodes specified "
1673 "in I<nodemask> in numeric node ID order. This optimizes for bandwidth "
1674 "instead of latency by spreading out pages and memory accesses to those pages "
1675 "across multiple nodes. However, accesses to a single page will still be "
1676 "limited to the memory bandwidth of a single node."
1680 #: build/C/man2/set_mempolicy.2:211
1682 "B<MPOL_PREFERRED> sets the preferred node for allocation. The kernel will "
1683 "try to allocate pages from this node first and fall back to \"near by\" "
1684 "nodes if the preferred node is low on free memory. If I<nodemask> specifies "
1685 "more than one node ID, the first node in the mask will be selected as the "
1686 "preferred node. If the I<nodemask> and I<maxnode> arguments specify the "
1687 "empty set, then the policy specifies \"local allocation\" (like the system "
1688 "default policy discussed above)."
1692 #: build/C/man2/set_mempolicy.2:218
1694 "The process memory policy is preserved across an B<execve>(2), and is "
1695 "inherited by child processes created using B<fork>(2) or B<clone>(2)."
1699 #: build/C/man2/set_mempolicy.2:225
1701 "On success, B<set_mempolicy>() returns 0; on error, -1 is returned and "
1702 "I<errno> is set to indicate the error."
1706 #: build/C/man2/set_mempolicy.2:270
1708 "I<mode> is invalid. Or, I<mode> is B<MPOL_DEFAULT> and I<nodemask> is "
1709 "nonempty, or I<mode> is B<MPOL_BIND> or B<MPOL_INTERLEAVE> and I<nodemask> "
1710 "is empty. Or, I<maxnode> specifies more than a page worth of bits. Or, "
1711 "I<nodemask> specifies one or more node IDs that are greater than the maximum "
1712 "supported node ID. Or, none of the node IDs specified by I<nodemask> are "
1713 "on-line and allowed by the process's current cpuset context, or none of the "
1714 "specified nodes contain memory. Or, the I<mode> argument specified both "
1715 "B<MPOL_F_STATIC_NODES> and B<MPOL_F_RELATIVE_NODES>."
1719 #: build/C/man2/set_mempolicy.2:277
1721 "The B<set_mempolicy>(), system call was added to the Linux kernel in version "
1726 #: build/C/man2/set_mempolicy.2:284
1728 "Process policy is not remembered if the page is swapped out. When such a "
1729 "page is paged back in, it will use the policy of the process or memory range "
1730 "that is in effect at the time the page is allocated."
1734 #: build/C/man2/set_mempolicy.2:296
1736 "B<get_mempolicy>(2), B<getcpu>(2), B<mbind>(2), B<mmap>(2), B<numa>(3), "
1737 "B<cpuset>(7), B<numa>(7), B<numactl>(8)"