[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1003271946090.9116@chino.kir.corp.google.com>
Date: Sat, 27 Mar 2010 19:46:16 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: Anfei Zhou <anfei.zhou@...il.com>
cc: Andrew Morton <akpm@...ux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
nishimura@....nes.nec.co.jp,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] oom killer: break from infinite loop
On Thu, 25 Mar 2010, Anfei Zhou wrote:
> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> index 9b223af..aab9892 100644
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -381,6 +381,8 @@ static void dump_header(struct task_struct *p, gfp_t gfp_mask, int order,
> */
> static void __oom_kill_task(struct task_struct *p, int verbose)
> {
> + struct task_struct *t;
> +
> if (is_global_init(p)) {
> WARN_ON(1);
> printk(KERN_WARNING "tried to kill init!\n");
> @@ -412,6 +414,8 @@ static void __oom_kill_task(struct task_struct *p, int verbose)
> */
> p->rt.time_slice = HZ;
> set_tsk_thread_flag(p, TIF_MEMDIE);
> + for (t = next_thread(p); t != p; t = next_thread(t))
> + set_tsk_thread_flag(t, TIF_MEMDIE);
>
> force_sig(SIGKILL, p);
> }
I like the concept, but I agree that it would probably be better to write
it as Oleg suggested. The oom killer has been rewritten in the -mm tree
and so this patch doesn't apply cleanly, would it be possible to rebase to
mmotm with the suggested coding sytle and post this again?
See http://userweb.kernel.org/~akpm/mmotm/mmotm-readme.txt
Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists