mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [BUG][PATCH] fix oom killer kills current every time if there is memory-less-node
@ 2006-12-22  3:22 KAMEZAWA Hiroyuki
  2006-12-22  5:18 ` Paul Jackson
  0 siblings, 1 reply; 4+ messages in thread
From: KAMEZAWA Hiroyuki @ 2006-12-22  3:22 UTC (permalink / raw)
  To: LKML; +Cc: Andrew Morton, GOTO, npiggin

constrained_alloc(), which is called to detect where oom is from,
checks passed zone_list().
If zone_list includes all nodes, it thinks oom is from mempolicy.

But there is memory-less-node. contstrained_alloc() should get
memory_less_node into count. Otherwise, current process will die
at any time. This patch fix it.

Signed-Off-By: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>



 mm/oom_kill.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

Index: devel-2.6.20-rc1-mm1/mm/oom_kill.c
===================================================================
--- devel-2.6.20-rc1-mm1.orig/mm/oom_kill.c	2006-12-16 13:47:59.000000000 +0900
+++ devel-2.6.20-rc1-mm1/mm/oom_kill.c	2006-12-22 12:11:55.000000000 +0900
@@ -174,7 +174,12 @@
 {
 #ifdef CONFIG_NUMA
 	struct zone **z;
-	nodemask_t nodes = node_online_map;
+	nodemask_t nodes;
+	int node;
+	/* node has memory ? */
+	for_each_online_node(node)
+		if (NODE_DATA(node)->node_present_pages)
+			node_set(node, nodes);
 
 	for (z = zonelist->zones; *z; z++)
 		if (cpuset_zone_allowed_softwall(*z, gfp_mask))


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-12-22  8:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-22  3:22 [BUG][PATCH] fix oom killer kills current every time if there is memory-less-node KAMEZAWA Hiroyuki
2006-12-22  5:18 ` Paul Jackson
2006-12-22  5:24   ` KAMEZAWA Hiroyuki
2006-12-22  8:15     ` [BUG][PATCH] fix oom killer kills current every time if there is memory-less-node take2 KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®