.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright 2009 Intel Corporation .\" Author: Andi Kleen .\" Based on the move_pages manpage which was .\" This manpage is Copyright (C) 2006 Silicon Graphics, Inc. .\" Christoph Lameter .\" .\" 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. .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH MIGRATE_PAGES 2 2010\-11\-01 Linux "Linux Programmer's Manual" .SH 名前 migrate_pages \- move all pages in a process to another set of nodes .SH 書式 .nf \fB#include \fP .sp \fBlong migrate_pages(int \fP\fIpid\fP\fB, unsigned long \fP\fImaxnode,\fP \fB const unsigned long *\fP\fIold_nodes,\fP \fB const unsigned long *\fP\fInew_nodes);\fP .fi .sp \fI\-lnuma\fP とリンクする。 .SH 説明 \fBmigrate_pages\fP() moves all pages of the process \fIpid\fP that are in memory nodes \fIold_nodes\fP to the memory nodes in \fInew_nodes\fP. Pages not located in any node in \fIold_nodes\fP will not be migrated. As far as possible, the kernel maintains the relative topology relationship inside \fIold_nodes\fP during the migration to \fInew_nodes\fP. The \fIold_nodes\fP and \fInew_nodes\fP arguments are pointers to bit masks of node numbers, with up to \fImaxnode\fP bits in each mask. These masks are maintained as arrays of unsigned \fIlong\fP integers (in the last \fIlong\fP integer, the bits beyond those specified by \fImaxnode\fP are ignored). The \fImaxnode\fP argument is the maximum node number in the bit mask plus one (this is the same as in \fBmbind\fP(2), but different from \fBselect\fP(2)). The \fIpid\fP argument is the ID of the process whose pages are to be moved. To move pages in another process, the caller must be privileged (\fBCAP_SYS_NICE\fP) or the real or effective user ID of the calling process must match the real or saved\-set user ID of the target process. If \fIpid\fP is 0, then \fBmigrate_pages\fP() moves pages of the calling process. Pages shared with another process will only be moved if the initiating process has the \fBCAP_SYS_NICE\fP privilege. .SH 返り値 On success \fBmigrate_pages\fP() returns zero. On error, it returns \-1, and sets \fIerrno\fP to indicate the error. .SH エラー .TP \fBEPERM\fP Insufficient privilege (\fBCAP_SYS_NICE\fP) to move pages of the process specified by \fIpid\fP, or insufficient privilege (\fBCAP_SYS_NICE\fP) to access the specified target nodes. .TP \fBESRCH\fP .\" FIXME There are other errors No process matching \fIpid\fP could be found. .SH バージョン The \fBmigrate_pages\fP() system call first appeared on Linux in version 2.6.16. .SH 準拠 このシステムコールは Linux 固有である。 .SH 注意 ライブラリによるサポートについては \fBnuma\fP(7) を参照。 Use \fBget_mempolicy\fP(2) with the \fBMPOL_F_MEMS_ALLOWED\fP flag to obtain the set of nodes that are allowed by the calling process's cpuset. Note that this information is subject to change at any time by manual or automatic reconfiguration of the cpuset. Use of \fBmigrate_pages\fP() may result in pages whose location (node) violates the memory policy established for the specified addresses (see \fBmbind\fP(2)) and/or the specified process (see \fBset_mempolicy\fP(2)). That is, memory policy does not constrain the destination nodes used by \fBmigrate_pages\fP(). ヘッダファイル \fI\fP は glibc には含まれておらず、 \fIlibnuma\-devel\fP か同様のパッケージをインストールする必要がある。 .SH 関連項目 \fBget_mempolicy\fP(2), \fBmbind\fP(2), \fBset_mempolicy\fP(2), \fBnuma\fP(3), \fBnuma_maps\fP(5), \fBcpuset\fP(7), \fBnuma\fP(7), \fBmigratepages\fP(8), \fBnuma_stat\fP(8); .br the kernel source file \fIDocumentation/vm/page_migration\fP. .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.40 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。