[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 10 Nov 2009 23:32:18 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
cc: Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Christoph Lameter <cl@...ux-foundation.org>
Subject: Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check with nodemask
v4.2
On Wed, 11 Nov 2009, KAMEZAWA Hiroyuki wrote:
> From: KAMEZAWA Hiroyuki <kamezawa.hioryu@...fujitsu.com>
>
> Fixing node-oriented allocation handling in oom-kill.c
> I myself think this as bugfix not as ehnancement.
>
> In these days, things are changed as
> - alloc_pages() eats nodemask as its arguments, __alloc_pages_nodemask().
> - mempolicy don't maintain its own private zonelists.
> (And cpuset doesn't use nodemask for __alloc_pages_nodemask())
>
> So, current oom-killer's check function is wrong.
>
> This patch does
> - check nodemask, if nodemask && nodemask doesn't cover all
> node_states[N_HIGH_MEMORY], this is CONSTRAINT_MEMORY_POLICY.
> - Scan all zonelist under nodemask, if it hits cpuset's wall
> this faiulre is from cpuset.
> And
> - modifies the caller of out_of_memory not to call oom if __GFP_THISNODE.
> This doesn't change "current" behavior. If callers use __GFP_THISNODE
> it should handle "page allocation failure" by itself.
>
> - handle __GFP_NOFAIL+__GFP_THISNODE path.
> This is something like a FIXME but this gfpmask is not used now.
>
> Changelog: 2009/11/11(2)
> - uses nodes_subset().
> - clean up.
> - added __GFP_NOFAIL case. And added waring.
> - removed inline
> - removed 'ret'
>
> Changelog: 2009/11/11
> - fixed nodes_equal() calculation.
> - return CONSTRAINT_MEMPOLICY always if given nodemask is not enough big.
>
> Changelog: 2009/11/06
> - fixed lack of oom.h
>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hioryu@...fujitsu.com>
Acked-by: David Rientjes <rientjes@...gle.com>
--
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