Skip to content

Commit

Permalink
Memoryless nodes: OOM: use N_HIGH_MEMORY map instead of constructing …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Oct 16, 2007
1 parent 6eaf806 commit ee31af5
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,7 @@ static inline int constrained_alloc(struct zonelist *zonelist, gfp_t gfp_mask)
{
#ifdef CONFIG_NUMA
struct zone **z;
nodemask_t nodes;
int node;

nodes_clear(nodes);
/* node has memory ? */
for_each_online_node(node)
if (NODE_DATA(node)->node_present_pages)
node_set(node, nodes);
nodemask_t nodes = node_states[N_HIGH_MEMORY];

for (z = zonelist->zones; *z; z++)
if (cpuset_zone_allowed_softwall(*z, gfp_mask))
Expand Down

0 comments on commit ee31af5

Please sign in to comment.