diff options
author | Christoph Lameter <clameter@sgi.com> | 2007-10-16 04:25:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:42:58 -0400 |
commit | ee31af5d649d8aa6ac7948a6d97ae48367ff2d7e (patch) | |
tree | 8a16d8c15b8b56058b905c2b83a3a5f8112746c4 /mm | |
parent | 6eaf806a223e61dc5f2de4ab591f11beb97a8f3b (diff) |
Memoryless nodes: OOM: use N_HIGH_MEMORY map instead of constructing one on the fly
constrained_alloc() builds its own memory map for nodes with memory. We have
that available in N_HIGH_MEMORY now. So simplify the code.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Acked-by: Nishanth Aravamudan <nacc@us.ibm.com>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Acked-by: Bob Picco <bob.picco@hp.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Mel Gorman <mel@skynet.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/oom_kill.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index f9b82ad5047..41b4e362221 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
@@ -177,14 +177,7 @@ static inline int constrained_alloc(struct zonelist *zonelist, gfp_t gfp_mask) | |||
177 | { | 177 | { |
178 | #ifdef CONFIG_NUMA | 178 | #ifdef CONFIG_NUMA |
179 | struct zone **z; | 179 | struct zone **z; |
180 | nodemask_t nodes; | 180 | nodemask_t nodes = node_states[N_HIGH_MEMORY]; |
181 | int node; | ||
182 | |||
183 | nodes_clear(nodes); | ||
184 | /* node has memory ? */ | ||
185 | for_each_online_node(node) | ||
186 | if (NODE_DATA(node)->node_present_pages) | ||
187 | node_set(node, nodes); | ||
188 | 181 | ||
189 | for (z = zonelist->zones; *z; z++) | 182 | for (z = zonelist->zones; *z; z++) |
190 | if (cpuset_zone_allowed_softwall(*z, gfp_mask)) | 183 | if (cpuset_zone_allowed_softwall(*z, gfp_mask)) |