From: Dave Young <hidave.darkstar@gmail.com>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
kamezawa.hiroyu@jp.fujitsu.com, kosaki.motohiro@jp.fujitsu.com
Subject: [PATCH 2/2] use oom_killer_disabled in page fault oom path
Date: Tue, 26 Apr 2011 13:31:50 +0800 [thread overview]
Message-ID: <20110426053150.GA11949@darkstar> (raw)
Currently oom_killer_disabled is only used in __alloc_pages_slowpath,
For page fault oom case it is not considered. One use case is
virtio balloon driver, when memory pressure is high, virtio ballooning
will cause oom killing due to such as page fault oom.
Thus add oom_killer_disabled checking in pagefault_out_of_memory.
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
---
mm/oom_kill.c | 3 +++
1 file changed, 3 insertions(+)
--- linux-2.6.orig/mm/oom_kill.c 2011-04-26 11:32:21.446452686 +0800
+++ linux-2.6/mm/oom_kill.c 2011-04-26 11:33:05.426452586 +0800
@@ -747,6 +747,9 @@ out:
*/
void pagefault_out_of_memory(void)
{
+ if (oom_killer_disabled)
+ return;
+
if (try_set_system_oom()) {
out_of_memory(NULL, 0, 0, NULL);
clear_system_oom();
--
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-04-26 6:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 5:31 Dave Young [this message]
2011-04-26 5:19 ` [PATCH 2/2] use oom_killer_disabled in page fault oom path KAMEZAWA Hiroyuki
2011-04-26 5:51 ` KOSAKI Motohiro
2011-04-26 8:07 ` Minchan Kim
2011-04-26 8:21 ` Minchan Kim
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=20110426053150.GA11949@darkstar \
--to=hidave.darkstar@gmail.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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).