From: Viktor Rosendahl <viktor.rosendahl@nokia.com>
To: linux-mm@kvack.org
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Johannes Weiner <jweiner@redhat.com>,
Michal Hocko <mhocko@suse.cz>
Subject: [PATCH] Enable OOM when moving processes between cgroups?
Date: Wed, 31 Aug 2011 20:32:21 +0300 [thread overview]
Message-ID: <1314811941-14587-1-git-send-email-viktor.rosendahl@nokia.com> (raw)
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>
next reply other threads:[~2011-08-31 17:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-31 17:32 Viktor Rosendahl [this message]
2011-08-31 17:54 ` [PATCH] Enable OOM when moving processes between cgroups? Johannes Weiner
2011-09-01 0:02 ` KAMEZAWA Hiroyuki
2011-09-01 0:13 ` Daisuke Nishimura
2011-09-02 11:34 ` Viktor Rosendahl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314811941-14587-1-git-send-email-viktor.rosendahl@nokia.com \
--to=viktor.rosendahl@nokia.com \
--cc=jweiner@redhat.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=nishimura@mxp.nes.nec.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).