OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man2 / mbind.2
index 1a8d406..d0dc863 100644 (file)
@@ -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.
 .\"
 .\" 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 <Lee.Schermerhorn@hp.com>
 .\"    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 <a.p.zijlstra@chello.nl>
+.\"                Date:   Thu Oct 25 14:16:28 2012 +0200
+.\"
+.\"                commit f2a07f40dbc603c15f8b06e6ec7f768af67b424f
+.\"                Author: Hugh Dickins <hughd@google.com>
+.\"                Date:   Wed Jan 2 02:01:33 2013 -0800
+.\"
+.\"        MPOL_MF_LAZY
+.\"                commit b24f53a0bea38b266d219ee651b22dba727c44ae
+.\"                Author: Lee Schermerhorn <lee.schermerhorn@hp.com>
+.\"                Date:   Thu Oct 25 14:16:32 2012 +0200
+.\"
+.TH MBIND 2 2015-01-22 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 <numaif.h>"
 .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
@@ -303,7 +323,10 @@ Part or all of the memory range specified by
 and
 .I maxnode
 points outside your accessible address space.
-Or, there was an unmapped hole in the specified memory range.
+Or, there was an unmapped hole in the specified memory range specified by
+.IR addr
+and
+.IR len .
 .TP
 .B EINVAL
 An invalid value was specified for
@@ -386,7 +409,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 +456,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 +468,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.79 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/.