1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" This manpage is Copyright (C) 2006 Silicon Graphics, Inc.
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
15 .\" FIXME Should programs normally be using this API directly, or should
16 .\" they rather be using interfaces in the numactl package?
17 .\" (e.g., compare with recommendation in mbind(2)).
19 .\" Japanese Version Copyright (c) 2008 Akihiro MOTOKI
20 .\" all rights reserved.
21 .\" Translated 2008-10-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
23 .TH MOVE_PAGES 2 2010-06-11 "Linux" "Linux Programmer's Manual"
26 .\"O move_pages \- move individual pages of a process to another node
27 move_pages \- あるプロセスの個々のページを別のノードに移動する
31 .B #include <numaif.h>
33 .BI "long move_pages(int " pid ", unsigned long count, void **" pages ,
34 .BI " const int *" nodes ", int *" status ", int " flags );
37 .\"O Link with \fI\-lnuma\fP.
41 .\"O .BR move_pages ()
42 .\"O moves the specified
46 .\"O to the memory nodes specified by
48 .\"O The result of the move is reflected in
52 .\"O indicate constraints on the pages to be moved.
65 では移動されるページに関する制約を指定する。
68 .\"O is the ID of the process in which pages are to be moved.
69 .\"O To move pages in another process,
70 .\"O the caller must be privileged
71 .\"O .RB ( CAP_SYS_NICE )
72 .\"O or the real or effective user ID of the calling process must match the
73 .\"O real or saved-set user ID of the target process.
77 .\"O .BR move_pages ()
78 .\"O moves pages of the calling process.
80 は、移動されるページが属するプロセスの ID である。
81 別のプロセスのページを移動するためには、呼び出し元が特権
83 を持っているか、呼び出したプロセスの実ユーザ ID か実効ユーザ ID が
84 ページ移動対象のプロセスの実ユーザ ID か保存 set-user-ID のどちらかと
92 .\"O is the number of pages to move.
93 .\"O It defines the size of the three arrays
108 .\"O is an array of pointers to the pages that should be moved.
109 .\"O These are pointers that should be aligned to page boundaries.
111 は、移動すべきページへのポインタの配列であり、
112 各ポインタはページ境界に揃えた値を指定すべきである。
113 .\" FIXME what if they are not aligned?
114 .\"O Addresses are specified as seen by the process specified by
117 で指定されたプロセスで見えるアドレスを指定する。
120 .\"O is an array of integers that specify the desired location for each page.
121 .\"O Each element in the array is a node number.
123 .\"O can also be NULL, in which case
124 .\"O .BR move_pages ()
125 .\"O does not move any pages but instead will return the node
126 .\"O where each page currently resides, in the
129 .\"O Obtaining the status of each page may be necessary to determine
130 .\"O pages that need to be moved.
132 は、各ページの希望の移動場所を示す整数値の配列であり、
135 には NULL を指定することもでき、この場合には
137 はどのページも移動しないが、各ページが現在配置されているノードを配列
139 に格納して返す。どのページを移動する必要があるかを判断するために、
143 .\"O is an array of integers that return the status of each page.
144 .\"O The array only contains valid values if
145 .\"O .BR move_pages ()
146 .\"O did not return an error.
148 は、各ページの状態を表す整数値の配列である。
154 .\"O specify what types of pages to move.
156 .\"O means that only pages that are in exclusive use by the process
157 .\"O are to be moved.
158 .\"O .B MPOL_MF_MOVE_ALL
159 .\"O means that pages shared between multiple processes can also be moved.
160 .\"O The process must be privileged
161 .\"O .RB ( CAP_SYS_NICE )
163 .\"O .BR MPOL_MF_MOVE_ALL .
165 には、どの種類のページを移動するかを指定する。
167 は、そのプロセスが排他的に使用しているページだけを移動することを意味する。
169 は、複数のプロセス間で共有されているページも移動できることを意味する。
174 .\"O .SH Page states in the status array
175 .SH status 配列に格納されるページ状態
176 .\"O The following values can be returned in each element of the
183 .\"O Identifies the node on which the page resides.
187 .\"O The page is mapped by multiple processes and can only be moved if
188 .\"O .B MPOL_MF_MOVE_ALL
190 そのページは複数のプロセスによりマップされており、
195 .\"O The page is currently busy and cannot be moved.
196 .\"O Try again later.
197 .\"O This occurs if a page is undergoing I/O or another kernel subsystem
198 .\"O is holding a reference to the page.
199 そのページが現在ビジーであり、移動できない。後でもう一度試すこと。
200 この状況は、ページが I/O の実行中であったり、カーネルの他のサブシステム
201 がそのページへの参照を保持している場合に発生する。
204 .\"O This is a zero page or the memory area is not mapped by the process.
205 そのページが zero page であるか、そのメモリ領域はそのプロセスにより
209 .\"O Unable to write back a page.
210 .\"O The page has to be written back
211 .\"O in order to move it since the page is dirty and the file system
212 .\"O does not provide a migration function that would allow the move
214 ページを書き戻す (write back) ことができない。
215 ページが dirty で、ファイルシステムが dirty なページを移動できるような
216 移動機能を提供していないため、そのページを移動するためにはページを
220 .\"O A dirty page cannot be moved.
221 .\"O The file system does not
222 .\"O provide a migration function and has no ability to write back pages.
224 ファイルシステムが dirty なページを移動するための機能を提供しておらず、
228 .\"O The page is not present.
232 .\"O Unable to allocate memory on target node.
233 移動先のノードでメモリを確保することができない。
234 .\"O .SH "RETURN VALUE"
237 .\"O .BR move_pages ()
242 .\" FIXME Is the following quite true: does the wrapper in numactl
243 .\" do the right thing?
244 .\"O On error, it returns \-1, and sets
246 .\"O to indicate the error.
254 .\"O Too many pages to move.
258 .\" FIXME Clarify "current cpuset". Is that the cpuset of the caller
260 .\"O One of the target nodes is not allowed by the current cpuset.
261 移動先のノードのいずれかが現在の CPU 集合では許可されていない。
264 .\"O Parameter array could not be accessed.
268 .\"O Flags other than
271 .\"O .B MPOL_MF_MOVE_ALL
272 .\"O was specified or an attempt was made to migrate pages of a kernel thread.
278 でもない値が指定されたか、カーネルスレッドのページを移動させようとした。
281 .\"O One of the target nodes is not online.
282 移動先のノードのいずれかがオンラインでない。
285 .\"O No pages were found that require moving.
286 .\"O All pages are either already
287 .\"O on the target node, not present, had an invalid address or could not be
288 .\"O moved because they were mapped by multiple processes.
289 移動が必要なページが全く見つからなかった。
290 指定された全てのページが、すでに移動先のノードに存在するか、存在しないか、
291 無効なアドレスであったか、複数のプロセスによってマップされていて移動でき
295 .\"O The caller specified
296 .\"O .B MPOL_MF_MOVE_ALL
297 .\"O without sufficient privileges
298 .\"O .RB ( CAP_SYS_NICE ).
299 .\"O Or, the caller attempted to move pages of a process belonging
300 .\"O to another user but did not have privilege to do so
301 .\"O .RB ( CAP_SYS_NICE ).
307 または、呼び出し元が他のユーザに属するプロセスのページを移動しようとしたが、
313 .\"O Process does not exist.
317 .\"O .BR move_pages ()
318 .\"O first appeared on Linux in version 2.6.18.
320 は、バージョン 2.6.18 で初めて Linux に登場した。
321 .\"O .SH CONFORMING TO
323 .\"O This system call is Linux-specific.
324 このシステムコールは Linux 固有である。
327 .\"O For information on library support, see
334 .\"O .BR get_mempolicy (2)
336 .\"O .B MPOL_F_MEMS_ALLOWED
337 .\"O flag to obtain the set of nodes that are allowed by
338 .\" FIXME Clarify "current cpuset". Is that the cpuset of the caller
340 .\"O the current cpuset.
341 .\"O Note that this information is subject to change at any
342 .\"O time by manual or automatic reconfiguration of the cpuset.
343 現在の CPU 集合で許可されているノードの集合を取得するには、フラグ
344 .B MPOL_F_MEMS_ALLOWED
346 .BR get_mempolicy (2)
348 取得した情報は、CPU 集合の手動または自動での再構成により
351 .\"O Use of this function may result in pages whose location
352 .\"O (node) violates the memory policy established for the
353 .\"O specified addresses (See
355 .\"O and/or the specified process (See
356 .\"O .BR set_mempolicy (2)).
357 .\"O That is, memory policy does not constrain the destination
359 .\"O .BR move_pages ().
360 この関数を使用すると、ページの位置 (ノード) が
361 指定されたアドレスに対して設定されたメモリポリシー
363 参照) や指定されたプロセスに対して設定されたメモリポリシー
364 .RB ( set_mempolicy (2)
368 で使われる移動先ノードを制限しないということである。
372 .\"O header is not included with glibc, but requires installing
373 .\"O .I libnuma-devel
374 .\"O or a similar package.
379 か同様のパッケージをインストールする必要がある。
382 .BR get_mempolicy (2),
384 .BR set_mempolicy (2),
389 .BR migratepages (8),