Thread (24 messages) 24 messages, 6 authors, 2016-11-01
STALE3541d

[PATCH 1/1] mm/mempolicy.c: add MPOL_LOCAL NUMA memory policy documentation

From: Piotr Kwapulinski <hidden>
Date: 2016-09-27 13:23:21
Also in: linux-api, linux-man, lkml
Subsystem: documentation, memory management, memory management - memory policy and migration, the rest · Maintainers: Jonathan Corbet, Andrew Morton, David Hildenbrand, Linus Torvalds

The MPOL_LOCAL mode has been implemented by
Peter Zijlstra [off-list ref]
(commit: 479e2802d09f1e18a97262c4c6f8f17ae5884bd8).
Add the documentation for this mode.

Signed-off-by: Piotr Kwapulinski <redacted>
---
 Documentation/vm/numa_memory_policy.txt | 8 ++++++++
 mm/mempolicy.c                          | 4 ++++
 2 files changed, 12 insertions(+)
diff --git a/Documentation/vm/numa_memory_policy.txt b/Documentation/vm/numa_memory_policy.txt
index 622b927..dcb490e 100644
--- a/Documentation/vm/numa_memory_policy.txt
+++ b/Documentation/vm/numa_memory_policy.txt
@@ -212,6 +212,14 @@ Components of Memory Policies
 	    the temporary interleaved system default policy works in this
 	    mode.
 
+	MPOL_LOCAL: This mode specifies "local allocation". It must be
+	used along with an empty nodemask. It acts like the MPOL_PREFERRED
+	mode specified with an empty nodemask. For details refer to
+	the MPOL_PREFERRED mode described above.
+
+	    Internally, it is transformed into MPOL_PREFERRED mode with an
+	    empty nodemask.
+
    Linux memory policy supports the following optional mode flags:
 
 	MPOL_F_STATIC_NODES:  This flag specifies that the nodemask passed by
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 2da72a5..02dc43e 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -35,6 +35,10 @@
  *                use the process policy. This is what Linux always did
  *		  in a NUMA aware kernel and still does by, ahem, default.
  *
+ * local          "Local allocation". It acts like a special case of
+ *                "preferred" memory policy: NUMA_NO_NODE (see above
+ *                for details).
+ *
  * The process policy is applied for most non interrupt memory allocations
  * in that process' context. Interrupts ignore the policies and always
  * try to allocate on the local CPU. The VMA policy is only applied for memory
-- 
2.10.0

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help