OSDN Git Service

(split) LDP: Release pages for LDP v3.39.
[linuxjm/LDP_man-pages.git] / release / man2 / migrate_pages.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright 2009 Intel Corporation
4 .\"                Author: Andi Kleen
5 .\" Based on the move_pages manpage which was
6 .\" This manpage is Copyright (C) 2006 Silicon Graphics, Inc.
7 .\"                               Christoph Lameter
8 .\"
9 .\" Permission is granted to make and distribute verbatim copies of this
10 .\" manual provided the copyright notice and this permission notice are
11 .\" preserved on all copies.
12 .\"
13 .\" Permission is granted to copy and distribute modified versions of this
14 .\" manual under the conditions for verbatim copying, provided that the
15 .\" entire resulting derived work is distributed under the terms of a
16 .\" permission notice identical to this one.
17 .\"*******************************************************************
18 .\"
19 .\" This file was generated with po4a. Translate the source file.
20 .\"
21 .\"*******************************************************************
22 .TH MIGRATE_PAGES 2 2010\-11\-01 Linux "Linux Programmer's Manual"
23 .SH 名前
24 migrate_pages \- move all pages in a process to another set of nodes
25 .SH 書式
26 .nf
27 \fB#include <numaif.h>\fP
28 .sp
29 \fBlong migrate_pages(int \fP\fIpid\fP\fB, unsigned long \fP\fImaxnode,\fP
30 \fB                   const unsigned long *\fP\fIold_nodes,\fP
31 \fB                   const unsigned long *\fP\fInew_nodes);\fP
32 .fi
33 .sp
34 \fI\-lnuma\fP とリンクする。
35 .SH 説明
36 \fBmigrate_pages\fP()  moves all pages of the process \fIpid\fP that are in memory
37 nodes \fIold_nodes\fP to the memory nodes in \fInew_nodes\fP.  Pages not located
38 in any node in \fIold_nodes\fP will not be migrated.  As far as possible, the
39 kernel maintains the relative topology relationship inside \fIold_nodes\fP
40 during the migration to \fInew_nodes\fP.
41
42 The \fIold_nodes\fP and \fInew_nodes\fP arguments are pointers to bit masks of
43 node numbers, with up to \fImaxnode\fP bits in each mask.  These masks are
44 maintained as arrays of unsigned \fIlong\fP integers (in the last \fIlong\fP
45 integer, the bits beyond those specified by \fImaxnode\fP are ignored).  The
46 \fImaxnode\fP argument is the maximum node number in the bit mask plus one
47 (this is the same as in \fBmbind\fP(2), but different from \fBselect\fP(2)).
48
49 The \fIpid\fP argument is the ID of the process whose pages are to be moved.
50 To move pages in another process, the caller must be privileged
51 (\fBCAP_SYS_NICE\fP)  or the real or effective user ID of the calling process
52 must match the real or saved\-set user ID of the target process.  If \fIpid\fP
53 is 0, then \fBmigrate_pages\fP()  moves pages of the calling process.
54
55 Pages shared with another process will only be moved if the initiating
56 process has the \fBCAP_SYS_NICE\fP privilege.
57 .SH 返り値
58 On success \fBmigrate_pages\fP()  returns zero.  On error, it returns \-1, and
59 sets \fIerrno\fP to indicate the error.
60 .SH エラー
61 .TP 
62 \fBEPERM\fP
63 Insufficient privilege (\fBCAP_SYS_NICE\fP)  to move pages of the process
64 specified by \fIpid\fP, or insufficient privilege (\fBCAP_SYS_NICE\fP)  to access
65 the specified target nodes.
66 .TP 
67 \fBESRCH\fP
68 .\" FIXME There are other errors
69 No process matching \fIpid\fP could be found.
70 .SH バージョン
71 The \fBmigrate_pages\fP()  system call first appeared on Linux in version
72 2.6.16.
73 .SH 準拠
74 このシステムコールは Linux 固有である。
75 .SH 注意
76 ライブラリによるサポートについては \fBnuma\fP(7)  を参照。
77
78 Use \fBget_mempolicy\fP(2)  with the \fBMPOL_F_MEMS_ALLOWED\fP flag to obtain the
79 set of nodes that are allowed by the calling process's cpuset.  Note that
80 this information is subject to change at any time by manual or automatic
81 reconfiguration of the cpuset.
82
83 Use of \fBmigrate_pages\fP()  may result in pages whose location (node)
84 violates the memory policy established for the specified addresses (see
85 \fBmbind\fP(2))  and/or the specified process (see \fBset_mempolicy\fP(2)).  That
86 is, memory policy does not constrain the destination nodes used by
87 \fBmigrate_pages\fP().
88
89 ヘッダファイル \fI<numaif.h>\fP は glibc には含まれておらず、 \fIlibnuma\-devel\fP
90 か同様のパッケージをインストールする必要がある。
91 .SH 関連項目
92 \fBget_mempolicy\fP(2), \fBmbind\fP(2), \fBset_mempolicy\fP(2), \fBnuma\fP(3),
93 \fBnuma_maps\fP(5), \fBcpuset\fP(7), \fBnuma\fP(7), \fBmigratepages\fP(8),
94 \fBnuma_stat\fP(8);
95 .br
96 the kernel source file \fIDocumentation/vm/page_migration\fP.