1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
|
.\" Copyright 2003,2004 Andi Kleen, SuSE Labs.
.\"
.\" 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.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" 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.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" 2006-02-03, mtk, substantial wording changes and other improvements
.\"
.\" Translated 2006-08-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.39
.\" Updated 2007-01-07, Akihiro MOTOKI, LDP v2.43
.\"
.\"WORD: anonymous memory ̵̾
.\"
.TH SET_MEMPOLICY 2 2006-02-07 "Linux" "Linux Programmer's Manual"
.SH ̾
set_mempolicy \- ץȤλҥץ NUMA
ǥեȥݥꥷꤹ
.SH
.nf
.B "#include <numaif.h>"
.sp
.BI "int set_mempolicy(int " policy ", unsigned long *" nodemask ,
.BI " unsigned long " maxnode );
.fi
.SH
.BR set_mempolicy ()
ϡƤӽФץ NUMA ݥꥷ
.I policy
ꤹ롣
NUMA (оΥꥢ) ޥǤϡCPU ˤ
ꥳȥ餬ۤʤꡢΥۤʤäƤ롣
ݥꥷϡɤΥΡɤΥΥץ
Ƥ뤫ΤǤ롣
.BR set_mempolicy ()
ϡץΥǥեȤΥݥꥷ롣
ˡ
.BR mbind (2)
ȤäơΥΰФƥݥꥷꤹ뤳ȤǤ롣
ꤷݥꥷϡץ˿ΥڡƤȤˤΤ
ŬѤ롣̵̾ (anonymous memory) ξ硢ڡγƤ
ץꥱƥڡ˥ݤ˹Ԥ롣
ǽʥݥꥷ
.BR MPOL_DEFAULT ,
.BR MPOL_BIND ,
.BR MPOL_INTERLEAVE ,
.BR MPOL_PREFERRED
Ǥ롣
.B MPOL_DEFAULT
ʳΥݥꥷξ硢ƤӽФ
.I nodemask
ѥǥݥꥷŬѤΡɤꤹɬפ롣
.I nodemask
ϥΡɤɽӥåȥեɤؤΥݥǤꡢ
.I maxnode
ĤΥӥåȤ鹽롣
ӥåȥեɤ礭ϡľ
.I "sizeof(unsigned long)"
ܿڤ夲뤬ͥ뤬ѤΤ
.I maxnode
ĤޤǤΥӥåȤǤ롣
.B MPOL_DEFAULT
ݥꥷǥեȤǤꡢꤹȥΥ꤬
Ƥ롢ĤޤƤΤäȤʤä CPU
Ρɤ˥꤬Ƥ롣
.I nodemask
ˤ NULL ꤹ٤Ǥ롣
.B MPOL_BIND
ϸݥꥷǡƤ
.I nodemask
˻ꤵ줿Ρɤ˸ꤵ롣
¾ΥΡɤؤγƤϹԤʤ
.B MPOL_INTERLEAVE
ǤϡƤ
.I nodemask
˻ꤵ줿Ρɤ˸ߤ˹Ԥ
ΥݥꥷǤϡٱǤϤʤӰ褬Ŭ롣
̤ˤϡΰ礭٤Ǥꡢ
ʤȤ 1MB ʾɬפǤ롣
.B MPOL_PREFERRED
ϡƻͥ褵Ρɤꤹ롣
ͥϤޤͥΡɤ˳ƤԤȤ
ͥΡɤ˶꤬ʤ¾ΥΡɤ˳ƤԤ
.I nodemask
κǽΥΡɤѤ롣
.I nodemask
ˤɤΥΡɤ⥻åȤƤʤС
.RB ( MPOL_DEFAULT
Ʊ褦) ƤΤäȤʤä
CPU ΥΡɤ˥ƤԤ롣
ݥꥷ
.BR execve (2)
ݻ졢
.BR fork (2)
.BR clone (2)
Ȥäƺ줿ҥץ˷Ѿ롣
.SH ֤
ȡ
.BR set_mempolicy ()
0 ֤顼ξ硢\-1 ֤
.I errno
˥顼ͤꤹ롣
.\" .SH 顼
.\" FIXME no errors are listed on this page
.\" .
.\" .TP
.\" .B EINVAL
.\" .I mode
.\" Ǥ롣
.SH
Υƥॳ Linux ȼǤ롣
.SH
ڡåסȤˤϡ
ץݥꥷϿ侩ʤ
.SS Сȥ饤֥Ǥб
.BR mbind (2)
ȡ
.SH Ϣ
.BR mbind (2),
.BR get_mempolicy (2),
.BR numactl (8),
.BR numa (3)
|