]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/mpol: Add MPOL_MF_NOOP
authorLee Schermerhorn <lee.schermerhorn@hp.com>
Mon, 16 Jan 2012 13:43:29 +0000 (14:43 +0100)
committerIngo Molnar <mingo@kernel.org>
Sun, 28 Oct 2012 16:31:01 +0000 (17:31 +0100)
commitcd203e33c39d56f001a77b3713d743b221110423
tree6f58939c8555c5998cd0b9e397b460a0a0805060
parent88f4670789e37069504c2e0c2f50020434abd81e
mm/mpol: Add MPOL_MF_NOOP

This patch augments the MPOL_MF_LAZY feature by adding a "NOOP" policy
to mbind().  When the NOOP policy is used with the 'MOVE and 'LAZY
flags, mbind() will map the pages PROT_NONE so that they will be
migrated on the next touch.

This allows an application to prepare for a new phase of operation
where different regions of shared storage will be assigned to
worker threads, w/o changing policy.  Note that we could just use
"default" policy in this case.  However, this also allows an
application to request that pages be migrated, only if necessary,
to follow any arbitrary policy that might currently apply to a
range of pages, without knowing the policy, or without specifying
multiple mbind()s for ranges with different policies.

[ Bug in early version of mpol_parse_str() reported by Fengguang Wu. ]

Bug-Reported-by: Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/uapi/linux/mempolicy.h
mm/mempolicy.c