Memoryless nodes: Use N_HIGH_MEMORY for cpusets
authorChristoph Lameter <[email protected]>
Tue, 16 Oct 2007 08:25:38 +0000 (01:25 -0700)
committerLinus Torvalds <[email protected]>
Tue, 16 Oct 2007 16:42:59 +0000 (09:42 -0700)
commit0e1e7c7a739562a321fda07c7cd2a97a7114f8f8
treef2148e5b667152681625c19cf8b2a556500994ea
parent523b945855a1427000ffc707c610abe5947ae607
Memoryless nodes: Use N_HIGH_MEMORY for cpusets

cpusets try to ensure that any node added to a cpuset's mems_allowed is
on-line and contains memory.  The assumption was that online nodes contained
memory.  Thus, it is possible to add memoryless nodes to a cpuset and then add
tasks to this cpuset.  This results in continuous series of oom-kill and
apparent system hang.

Change cpusets to use node_states[N_HIGH_MEMORY] [a.k.a.  node_memory_map] in
place of node_online_map when vetting memories.  Return error if admin
attempts to write a non-empty mems_allowed node mask containing only
memoryless-nodes.

Signed-off-by: Lee Schermerhorn <[email protected]>
Signed-off-by: Bob Picco <[email protected]>
Signed-off-by: Nishanth Aravamudan <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Mel Gorman <[email protected]>
Signed-off-by: Christoph Lameter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Documentation/cpusets.txt
include/linux/cpuset.h
kernel/cpuset.c