X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=original%2Fman2%2Fmbind.2;h=cc1676695215061ff35966c420e17e7a8ead9cc0;hb=110dba020f489b75aff2497105f7970c05e2b87c;hp=1a8d406eb14b83733ac54bbe8ccefa3f240de922;hpb=4b904a2f7904198bf8397efd8c787e1e512992a5;p=linuxjm%2FLDP_man-pages.git diff --git a/original/man2/mbind.2 b/original/man2/mbind.2 index 1a8d406e..cc167669 100644 --- a/original/man2/mbind.2 +++ b/original/man2/mbind.2 @@ -1,6 +1,7 @@ .\" Copyright 2003,2004 Andi Kleen, SuSE Labs. .\" and Copyright 2007 Lee Schermerhorn, Hewlett Packard .\" +.\" %%%LICENSE_START(VERBATIM_PROF) .\" 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. @@ -17,21 +18,40 @@ .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. +.\" %%%LICENSE_END .\" .\" 2006-02-03, mtk, substantial wording changes and other improvements .\" 2007-08-27, Lee Schermerhorn .\" more precise specification of behavior. .\" -.TH MBIND 2 2008-08-15 Linux "Linux Programmer's Manual" +.\" FIXME +.\" Linux 3.8 added the following, which need to be documented. +.\" And do they also apply for move_pages()? +.\" +.\" MPOL_LOCAL +.\" commit 479e2802d09f1e18a97262c4c6f8f17ae5884bd8 +.\" Author: Peter Zijlstra +.\" Date: Thu Oct 25 14:16:28 2012 +0200 +.\" +.\" commit f2a07f40dbc603c15f8b06e6ec7f768af67b424f +.\" Author: Hugh Dickins +.\" Date: Wed Jan 2 02:01:33 2013 -0800 +.\" +.\" MPOL_MF_LAZY +.\" commit b24f53a0bea38b266d219ee651b22dba727c44ae +.\" Author: Lee Schermerhorn +.\" Date: Thu Oct 25 14:16:32 2012 +0200 +.\" +.TH MBIND 2 2014-05-10 Linux "Linux Programmer's Manual" .SH NAME -mbind \- Set memory policy for a memory range +mbind \- set memory policy for a memory range .SH SYNOPSIS .nf .B "#include " .sp -.BI "int mbind(void *" addr ", unsigned long " len ", int " mode , -.BI " unsigned long *" nodemask ", unsigned long " maxnode , -.BI " unsigned " flags ); +.BI "long mbind(void *" addr ", unsigned long " len ", int " mode , +.BI " const unsigned long *" nodemask ", unsigned long " maxnode , +.BI " unsigned " flags ); .sp Link with \fI\-lnuma\fP. .fi @@ -53,11 +73,11 @@ a region of memory created using the .BR mmap (2) system call with the .BR MAP_ANONYMOUS \(emor -a memory mapped file, mapped using the +a memory-mapped file, mapped using the .BR mmap (2) system call with the .B MAP_PRIVATE -flag, pages will only be allocated according to the specified +flag, pages will be allocated only according to the specified policy when the application writes [stores] to the page. For anonymous regions, an initial read access will use a shared page in the kernel containing all zeros. @@ -95,7 +115,7 @@ for that region. By default, .BR mbind () -only has an effect for new allocations; if the pages inside +has an effect only for new allocations; if the pages inside the range have been already touched before setting the policy, then the policy has no effect. This default behavior may be overridden by the @@ -109,7 +129,7 @@ The argument must specify one of .BR MPOL_DEFAULT , .BR MPOL_BIND , -.B MPOL_INTERLEAVE +.BR MPOL_INTERLEAVE , or .BR MPOL_PREFERRED . All policy modes except @@ -144,12 +164,12 @@ specifies node ids that are relative to the set of node ids allowed by the process's current cpuset. .PP .I nodemask -points to a bitmask of nodes containing up to +points to a bit mask of nodes containing up to .I maxnode bits. The bit mask size is rounded to the next multiple of .IR "sizeof(unsigned long)" , -but the kernel will only use bits up to +but the kernel will use bits only up to .IR maxnode . A NULL value of .I nodemask @@ -386,7 +406,7 @@ This system call is Linux-specific. For information on library support, see .BR numa (7). -NUMA policy is not supported on a memory mapped file range +NUMA policy is not supported on a memory-mapped file range that was mapped with the .B MAP_SHARED flag. @@ -433,7 +453,7 @@ is ignored on huge page mappings. .B MPOL_MF_MOVE and .B MPOL_MF_MOVE_ALL -are only available on Linux 2.6.16 and later. +are available only on Linux 2.6.16 and later. .SH SEE ALSO .BR get_mempolicy (2), .BR getcpu (2), @@ -445,3 +465,12 @@ are only available on Linux 2.6.16 and later. .BR cpuset (7), .BR numa (7), .BR numactl (8) +.SH COLOPHON +This page is part of release 3.68 of the Linux +.I man-pages +project. +A description of the project, +information about reporting bugs, +and the latest version of this page, +can be found at +\%http://www.kernel.org/doc/man\-pages/.