1 .\" Copyright 2003,2004 Andi Kleen, SuSE Labs.
2 .\" and Copyright 2007 Lee Schermerhorn, Hewlett Packard
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.
18 .\" Formatted or processed versions of this manual, if unaccompanied by
19 .\" the source, must acknowledge the copyright and authors of this work.
21 .\" 2006-02-03, mtk, substantial wording changes and other improvements
22 .\" 2007-08-27, Lee Schermerhorn <Lee.Schermerhorn@hp.com>
23 .\" more precise specification of behavior.
25 .\" Translated 2006-08-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.39
26 .\" Updated 2007-01-07, Akihiro MOTOKI, LDP v2.43
27 .\" Updated 2008-02-13, Akihiro MOTOKI, LDP v2.77
28 .\" Updated 2008-08-06, Akihiro MOTOKI, LDP v3.05
29 .\" Updated 2008-08-21, Akihiro MOTOKI, LDP v3.07
30 .\" Updated 2008-09-02, Akihiro MOTOKI, LDP v3.08
31 .\" Updated 2008-11-19, Akihiro MOTOKI, LDP v3.13
33 .\"WORD: anonymous memory ̵̾¥á¥â¥ê
35 .TH SET_MEMPOLICY 2 2008-08-15 Linux "Linux Programmer's Manual"
38 .\"O set_mempolicy \- set default NUMA memory policy for a process and its children
39 set_mempolicy \- ¥×¥í¥»¥¹¤È¤½¤Î»Ò¥×¥í¥»¥¹¤Î NUMA ¥á¥â¥ê¤Î
40 ¥Ç¥Õ¥©¥ë¥È¥Ý¥ê¥·¡¼¤òÀßÄꤹ¤ë
44 .B "#include <numaif.h>"
46 .BI "int set_mempolicy(int " mode ", unsigned long *" nodemask ,
47 .BI " unsigned long " maxnode );
49 .\"O Link with \fI\-lnuma\fP.
50 \fI\-lnuma\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
54 .\"O .BR set_mempolicy ()
55 .\"O sets the NUMA memory policy of the calling process,
56 .\"O which consists of a policy mode and zero or more nodes,
57 .\"O to the values specified by the
64 ¤Ï¡¢¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î NUMA ¥Ý¥ê¥·¡¼¤ò
67 NUMA ¥Ý¥ê¥·¡¼¤Ï¥Ý¥ê¥·¡¼¥â¡¼¥É¤È 0 ¸Ä°Ê¾å¤Î¥Î¡¼¥É¤«¤é¹½À®¤µ¤ì¡¢
74 .\"O A NUMA machine has different
75 .\"O memory controllers with different distances to specific CPUs.
76 .\"O The memory policy defines from which node memory is allocated for
78 NUMA (ÈóÂоΥá¥â¥ê¥¢¥¯¥»¥¹) ¥Þ¥·¥ó¤Ç¤Ï¡¢CPU ¤Ë¤è¤ê
79 ¥á¥â¥ê¥³¥ó¥È¥í¡¼¥é¤¬°Û¤Ê¤ê¡¢µ÷Î¥¤â°Û¤Ê¤Ã¤Æ¤¤¤ë¡£
80 ¥á¥â¥ê¥Ý¥ê¥·¡¼¤Ï¡¢¤É¤Î¥Î¡¼¥É¤«¤é¥á¥â¥ê¤ò¤½¤Î¥×¥í¥»¥¹¤Ë
81 ³ä¤êÅö¤Æ¤é¤ì¤ë¤«¤òÄê¤á¤ë¤â¤Î¤Ç¤¢¤ë¡£
83 .\"O This system call defines the default policy for the process.
84 .\"O The process policy governs allocation of pages in the process's
85 .\"O address space outside of memory ranges
86 .\"O controlled by a more specific policy set by
89 ¤Ï¡¢¥×¥í¥»¥¹¤Î¥Ç¥Õ¥©¥ë¥È¥Ý¥ê¥·¡¼¤òÄê¤á¤ë¡£
90 ¥×¥í¥»¥¹¤Î¥Ý¥ê¥·¡¼¤Ï¡¢
92 ¤ÇÀßÄꤵ¤ì¤ëÆÃÄê¤Î¥Ý¥ê¥·¡¼¤Ë¤è¤êÀ©¸æ¤µ¤ì¤ë¥á¥â¥êÎΰè°Ê³°¤Î
93 ¥×¥í¥»¥¹¤Î¥¢¥É¥ì¥¹¶õ´Ö¤Ë¤ª¤±¤ë¥Ú¡¼¥¸¤Î³ä¤êÅö¤Æ¤ËŬÍѤµ¤ì¤ë¡£
94 .\"O The process default policy also controls allocation of any pages for
95 .\"O memory mapped files mapped using the
99 .\"O flag and that are only read [loaded] from by the process
100 .\"O and of memory mapped files mapped using the
104 .\"O flag, regardless of the access type.
105 ¥×¥í¥»¥¹¤Î¥Ç¥Õ¥©¥ë¥È¥Ý¥ê¥·¡¼¤Ï¡¢
109 ¤ò»È¤Ã¤Æ¥Þ¥Ã¥×¤µ¤ì¤¿¥á¥â¥ê¥Þ¥Ã¥×¡¦¥Õ¥¡¥¤¥ë¤ËÂФ¹¤ëÆɤ߽Ф·ÀìÍÑ
110 (¥í¡¼¥É¤µ¤ì¤ë¤À¤±) ¤Î¥Ú¡¼¥¸¤Î³ä¤êÅö¤Æ¤Ë¤âŬÍѤµ¤ì¤ë¡£
115 ¤ò»È¤Ã¤Æ¥Þ¥Ã¥×¤µ¤ì¤¿¥á¥â¥ê¥Þ¥Ã¥×¡¦¥Õ¥¡¥¤¥ë¤ËÂФ¹¤ë¥Ú¡¼¥¸¤Î³ä¤êÅö¤Æ¤Ë¤â
116 ŬÍѤµ¤ì¤ë (¤³¤Î¾ì¹ç¤Ï¥Ú¡¼¥¸¤Î¥¢¥¯¥»¥¹¼ïÊ̤˴ؤï¤é¤ºÅ¬ÍѤµ¤ì¤ë) ¡£
117 .\"O The policy is only applied when a new page is allocated
118 .\"O for the process.
119 .\"O For anonymous memory this is when the page is first
120 .\"O touched by the application.
121 ÀßÄꤷ¤¿¥Ý¥ê¥·¡¼¤Ï¡¢¥×¥í¥»¥¹¤Ë¿·µ¬¤Î¥Ú¡¼¥¸¤¬³ä¤êÅö¤Æ¤é¤ì¤ë¤È¤¤Ë¤Î¤ß
122 ŬÍѤµ¤ì¤ë¡£ÌµÌ¾¥á¥â¥ê (anonymous memory) ¤Î¾ì¹ç¡¢¿·µ¬¥Ú¡¼¥¸¤Î³ä¤êÅö¤Æ¤Ï
123 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤¬½é¤á¤Æ¥Ú¡¼¥¸¤Ë¥¢¥¯¥»¥¹¤·¤¿ºÝ¤Ë¹Ô¤ï¤ì¤ë¡£
127 .\"O argument must specify one of
128 .\"O .BR MPOL_DEFAULT ,
130 .\"O .B MPOL_INTERLEAVE
132 .\"O .BR MPOL_PREFERRED .
133 .\"O All modes except
135 .\"O require the caller to specify via the
137 .\"O argument one or more nodes.
142 .BR MPOL_INTERLEAVE ,
144 ¤Î¤¤¤º¤ì¤«°ì¤Ä¤ò»ØÄꤷ¤Æ¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
146 °Ê³°¤Î¥Ý¥ê¥·¡¼¤Î¾ì¹ç¡¢¸Æ¤Ó½Ð¤·¸µ¤Ï
148 °ú¤¿ô¤Ç°ì¤Ä°Ê¾å¤Î¥Î¡¼¥É¤ò»ØÄꤹ¤ëɬÍפ¬¤¢¤ë¡£
152 .\"O argument may also include an optional
153 .\"O .IR "mode flag" .
160 ¤ò´Þ¤á¤ë¤³¤È¤â¤Ç¤¤ë¡£
165 .\"O .BR MPOL_F_STATIC_NODES " (since Linux 2.6.26)"
166 .BR MPOL_F_STATIC_NODES " (Linux 2.6.26 °Ê¹ß)"
169 .\"O specifies physical node ids.
170 .\"O Linux does will not remap the
172 .\"O when the process moves to a different cpuset context,
173 .\"O nor when the set of nodes allowed by the process's
174 .\"O current cpuset context changes.
177 ¤Ï¡¢ÊªÍý¥Î¡¼¥É ID ¤Ç¤¢¤ë¡£
178 Linux ¤Ç¤Ï¡¢¤½¤Î¥×¥í¥»¥¹¤¬°Û¤Ê¤ë CPU ½¸¹ç¥³¥ó¥Æ¥¥¹¥È (cpuset context)
179 ¤Ë°ÜÆ°¤·¤¿¾ì¹ç¤Ç¤â¡¢¤½¤Î¥×¥í¥»¥¹¤Î¸½ºß¤Î CPU ½¸¹ç¥³¥ó¥Æ¥¥¹¥È¤Ç
180 µö²Ä¤µ¤ì¤Æ¤¤¤ë¥Î¡¼¥É½¸¹ç¤¬ÊѲ½¤·¤¿¾ì¹ç¤Ç¤â¡¢
182 ¤ò¥Þ¥Ã¥Ô¥ó¥°¤·Ä¾¤¹¤³¤È¤Ï¤Ê¤¤¡£
184 .\"O .BR MPOL_F_RELATIVE_NODES " (since Linux 2.6.26)"
185 .BR MPOL_F_RELATIVE_NODES " (Linux 2.6.26 °Ê¹ß)"
188 .\"O specifies node ids that are relative to the set of
189 .\"O node ids allowed by the process's current cpuset.
192 ¤Ï¡¢¤½¤Î¥×¥í¥»¥¹¤Î¸½ºß¤Î CPU ½¸¹ç¤Çµö²Ä¤µ¤ì¤Æ¤¤¤ë¥Î¡¼¥É ID ½¸¹ç
193 ¤Ë¤ª¤±¤ëÁêÂÐŪ¤Ê¥Î¡¼¥É ID ¤Ç¤¢¤ë¡£
196 .\"O points to a bit mask of node IDs that contains up to
199 .\"O The bit mask size is rounded to the next multiple of
200 .\"O .IR "sizeof(unsigned long)" ,
201 .\"O but the kernel will only use bits up to
206 ¥Ó¥Ã¥È¤«¤é¹½À®¤µ¤ì¤ë¥Î¡¼¥É ID ¤Î¥Ó¥Ã¥È¥Þ¥¹¥¯¤ò»Ø¤¹¡£
207 ¥Ó¥Ã¥È¥Þ¥¹¥¯¤ÎÂ礤µ¤Ï¡¢Ä¾¶á¤Î
208 .I sizeof(unsigned long)
209 ¤ÎÇÜ¿ô¤ËÀÚ¤ê¾å¤²¤é¤ì¤ë¤¬¡¢¥«¡¼¥Í¥ë¤¬»ÈÍѤ¹¤ë¤Î¤Ï
211 ¸Ä¤Þ¤Ç¤Î¥Ó¥Ã¥È¤À¤±¤Ç¤¢¤ë¡£
216 .\"O value of zero specifies the empty set of nodes.
222 .\"O argument is ignored.
227 ¤Ï¥Î¡¼¥É¤Î¶õ½¸¹ç¤òɽ¤¹¡£
235 .\"O is required, it must contain at least one node that is on-line,
236 .\"O allowed by the process's current cpuset context,
238 .\"O .B MPOL_F_STATIC_NODES
239 .\"O mode flag is specified],
240 .\"O and contains memory.
244 ¤Ë¡¢¥ª¥ó¥é¥¤¥ó¤Ç¡¢¤½¤Î¥×¥í¥»¥¹¤Î¸½ºß¤Î CPU ½¸¹ç¥³¥ó¥Æ¥¥¹¥È¤Ç
246 .RB ( MPOL_F_STATIC_NODES
247 ¥â¡¼¥É¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç)¡¢¥á¥â¥ê¤¬¤¢¤ë¥Î¡¼¥É¤¬
248 ¾¯¤Ê¤¯¤È¤â°ì¤ÄÆþ¤Ã¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
250 .\"O .B MPOL_F_STATIC_NODES
255 .\"O contains no nodes that are allowed by the process's current cpuset context,
256 .\"O the memory policy reverts to
257 .\"O .IR "local allocation" .
258 .\"O This effectively overrides the specified policy until the process's
259 .\"O cpuset context includes one or more of the nodes specified by
263 .B MPOL_F_STATIC_NODES
268 ¤Ë¡¢¤½¤Î¥×¥í¥»¥¹¤Î¸½ºß¤Î CPU ½¸¹ç¥³¥ó¥Æ¥¥¹¥È¤Çµö²Ä¤µ¤ì¤¿¥Î¡¼¥É¤¬
269 °ì¤Ä¤â´Þ¤Þ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢¥á¥â¥ê¤Î¥Ý¥ê¥·¡¼¤È¤·¤Æ¥Ç¥Õ¥©¥ë¥È¤Î
270 ¡Ö¥í¡¼¥«¥ë¤«¤é³ä¤êÅö¤Æ (local allocation)¡×¤¬Å¬ÍѤµ¤ì¤ë¡£
271 ¤½¤Î¥×¥í¥»¥¹¤Î CPU ½¸¹ç¥³¥ó¥Æ¥¥¹¥È¤¬
273 ¤Ç»ØÄꤵ¤ì¤¿¥Î¡¼¥É¤ò¾¯¤Ê¤¯¤È¤â°ì¤Ä´Þ¤à¤è¤¦¤Ë¤Ê¤ë¤Þ¤Ç¤Ï¡¢
274 ·ë²ÌŪ¤Ë»ØÄꤵ¤ì¤¿Æ°ºî¤¬¾å½ñ¤¤µ¤ì¤ë¤³¤È¤Ë¤Ê¤ë¡£
278 .\"O mode specifies that any nondefault process memory policy be removed,
279 .\"O so that the memory policy "falls back" to the system default policy.
280 .\"O The system default policy is "local allocation"--
281 .\"O i.e., allocate memory on the node of the CPU that triggered the allocation.
283 .\"O must be specified as NULL.
284 .\"O If the "local node" contains no free memory, the system will
285 .\"O attempt to allocate memory from a "near by" node.
287 ¥â¡¼¥É¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¤Ê¤¤¥×¥í¥»¥¹¤Î¥á¥â¥ê¥Ý¥ê¥·¡¼¤òºï½ü¤¹¤ë¤³¤È¤ò
288 »ØÄꤹ¤ë¤â¤Î¤Ç¤¢¤ë¡£¤³¤ì¤Ë¤è¤ê¡¢¥á¥â¥ê¥Ý¥ê¥·¡¼¤Ï¥·¥¹¥Æ¥à¤Î
289 ¥Ç¥Õ¥©¥ë¥È¥Ý¥ê¥·¡¼¤Ë¡ÖÌá¤ë¡×¤³¤È¤Ë¤Ê¤ë¡£
290 ¥·¥¹¥Æ¥à¤Î¥Ç¥Õ¥©¥ë¥È¥Ý¥ê¥·¡¼¤Ï¡Ö¥í¡¼¥«¥ë¤«¤é¤Î³ä¤êÅö¤Æ (local allocation)¡×¡¢
291 ¤Ä¤Þ¤ê¥á¥â¥ê³ä¤êÅö¤Æ¤Î¤¤Ã¤«¤±¤È¤Ê¤Ã¤¿ CPU ¤Î¥Î¡¼¥É¤Î¥á¥â¥ê¤¬³ä¤êÅö¤Æ¤é¤ì¤ë¡£
293 ¤Ë¤Ï NULL ¤ò»ØÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
294 ¡Ö¼«¥Î¡¼¥É (local node)¡×¤Ë¶õ¤¥á¥â¥ê¤¬Á´¤¯¤Ê¤¤¾ì¹ç¡¢¥·¥¹¥Æ¥à¤Ï
295 ¡Ö¶á¤¯¤Î (near by) ¥Î¡¼¥É¡×¤«¤é¥á¥â¥ê¤ò³ä¤êÅö¤Æ¤è¤¦¤È»î¤ß¤ë¡£
299 .\"O mode defines a strict policy that restricts memory allocation to the
300 .\"O nodes specified in
304 .\"O specifies more than one node, page allocations will come from
305 .\"O the node with the lowest numeric node ID first, until that node
306 .\"O contains no free memory.
307 .\"O Allocations will then come from the node with the next highest
308 .\"O node ID specified in
310 .\"O and so forth, until none of the specified nodes contain free memory.
311 .\"O Pages will not be allocated from any node not specified in the
314 ¥â¡¼¥É¤Ï¸·Ì©¤Ê¥Ý¥ê¥·¡¼¤Ç¡¢¥á¥â¥ê³ä¤êÅö¤Æ¤Ï
316 ¤Ë»ØÄꤵ¤ì¤¿¥Î¡¼¥É¤Ë¸ÂÄꤵ¤ì¤ë¡£
318 ¤Ë 2 ¸Ä°Ê¾å¤Î¥Î¡¼¥É¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¢¥Ú¡¼¥¸¤Î³ä¤êÅö¤Æ¤Ï
319 ¥Î¡¼¥É ID ¤¬¿ô»ú¤È¤·¤ÆºÇ¾®¤Î¥Î¡¼¥É¤«¤é³«»Ï¤µ¤ì¡¢
320 ¤½¤Î¥Î¡¼¥É¤Ë¶õ¤¥á¥â¥ê¤¬¤Ê¤¯¤Ê¤ë¤Þ¤Ç¤½¤Î¥Î¡¼¥É¤«¤é
321 ¥Ú¡¼¥¸³ä¤êÅö¤Æ¤¬¹Ô¤ï¤ì¤ë¡£¤½¤Î¥Î¡¼¥É¤Ë¶õ¤¥á¥â¥ê¤¬¤Ê¤¯¤Ê¤Ã¤¿¤é¡¢
322 .\"motoki: the next highest ¤Ï the next lowest ¤Î´Ö°ã¤¤¡©
323 ¼¡¤Ë¾®¤µ¤Ê¥Î¡¼¥É ID ¤ò»ý¤Ä¥Î¡¼¥É¤«¤é¥Ú¡¼¥¸³ä¤êÅö¤Æ¤¬¹Ô¤ï¤ì¤ë¡£
326 ¤Ç»ØÄꤵ¤ì¤¿Á´¤Æ¤Î¥Î¡¼¥É¤Ç¶õ¤¥á¥â¥ê¤¬¤Ê¤¯¤Ê¤ë¤Þ¤Ç·«¤êÊÖ¤¹¡£
328 ¤Ç»ØÄꤵ¤ì¤¿°Ê³°¤Î¥Î¡¼¥É¤«¤é¤Ï¥Ú¡¼¥¸¤Î³ä¤êÅö¤Æ¤Ï¹Ô¤ï¤ì¤Ê¤¤¡£
330 .\"O .B MPOL_INTERLEAVE
331 .\"O interleaves page allocations across the nodes specified in
333 .\"O in numeric node ID order.
334 .\"O This optimizes for bandwidth instead of latency
335 .\"O by spreading out pages and memory accesses to those pages across
337 .\"O However, accesses to a single page will still be limited to
338 .\"O the memory bandwidth of a single node.
340 ¤Ç¤Ï¡¢¥Ú¡¼¥¸³ä¤êÅö¤Æ¤ò
342 ¤Ë»ØÄꤵ¤ì¤¿¥Î¡¼¥É¤Î´Ö¤Ç¥Î¡¼¥É ID ¤Î¿ô»ú½ç¤Ç¸ò¸ß¤Ë¹Ô¤¦¡£
343 ¤³¤Î¥Ý¥ê¥·¡¼¤Ç¤Ï¡¢Ê£¿ô¤Î¥Î¡¼¥É¤Ë¥Ú¡¼¥¸¤ò¹¤²¤ÆÇÛÃÖ¤·¡¢¤³¤ì¤é¤Î¥Ú¡¼¥¸¤Ø¤Î¥á¥â¥ê
344 ¥¢¥¯¥»¥¹¤òʬ»¶¤¹¤ë¤³¤È¤Ç¡¢ÃÙ±ä¤Ç¤Ï¤Ê¤¯¡¢ÂÓ°è¤òºÇŬ²½¤¹¤ë¡£
345 ¤¿¤À¤·¡¢°ì¤Ä¤Î¥Ú¡¼¥¸¤Ø¤Î¥¢¥¯¥»¥¹¤Ë´Ø¤·¤Æ¤Ï°ÍÁ³¤È¤·¤Æ°ì¤Ä¤Î¥Î¡¼¥É¤Î¥á¥â¥êÂÓ°è
347 .\" NOTE: the following sentence doesn't make sense in the context
348 .\" of set_mempolicy() -- no memory area specified.
349 .\" To be effective the memory area should be fairly large,
350 .\" at least 1MB or bigger.
352 .\"O .B MPOL_PREFERRED
353 .\"O sets the preferred node for allocation.
354 .\"O The kernel will try to allocate pages from this node first
355 .\"O and fall back to "near by" nodes if the preferred node is low on free
359 .\"O specifies more than one node ID, the first node in the
360 .\"O mask will be selected as the preferred node.
365 .\"O arguments specify the empty set, then the policy
366 .\"O specifies "local allocation"
367 .\"O (like the system default policy discussed above).
369 ¤Ï¡¢³ä¤êÅö¤Æ»þ¤ËÍ¥À褵¤ì¤ë¥Î¡¼¥É (preferred node) ¤òÀßÄꤹ¤ë¡£
370 ¥«¡¼¥Í¥ë¤Ï¤Þ¤ºÍ¥Àè¥Î¡¼¥É¤«¤é¥Ú¡¼¥¸³ä¤êÅö¤Æ¤ò¹Ô¤ª¤¦¤È¤·¡¢
371 Í¥Àè¥Î¡¼¥É¤Ë¶õ¤¥á¥â¥ê¤¬¾¯¤Ê¤¤¾ì¹ç¤Ë¡Ö¶á¤¯¤Î (near by)¡×¥Î¡¼¥É¤«¤é
374 ¤ËÊ£¿ô¤Î¥Î¡¼¥É ID ¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¤Ï¡¢
376 Æâ¤ÎºÇ½é¤Î¥Î¡¼¥É¤¬Í¥Àè¥Î¡¼¥É¤È¤·¤ÆÁªÂò¤µ¤ì¤ë¡£
380 ¤Ç¶õ½¸¹ç¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¤Ï¡¢¥Ý¥ê¥·¡¼¤Ï (¾å½Ò¤Î¥·¥¹¥Æ¥à¤Î
381 ¥Ç¥Õ¥©¥ë¥È¥Ý¥ê¥·¡¼¤ÈƱÍͤË) ¡Ö¥í¡¼¥«¥ë¤«¤é¤Î³ä¤êÅö¤Æ¡×¤È¤Ê¤ë¡£
383 .\"O The process memory policy is preserved across an
385 .\"O and is inherited by child processes created using
389 ¥×¥í¥»¥¹¤Î¥á¥â¥ê¥Ý¥ê¥·¡¼¤Ï
395 ¤ò»È¤Ã¤ÆºîÀ®¤µ¤ì¤¿»Ò¥×¥í¥»¥¹¤Ë·Ñ¾µ¤µ¤ì¤ë¡£
396 .\"O .SH RETURN VALUE
399 .\"O .BR set_mempolicy ()
401 .\"O on error, \-1 is returned and
403 .\"O is set to indicate the error.
406 ¤Ï 0 ¤òÊÖ¤¹¡£¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
408 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹ÃͤòÀßÄꤹ¤ë¡£
413 .\"O Part of all of the memory range specified by
417 .\"O points outside your accessible address space.
418 .\"motoki: Part of all of the memory ¤Ï Part or all .. ¤Î´Ö°ã¤¤¡©
422 ¤Ç»ØÄꤵ¤ì¤¿¥á¥â¥êÎΰè¤Î°ìÉô¤Þ¤¿¤ÏÁ´Éô¤¬¡¢
423 ¸Æ¤Ó½Ð¤·¸µ¤¬¥¢¥¯¥»¥¹²Äǽ¤Ê¥¢¥É¥ì¥¹¶õ´Ö³°¤ò»Ø¤·¤Æ¤¤¤ë¡£
448 .\"O .B MPOL_INTERLEAVE
462 .\"O specifies more than a page worth of bits.
464 ¤Ç¼ÂºÝ¤Ë°ÕÌ£¤¬¤¢¤ë¥Ó¥Ã¥È¿ô¤è¤ê¿¤¯¤Î¥Ó¥Ã¥È¿ô¤¬»ØÄꤵ¤ì¤¿¡£
467 .\"O specifies one or more node IDs that are
468 .\"O greater than the maximum supported node ID.
470 ¤Ë¡¢¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ëºÇÂç¥Î¡¼¥É ID ¤è¤êÂ礤¤¥Î¡¼¥É¤¬»ØÄꤵ¤ì¤¿¡£
471 .\"O Or, none of the node IDs specified by
473 .\"O are on-line and allowed by the process's current cpuset context,
474 .\"O or none of the specified nodes contain memory.
476 ¤Ë¡¢¥ª¥ó¥é¥¤¥ó¤Ç¡¢¤«¤Ä¤½¤Î¥×¥í¥»¥¹¤Î¸½ºß¤Î CPU ½¸¹ç¥³¥ó¥Æ¥¥¹¥È¤Ç
477 µö²Ä¤µ¤ì¤Æ¤¤¤ë¥Î¡¼¥É¤¬°ì¤Ä¤â´Þ¤Þ¤ì¤Æ¤¤¤Ê¤¤¤«¡¢
478 ¥á¥â¥ê¤ò´Þ¤à¥Î¡¼¥É¤¬°ì¤Ä¤â»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¡£
481 .\"O argument specified both
482 .\"O .B MPOL_F_STATIC_NODES
484 .\"O .BR MPOL_F_RELATIVE_NODES .
487 .B MPOL_F_STATIC_NODES
489 .B MPOL_F_RELATIVE_NODES
493 .\"O Insufficient kernel memory was available.
494 ÍøÍѲÄǽ¤Ê¥«¡¼¥Í¥ë¥á¥â¥ê¤¬½½Ê¬¤Ç¤Ê¤«¤Ã¤¿¡£
498 .\"O .BR set_mempolicy (),
499 .\"O system call was added to the Linux kernel in version 2.6.7.
501 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¥Ð¡¼¥¸¥ç¥ó 2.6.7 ¤Ç Linux ¥«¡¼¥Í¥ë¤ËÄɲ䵤줿¡£
502 .\"O .SH CONFORMING TO
504 .\"O This system call is Linux-specific.
505 ¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï Linux Æȼ«¤Ç¤¢¤ë¡£
508 .\"O Process policy is not remembered if the page is swapped out.
509 ¥Ú¡¼¥¸¤¬¥¹¥ï¥Ã¥×¡¦¥¢¥¦¥È¤µ¤ì¤ë¾ì¹ç¤Ë¤Ï¡¢
510 ¥×¥í¥»¥¹¥Ý¥ê¥·¡¼¤ÎÀßÄê¤Ï¿ä¾©¤µ¤ì¤Ê¤¤¡£
511 .\"O When such a page is paged back in, it will use the policy of
512 .\"O the process or memory range that is in effect at the time the
513 .\"O page is allocated.
514 ¥¹¥ï¥Ã¥×¡¦¥¢¥¦¥È¤µ¤ì¤¿¥Ú¡¼¥¸¤¬¥Ú¡¼¥¸¡¦¥¤¥ó¤¹¤ëºÝ¤Ë¤â¡¢
515 ¥Ú¡¼¥¸³ä¤êÅö¤Æ»þ¤ËŬÍѤµ¤ì¤ë¥×¥í¥»¥¹¥Ý¥ê¥·¡¼¤ä¥á¥â¥êÎΰè¥Ý¥ê¥·¡¼¤¬
518 .\"O For information on library support, see
520 ¥é¥¤¥Ö¥é¥ê¤Ë¤è¤ë¥µ¥Ý¡¼¥È¤Ë¤Ä¤¤¤Æ¤Ï
525 .BR get_mempolicy (2),