OSDN Git Service

LDP: Address fuzzy changes (numa)
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man2 / migrate_pages.2
1 .\" Copyright 2009 Intel Corporation
2 .\"                Author: Andi Kleen
3 .\" Based on the move_pages manpage which was
4 .\" This manpage is Copyright (C) 2006 Silicon Graphics, Inc.
5 .\"                               Christoph Lameter
6 .\"
7 .\" %%%LICENSE_START(VERBATIM_TWO_PARA)
8 .\" Permission is granted to make and distribute verbatim copies of this
9 .\" manual provided the copyright notice and this permission notice are
10 .\" preserved on all copies.
11 .\"
12 .\" Permission is granted to copy and distribute modified versions of this
13 .\" manual under the conditions for verbatim copying, provided that the
14 .\" entire resulting derived work is distributed under the terms of a
15 .\" permission notice identical to this one.
16 .\" %%%LICENSE_END
17 .\"
18 .\"*******************************************************************
19 .\"
20 .\" This file was generated with po4a. Translate the source file.
21 .\"
22 .\"*******************************************************************
23 .\"
24 .\" Japanese Version Copyright (c) 2012  Akihiro MOTOKI
25 .\"         all rights reserved.
26 .\" Translated 2012-05-10, Akihiro MOTOKI <amotoki@gmail.com>
27 .\" Updated 2013-03-26, Akihiro MOTOKI <amotoki@gmail.com>
28 .\"
29 .TH MIGRATE_PAGES 2 2019\-03\-06 Linux "Linux Programmer's Manual"
30 .SH 名前
31 migrate_pages \- プロセスの全ページを別のノード集合に移動する
32 .SH 書式
33 .nf
34 \fB#include <numaif.h>\fP
35 .PP
36 \fBlong migrate_pages(int \fP\fIpid\fP\fB, unsigned long \fP\fImaxnode,\fP
37 \fB                   const unsigned long *\fP\fIold_nodes,\fP
38 \fB                   const unsigned long *\fP\fInew_nodes\fP\fB);\fP
39 .fi
40 .PP
41 \fI\-lnuma\fP とリンクする。
42 .SH 説明
43 \fBMIGRATE_PAGES\fP() は、メモリーノード \fIold_nodes\fP にあるプロセス \fIpid\fP
44 の全ページを、メモリーノード \fInew_nodes\fP に移動しようとする。\fIold_nodes\fP で
45 指定されたメモリーノードに置かれていないページは移動されない。
46 カーネルは、 \fInew_nodes\fP への移動の際に、 \fIold_nodes\fP 内の相対的な
47 トポロジー関係を可能な限り維持しようとする。
48 .PP
49 引き数 \fIold_nodes\fP と \fInew_nodes\fP は、最大で \fImaxnode\fP ビットから
50 構成されるノード番号のビットマスクへのポインターである。
51 各ビットマスクは符号なし \fIlong\fP 整数の配列として管理される
52 (\fImaxnode\fP で指定された長さを越えた部分のビットは無視される)。
53 引き数 \fImaxnode\fP は最大ノード番号であり、ビットマスクの長さに 1 を
54 加えた値となる (これは \fBmbind\fP(2) と同じだが、 \fBselect\fP(2) とは違う)。
55 .PP
56 引き数 \fIpid\fP は、移動を行うページの所有者のプロセス ID である。
57 別のプロセスのページを移動するには、呼び出したプロセスが特権
58 (\fBCAP_SYS_NICE\fP) を持っているか、呼び出したプロセスの実ユーザー ID か
59 実効ユーザー ID がページ移動の対象プロセスの実ユーザー ID か saved\-set
60 ユーザー ID と一致していなければならない。\fIpid\fP が 0 の場合、
61 \fBmigrate_pages\fP() は呼び出したプロセスのページを移動する。
62 .PP
63 別のプロセスと共有しているページは、呼び出したプロセスが
64 \fBCAP_SYS_NICE\fP 特権を持っている場合にのみ移動される。
65 .SH 返り値
66 \fBmigrate_pages\fP() は、移動できなかったページ数を返す
67 (つまり、移動に成功した場合は返り値は 0 となる)。
68 エラーの場合、 \-1 を返し、 \fIerrno\fP にエラーを示す値を設定する。
69 .SH エラー
70 .TP 
71 \fBEFAULT\fP
72 \fIold_nodes\fP/\fInew_nodes\fP と \fImaxnode\fP で指定されたメモリー領域の一部または全部が、
73 呼び出し元がアクセス可能なアドレス空間外を指している。
74 .TP 
75 \fBEINVAL\fP
76 .\" As at 3.5, this limit is "a page worth of bits", e.g.,
77 .\" 8 * 4096 bits, assuming a 4kB page size.
78 The value specified by \fImaxnode\fP exceeds a kernel\-imposed limit.  Or,
79 \fIold_nodes\fP or \fInew_nodes\fP specifies one or more node IDs that are greater
80 than the maximum supported node ID.  Or, none of the node IDs specified by
81 \fInew_nodes\fP are on\-line and allowed by the process's current cpuset
82 context, or none of the specified nodes contain memory.
83 .TP 
84 \fBEPERM\fP
85 \fIpid\fP で指定されたプロセスのページを移動するのに必要な特権
86 (\fBCAP_SYS_NICE\fP) がなかった。または、指定された対象ノードにアクセス
87 するのに必要な権限 (\fBCAP_SYS_NICE\fP) がなかった。
88 .TP 
89 \fBESRCH\fP
90 .\" FIXME Document the other errors that can occur for migrate_pages()
91 プロセス ID が \fIpid\fP のプロセスが見つからなかった。
92 .SH バージョン
93 \fBmigrate_pages\fP() システムコールは Linux 2.6.16 で初めて登場した。
94 .SH 準拠
95 このシステムコールは Linux 固有である。
96 .SH 注意
97 ライブラリによるサポートについては \fBnuma\fP(7)  を参照。
98 .PP
99 呼び出し元プロセスの CPU 集合で許可されているノード集合を取得するには、
100 \fBMPOL_F_MEMS_ALLOWED\fP フラグを付けて \fBget_mempolicy\fP(2) を使うこと。
101 この情報は、手動/自動に限らず CPU 集合の再構成によりいつでも
102 変更されることがある点に注意してほしい。
103 .PP
104 \fBmigrate_pages\fP を使用すると、ページが置かれる場所 (ノード) が、指定
105 されたアドレスに対して設定されたメモリーポリシー (\fBmbind\fP(2) 参照) や
106 指定されたプロセスに対して設定されたメモリーポリシー
107 (\fBset_mempolicy\fP(2) 参照) に違反する状況になる可能性がある。
108 すなわち、メモリーポリシーによる制約は \fBmigrate_pages\fP() による移動先
109 ノードの選択には適用されないということである。
110 .PP
111 ヘッダーファイル \fI<numaif.h>\fP は glibc には含まれておらず、 \fIlibnuma\-devel\fP
112 か同様のパッケージをインストールする必要がある。
113 .SH 関連項目
114 \fBget_mempolicy\fP(2), \fBmbind\fP(2), \fBset_mempolicy\fP(2), \fBnuma\fP(3),
115 \fBnuma_maps\fP(5), \fBcpuset\fP(7), \fBnuma\fP(7), \fBmigratepages\fP(8),
116 \fBnumastat\fP(8)
117 .PP
118 Linux カーネルソースの \fIDocumentation/vm/page_migration.rst\fP
119 .SH この文書について
120 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は
121 \%https://www.kernel.org/doc/man\-pages/ に書かれている。