lkml.org 
[lkml]   [2009]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check with nodemask v3
Date
> From: KAMEZAWA Hiroyuki <kamezawa.hioryu@jp.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())
>
> But, current oom-killer's doesn't handle nodemask and it's 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.
>
> 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@jp.fujitsu.com>
> ---
> drivers/char/sysrq.c | 2 +-
> include/linux/oom.h | 4 +++-
> mm/oom_kill.c | 44 ++++++++++++++++++++++++++++++++------------
> mm/page_alloc.c | 10 ++++++++--
> 4 files changed, 44 insertions(+), 16 deletions(-)
>

Looks good to me.
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>





\
 
 \ /
  Last update: 2009-11-11 03:39    [W:2.575 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site