[PATCH v4 1/5] mm, doc: Add doc for MPOL_F_NUMA_BALANCING
Yafang Shao
laoar.shao at gmail.com
Fri Dec 8 09:06:18 UTC 2023
The document on MPOL_F_NUMA_BALANCING was missed in the initial commit
The MPOL_F_NUMA_BALANCING document was inadvertently omitted from the
initial commit bda420b98505 ("numa balancing: migrate on fault among
multiple bound nodes")
Let's ensure its inclusion.
Signed-off-by: Yafang Shao <laoar.shao at gmail.com>
Reviewed-by: "Huang, Ying" <ying.huang at intel.com>
---
.../admin-guide/mm/numa_memory_policy.rst | 27 ++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/Documentation/admin-guide/mm/numa_memory_policy.rst b/Documentation/admin-guide/mm/numa_memory_policy.rst
index eca38fa..19071b71 100644
--- a/Documentation/admin-guide/mm/numa_memory_policy.rst
+++ b/Documentation/admin-guide/mm/numa_memory_policy.rst
@@ -332,6 +332,33 @@ MPOL_F_RELATIVE_NODES
MPOL_PREFERRED policies that were created with an empty nodemask
(local allocation).
+MPOL_F_NUMA_BALANCING (since Linux 5.12)
+ When operating in MPOL_BIND mode, enables NUMA balancing for tasks,
+ contingent upon kernel support. This feature optimizes page
+ placement within the confines of the specified memory binding
+ policy. The addition of the MPOL_F_NUMA_BALANCING flag augments the
+ control mechanism for NUMA balancing:
+
+ - The sysctl knob numa_balancing governs global activation or
+ deactivation of NUMA balancing.
+
+ - Even if sysctl numa_balancing is enabled, NUMA balancing remains
+ disabled by default for memory areas or applications utilizing
+ explicit memory policies.
+
+ - The MPOL_F_NUMA_BALANCING flag facilitates NUMA balancing
+ activation for applications employing explicit memory policies
+ (MPOL_BIND).
+
+ This flags enables various optimizations for page placement through
+ NUMA balancing. For instance, when an application's memory is bound
+ to multiple nodes (MPOL_BIND), the hint page fault handler attempts
+ to migrate accessed pages to reduce cross-node access if the
+ accessing node aligns with the policy nodemask.
+
+ If the flag isn't supported by the kernel, or is used with mode
+ other than MPOL_BIND, -1 is returned and errno is set to EINVAL.
+
Memory Policy Reference Counting
================================
--
1.8.3.1
More information about the Linux-security-module-archive
mailing list