]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/mpol: Add MPOL_MF_LAZY
authorLee Schermerhorn <lee.schermerhorn@hp.com>
Thu, 12 Jan 2012 11:37:17 +0000 (12:37 +0100)
committerIngo Molnar <mingo@kernel.org>
Sun, 28 Oct 2012 16:31:04 +0000 (17:31 +0100)
commitca2ea0747a5b44aaa3e05284a3a339145a1cc5a4
treeb5c7e4b529d605b5e4928ffca294c78744f27a19
parentf05ea0948708f21ecf6b607bfbe7296ec4733584
mm/mpol: Add MPOL_MF_LAZY

This patch adds another mbind() flag to request "lazy migration".  The
flag, MPOL_MF_LAZY, modifies MPOL_MF_MOVE* such that the selected
pages are marked PROT_NONE. The pages will be migrated in the fault
path on "first touch", if the policy dictates at that time.

"Lazy Migration" will allow testing of migrate-on-fault via mbind().
Also allows applications to specify that only subsequently touched
pages be migrated to obey new policy, instead of all pages in range.
This can be useful for multi-threaded applications working on a
large shared data area that is initialized by an initial thread
resulting in all pages on one [or a few, if overflowed] nodes.
After PROT_NONE, the pages in regions assigned to the worker threads
will be automatically migrated local to the threads on 1st touch.

Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
[ nearly complete rewrite.. ]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-7rsodo9x8zvm5awru5o7zo0y@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/uapi/linux/mempolicy.h
mm/mempolicy.c