linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [patch] check cpuset mems_allowed for sys_mbind
@ 2007-05-09 23:11 Ken Chen
  2007-05-09 23:48 ` Paul Jackson
  0 siblings, 1 reply; 9+ messages in thread
From: Ken Chen @ 2007-05-09 23:11 UTC (permalink / raw)
  To: Paul Jackson, Andrew Morton; +Cc: linux-mm

I wonder why we don't check cpuset's mems_allowed node mask in the
sys_mbind() path?  sys_set_mempolicy() however, does the enforcement
against cpuset so process can not accidentally set mempolicy with
memory node mask that are not allowed to allocated from.  I think we
should have the equivalent check in the mbind path.   Otherwise, there
are discrepancy in what sys_mbind agrees to versus what the page
allocation policy that enforced by cpuset.  This discrepancy
subsequently causes performance surprises to the application.

Or is it left out intentionally?  for what reason?


Signed-off-by: Ken Chen <kenchen@google.com>

diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index d76e8eb..ef81080 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -762,7 +762,7 @@ long do_mbind(unsigned long start, unsig
 	if (end == start)
 		return 0;

-	if (mpol_check_policy(mode, nmask))
+	if (contextualize_policy(mode, nmask))
 		return -EINVAL;

 	new = mpol_new(mode, nmask);

--
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>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-05-10 19:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-09 23:11 [patch] check cpuset mems_allowed for sys_mbind Ken Chen
2007-05-09 23:48 ` Paul Jackson
2007-05-10  0:47   ` Ken Chen
2007-05-10  0:55     ` Christoph Lameter
2007-05-10  1:26       ` Ken Chen
2007-05-10  1:44         ` Christoph Lameter
2007-05-10 18:32       ` Ken Chen
2007-05-10 18:41         ` Christoph Lameter
2007-05-10 19:30           ` Ken Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox