[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1211151257500.27188@chino.kir.corp.google.com>
Date: Thu, 15 Nov 2012 13:01:23 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Kamezawa Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
cc: Andrew Morton <akpm@...ux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Michal Hocko <mhocko@...e.cz>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [patch 2/4] mm, oom: cleanup pagefault oom handler
On Thu, 15 Nov 2012, Kamezawa Hiroyuki wrote:
> > @@ -708,15 +671,17 @@ out:
> >
> > /*
> > * The pagefault handler calls here because it is out of memory, so kill a
> > - * memory-hogging task. If a populated zone has ZONE_OOM_LOCKED set, a
> > parallel
> > - * oom killing is already in progress so do nothing. If a task is found
> > with
> > - * TIF_MEMDIE set, it has been killed so do nothing and allow it to exit.
> > + * memory-hogging task. If any populated zone has ZONE_OOM_LOCKED set, a
> > + * parallel oom killing is already in progress so do nothing.
> > */
> > void pagefault_out_of_memory(void)
> > {
> > - if (try_set_system_oom()) {
> > + struct zonelist *zonelist = node_zonelist(first_online_node,
> > + GFP_KERNEL);
>
>
> why GFP_KERNEL ? not GFP_HIGHUSER_MOVABLE ?
>
The usual way to get a zonelist consisting of all zones ordered by
preferring a node is node_zonelist(nid, GFP_KERNEL), but there's no
difference between using GFP_KERNEL, GFP_HIGHUSER_MOVABLE, or even 0. I
simply duplicated what the sysrq trigger was doing, but you could also do
&first_online_pgdat->node_zonelists[0], it's really just a matter of
preference.
--
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