summaryrefslogtreecommitdiffstats
path: root/upstream/debian-unstable/man2/mbind.2
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
commit4ad94864781f48b1a4b77f9cfb934622bf756ba1 (patch)
tree3900955c1886e6d2570fea7125ee1f01bafe876d /upstream/debian-unstable/man2/mbind.2
parentAdding upstream version 4.22.0. (diff)
downloadmanpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.tar.xz
manpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.zip
Adding upstream version 4.23.0.upstream/4.23.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/debian-unstable/man2/mbind.2')
-rw-r--r--upstream/debian-unstable/man2/mbind.271
1 files changed, 53 insertions, 18 deletions
diff --git a/upstream/debian-unstable/man2/mbind.2 b/upstream/debian-unstable/man2/mbind.2
index 064b8a1f..45bf077b 100644
--- a/upstream/debian-unstable/man2/mbind.2
+++ b/upstream/debian-unstable/man2/mbind.2
@@ -15,7 +15,7 @@
.\" Author: Lee Schermerhorn <lee.schermerhorn@hp.com>
.\" Date: Thu Oct 25 14:16:32 2012 +0200
.\"
-.TH mbind 2 2023-07-16 "Linux man-pages 6.05.01"
+.TH mbind 2 2024-05-02 "Linux man-pages 6.8"
.SH NAME
mbind \- set memory policy for a memory range
.SH LIBRARY
@@ -24,7 +24,7 @@ NUMA (Non-Uniform Memory Access) policy library
.SH SYNOPSIS
.nf
.B "#include <numaif.h>"
-.PP
+.P
.BI "long mbind(void " addr [. len "], unsigned long " len ", int " mode ,
.BI " const unsigned long " nodemask [(. maxnode " + ULONG_WIDTH - 1)"
.B " / ULONG_WIDTH],"
@@ -40,7 +40,7 @@ and continuing for
.I len
bytes.
The memory policy defines from which node memory is allocated.
-.PP
+.P
If the memory range specified by the
.IR addr " and " len
arguments includes an "anonymous" region of memory\[em]that is
@@ -62,7 +62,7 @@ an initial read access will allocate pages according to the
memory policy of the thread that causes the page to be allocated.
This may not be the thread that called
.BR mbind ().
-.PP
+.P
The specified policy will be ignored for any
.B MAP_SHARED
mappings in the specified memory range.
@@ -70,7 +70,7 @@ Rather the pages will be allocated according to the memory policy
of the thread that caused the page to be allocated.
Again, this may not be the thread that called
.BR mbind ().
-.PP
+.P
If the specified memory range includes a shared memory region
created using the
.BR shmget (2)
@@ -87,7 +87,7 @@ the huge pages will be allocated according to the policy specified
only if the page allocation is caused by the process that calls
.BR mbind ()
for that region.
-.PP
+.P
By default,
.BR mbind ()
has an effect only for new allocations; if the pages inside
@@ -98,13 +98,14 @@ This default behavior may be overridden by the
and
.B MPOL_MF_MOVE_ALL
flags described below.
-.PP
+.P
The
.I mode
argument must specify one of
.BR MPOL_DEFAULT ,
.BR MPOL_BIND ,
.BR MPOL_INTERLEAVE ,
+.BR MPOL_WEIGHTED_INTERLEAVE ,
.BR MPOL_PREFERRED ,
or
.B MPOL_LOCAL
@@ -115,7 +116,7 @@ require the caller to specify the node or nodes to which the mode applies,
via the
.I nodemask
argument.
-.PP
+.P
The
.I mode
argument may also include an optional
@@ -124,6 +125,23 @@ The supported
.I "mode flags"
are:
.TP
+.BR MPOL_F_NUMA_BALANCING " (since Linux 5.15)"
+.\" commit bda420b985054a3badafef23807c4b4fa38a3dff
+.\" commit 6d2aec9e123bb9c49cb5c7fc654f25f81e688e8c
+When
+.I mode
+is
+.BR MPOL_BIND ,
+enable the kernel NUMA balancing for the task if it is supported by the kernel.
+If the flag isn't supported by the kernel, or is used with
+.I mode
+other than
+.BR MPOL_BIND ,
+\-1 is returned and
+.I errno
+is set to
+.BR EINVAL .
+.TP
.BR MPOL_F_STATIC_NODES " (since Linux-2.6.26)"
A nonempty
.I nodemask
@@ -139,7 +157,7 @@ A nonempty
.I nodemask
specifies node IDs that are relative to the set of
node IDs allowed by the thread's current cpuset.
-.PP
+.P
.I nodemask
points to a bit mask of nodes containing up to
.I maxnode
@@ -167,7 +185,7 @@ allowed by the thread's current cpuset context
.B MPOL_F_STATIC_NODES
mode flag is specified),
and contains memory.
-.PP
+.P
The
.I mode
argument must include one of the following values:
@@ -226,6 +244,23 @@ at least 1\ MB or bigger with a fairly uniform access pattern.
Accesses to a single page of the area will still be limited to
the memory bandwidth of a single node.
.TP
+.BR MPOL_WEIGHTED_INTERLEAVE " (since Linux 6.9)"
+.\" commit fa3bea4e1f8202d787709b7e3654eb0a99aed758
+This mode interleaves page allocations across the nodes specified in
+.I nodemask
+according to the weights in
+.IR /sys/kernel/mm/mempolicy/weighted_interleave .
+For example, if bits 0, 2, and 5 are set in
+.IR nodemask ,
+and the contents of
+.IR /sys/kernel/mm/mempolicy/weighted_interleave/node0 ,
+.IR /sys/ .\|.\|. /node2 ,
+and
+.IR /sys/ .\|.\|. /node5
+are 4, 7, and 9, respectively,
+then pages in this region will be allocated on nodes 0, 2, and 5
+in a 4:7:9 ratio.
+.TP
.B MPOL_PREFERRED
This mode sets the preferred node for allocation.
The kernel will try to allocate pages from this
@@ -265,7 +300,7 @@ By contrast,
reverts to the memory policy of the thread (which may be set via
.BR set_mempolicy (2));
that policy may be something other than "local allocation".
-.PP
+.P
If
.B MPOL_MF_STRICT
is passed in
@@ -281,7 +316,7 @@ if the existing pages in the memory range don't follow the policy.
.\" --Lee Schermerhorn
.\" In Linux 2.6.16 or later the kernel will also try to move pages
.\" to the requested node with this flag.
-.PP
+.P
If
.B MPOL_MF_MOVE
is specified in
@@ -299,7 +334,7 @@ If the
policy was specified,
pages already residing on the specified nodes
will not be moved such that they are interleaved.
-.PP
+.P
If
.B MPOL_MF_MOVE_ALL
is passed in
@@ -417,16 +452,16 @@ privilege.
Linux.
.SH HISTORY
Linux 2.6.7.
-.PP
+.P
Support for huge page policy was added with Linux 2.6.16.
For interleave policy to be effective on huge page mappings the
policied memory needs to be tens of megabytes or larger.
-.PP
+.P
Before Linux 5.7.
.\" commit dcf1763546d76c372f3136c8d6b2b6e77f140cf0
.B MPOL_MF_STRICT
was ignored on huge page mappings.
-.PP
+.P
.B MPOL_MF_MOVE
and
.B MPOL_MF_MOVE_ALL
@@ -434,12 +469,12 @@ are available only on Linux 2.6.16 and later.
.SH NOTES
For information on library support, see
.BR numa (7).
-.PP
+.P
NUMA policy is not supported on a memory-mapped file range
that was mapped with the
.B MAP_SHARED
flag.
-.PP
+.P
The
.B MPOL_DEFAULT
mode can have different effects for