From: David Rientjes <rientjes@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Rik van Riel <riel@redhat.com>,
linux-mm@kvack.org
Subject: [patch -mm 4/5] oom: cleanup oom_kill_task
Date: Thu, 1 Apr 2010 12:44:36 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.00.1004011243460.13247@chino.kir.corp.google.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1004011240370.13247@chino.kir.corp.google.com>
__oom_kill_task() only has a single caller, so merge it into that
function.
Signed-off-by: David Rientjes <rientjes@google.com>
---
mm/oom_kill.c | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -415,17 +415,6 @@ static void dump_header(struct task_struct *p, gfp_t gfp_mask, int order,
dump_tasks(mem);
}
-/*
- * Give the oom killed task high priority and access to memory reserves so that
- * it may quickly exit and free its memory.
- */
-static void __oom_kill_task(struct task_struct *p)
-{
- p->rt.time_slice = HZ;
- set_tsk_thread_flag(p, TIF_MEMDIE);
- force_sig(SIGKILL, p);
-}
-
#define K(x) ((x) << (PAGE_SHIFT-10))
static int oom_kill_task(struct task_struct *p)
{
@@ -440,7 +429,9 @@ static int oom_kill_task(struct task_struct *p)
K(get_mm_counter(p->mm, MM_FILEPAGES)));
task_unlock(p);
- __oom_kill_task(p);
+ p->rt.time_slice = HZ;
+ set_tsk_thread_flag(p, TIF_MEMDIE);
+ force_sig(SIGKILL, p);
return 0;
}
#undef K
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-04-01 19:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-01 19:44 [patch -mm 0/5] oom: fixes and cleanup David Rientjes
2010-04-01 19:44 ` [patch -mm 1/5 v2] oom: hold tasklist_lock when dumping tasks David Rientjes
2010-04-02 0:38 ` KAMEZAWA Hiroyuki
2010-04-01 19:44 ` [patch -mm 2/5 v2] oom: give current access to memory reserves if it has been killed David Rientjes
2010-04-02 0:40 ` KAMEZAWA Hiroyuki
2010-04-01 19:44 ` [patch -mm 3/5] oom: avoid sending exiting tasks a SIGKILL David Rientjes
2010-04-02 0:41 ` KAMEZAWA Hiroyuki
2010-04-01 19:44 ` David Rientjes [this message]
2010-04-02 0:42 ` [patch -mm 4/5] oom: cleanup oom_kill_task KAMEZAWA Hiroyuki
2010-04-01 19:44 ` [patch -mm 5/5] oom: cleanup oom_badness David Rientjes
2010-04-02 0:44 ` KAMEZAWA Hiroyuki
2010-04-02 9:18 ` David Rientjes
2010-04-02 11:30 ` [patch -mm 0/5] oom: fixes and cleanup Oleg Nesterov
2010-04-05 7:36 ` KOSAKI Motohiro
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=alpine.DEB.2.00.1004011243460.13247@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=oleg@redhat.com \
--cc=riel@redhat.com \
/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