[PATCH] Enable OOM when moving processes between cgroups?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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@xxxxxxxxx.  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@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]