From: Christoph Lameter Date: Tue, 16 Oct 2007 08:25:30 +0000 (-0700) Subject: Memoryless nodes: OOM: use N_HIGH_MEMORY map instead of constructing one on the fly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ee31af5d649d8aa6ac7948a6d97ae48367ff2d7e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Nishanth Aravamudan Acked-by: Lee Schermerhorn Acked-by: Bob Picco Cc: KAMEZAWA Hiroyuki Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/oom_kill.c b/mm/oom_kill.c index f9b82ad5047f..41b4e362221d 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) { #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))