linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Enable OOM when moving processes between cgroups?
@ 2011-08-31 17:32 Viktor Rosendahl
  2011-08-31 17:54 ` Johannes Weiner
  0 siblings, 1 reply; 5+ messages in thread
From: Viktor Rosendahl @ 2011-08-31 17:32 UTC (permalink / raw)
  To: linux-mm
  Cc: Daisuke Nishimura, KAMEZAWA Hiroyuki, Johannes Weiner,
	Michal Hocko

Hello,

I wonder if there is a specific reason why the  OOM killer hasn't been enabled
in the mem_cgroup_do_precharge() function in mm/memcontrol.c ?

In my testing (2.6.32 kernel with some backported cgroups patches), it improves
the case when there isn't room for the task in the target cgroup.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
---
 mm/memcontrol.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index ebd1e86..9a38b80 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5176,7 +5176,7 @@ one_by_one:
 			batch_count = PRECHARGE_COUNT_AT_ONCE;
 			cond_resched();
 		}
-		ret = __mem_cgroup_try_charge(NULL, GFP_KERNEL, 1, &mem, false);
+		ret = __mem_cgroup_try_charge(NULL, GFP_KERNEL, 1, &mem, true);
 		if (ret || !mem)
 			/* mem_cgroup_clear_mc() will do uncharge later */
 			return -ENOMEM;
-- 
1.7.5.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2011-09-02 11:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-31 17:32 [PATCH] Enable OOM when moving processes between cgroups? Viktor Rosendahl
2011-08-31 17:54 ` Johannes Weiner
2011-09-01  0:02   ` KAMEZAWA Hiroyuki
2011-09-01  0:13   ` Daisuke Nishimura
2011-09-02 11:34   ` Viktor Rosendahl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).