]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man2/: Add MPOL_WEIGHTED_INTERLEAVE documentation
authorSvetly Todorov <svetly.todorov@memverge.com>
Tue, 23 Apr 2024 23:36:56 +0000 (16:36 -0700)
committerAlejandro Colomar <alx@kernel.org>
Thu, 25 Apr 2024 23:04:04 +0000 (01:04 +0200)
Add documentation for the new MPOL_WEIGHTED_INTERLEAVE mode in the same
manual pages that mention MPOL_INTERLEAVE; namely, mbind(2),
set_mempolicy(2), and get_mempolicy(2).

Descriptions were based on the changes introduced in this patch:
<https://lore.kernel.org/all/20240202170238.90004-4-gregory.price@memverge.com/>

Which was upstreamed to 6.9 here:
<https://lore.kernel.org/linux-mm/20240313200532.34e4cff216acd3db8def4637@linux-foundation.org/>

Cc: gregory.price@memverge.com
Reviewed-by: "Huang, Ying" <ying.huang@intel.com>
Signed-off-by: Svetly Todorov <svetly.todorov@memverge.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man2/get_mempolicy.2
man2/mbind.2
man2/set_mempolicy.2

index 5248f04bacd3c118c6df2679fe0ba63549b85484..f6f80ab3ef57984d176e53d360e0145cd816c990 100644 (file)
@@ -137,7 +137,9 @@ specifies
 but not
 .BR MPOL_F_ADDR ,
 and the thread's current policy is
-.BR MPOL_INTERLEAVE ,
+.B MPOL_INTERLEAVE
+or
+.BR MPOL_WEIGHTED_INTERLEAVE ,
 then
 .BR get_mempolicy ()
 will return in the location pointed to by a non-NULL
@@ -205,8 +207,10 @@ specified
 .B MPOL_F_NODE
 but not
 .B MPOL_F_ADDR
-and the current thread policy is not
-.BR MPOL_INTERLEAVE .
+and the current thread policy is neither
+.B MPOL_INTERLEAVE
+nor
+.BR MPOL_WEIGHTED_INTERLEAVE .
 Or,
 .I flags
 specified
index b0e961f9c90c9b7546f4ad7537cf2f77d633657d..96264ce817152c2f025a1022b9599355d6021750 100644 (file)
@@ -105,6 +105,7 @@ 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
@@ -243,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
index fc3ad9df8747a5af96ceeb120b3c8b13b7958eee..f1f225e327f72edd2e3ca7143ce76944d3b29041 100644 (file)
@@ -63,6 +63,7 @@ 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
@@ -199,6 +200,23 @@ the memory bandwidth of a single node.
 .\" To be effective the memory area should be fairly large,
 .\" at least 1 MB or bigger.
 .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 node first