Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee31af5d authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds
Browse files

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: default avatarChristoph Lameter <clameter@sgi.com>
Acked-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Acked-by: default avatarLee Schermerhorn <lee.schermerhorn@hp.com>
Acked-by: default avatarBob Picco <bob.picco@hp.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Mel Gorman <mel@skynet.ie>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6eaf806a
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -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))