All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.cz>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch 1/4] mm, oom: ensure sysrq+f always passes valid zonelist
Date: Wed, 14 Nov 2012 11:50:49 +0100	[thread overview]
Message-ID: <20121114105049.GE17111@dhcp22.suse.cz> (raw)
In-Reply-To: <alpine.DEB.2.00.1211140111190.32125@chino.kir.corp.google.com>

On Wed 14-11-12 01:15:19, David Rientjes wrote:
> With hotpluggable and memoryless nodes, it's possible that node 0 will
> not be online, so use the first online node's zonelist rather than
> hardcoding node 0 to pass a zonelist with all zones to the oom killer.

Makes sense although I haven't seen a machine with no 0 node yet.
According to 13808910 this is indeed possible.

> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: David Rientjes <rientjes@google.com>

Reviewed-by: Michal Hocko <mhocko@suse.cz>

> ---
>  drivers/tty/sysrq.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
> --- a/drivers/tty/sysrq.c
> +++ b/drivers/tty/sysrq.c
> @@ -346,7 +346,8 @@ static struct sysrq_key_op sysrq_term_op = {
>  
>  static void moom_callback(struct work_struct *ignored)
>  {
> -	out_of_memory(node_zonelist(0, GFP_KERNEL), GFP_KERNEL, 0, NULL, true);
> +	out_of_memory(node_zonelist(first_online_node, GFP_KERNEL), GFP_KERNEL,
> +		      0, NULL, true);
>  }
>  
>  static DECLARE_WORK(moom_work, moom_callback);
> 
> --
> 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>

-- 
Michal Hocko
SUSE Labs

WARNING: multiple messages have this Message-ID (diff)
From: Michal Hocko <mhocko@suse.cz>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch 1/4] mm, oom: ensure sysrq+f always passes valid zonelist
Date: Wed, 14 Nov 2012 11:50:49 +0100	[thread overview]
Message-ID: <20121114105049.GE17111@dhcp22.suse.cz> (raw)
In-Reply-To: <alpine.DEB.2.00.1211140111190.32125@chino.kir.corp.google.com>

On Wed 14-11-12 01:15:19, David Rientjes wrote:
> With hotpluggable and memoryless nodes, it's possible that node 0 will
> not be online, so use the first online node's zonelist rather than
> hardcoding node 0 to pass a zonelist with all zones to the oom killer.

Makes sense although I haven't seen a machine with no 0 node yet.
According to 13808910 this is indeed possible.

> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: David Rientjes <rientjes@google.com>

Reviewed-by: Michal Hocko <mhocko@suse.cz>

> ---
>  drivers/tty/sysrq.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
> --- a/drivers/tty/sysrq.c
> +++ b/drivers/tty/sysrq.c
> @@ -346,7 +346,8 @@ static struct sysrq_key_op sysrq_term_op = {
>  
>  static void moom_callback(struct work_struct *ignored)
>  {
> -	out_of_memory(node_zonelist(0, GFP_KERNEL), GFP_KERNEL, 0, NULL, true);
> +	out_of_memory(node_zonelist(first_online_node, GFP_KERNEL), GFP_KERNEL,
> +		      0, NULL, true);
>  }
>  
>  static DECLARE_WORK(moom_work, moom_callback);
> 
> --
> 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>

-- 
Michal Hocko
SUSE Labs

--
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>

  parent reply	other threads:[~2012-11-14 10:50 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-14  9:15 [patch 1/4] mm, oom: ensure sysrq+f always passes valid zonelist David Rientjes
2012-11-14  9:15 ` David Rientjes
2012-11-14  9:15 ` [patch 2/4] mm, oom: cleanup pagefault oom handler David Rientjes
2012-11-14  9:15   ` David Rientjes
2012-11-14 13:32   ` Michal Hocko
2012-11-14 13:32     ` Michal Hocko
2012-11-15  8:45   ` Kamezawa Hiroyuki
2012-11-15  8:45     ` Kamezawa Hiroyuki
2012-11-15  9:02     ` Michal Hocko
2012-11-15  9:02       ` Michal Hocko
2012-11-15 21:01     ` David Rientjes
2012-11-15 21:01       ` David Rientjes
2012-11-14  9:15 ` [patch 3/4] mm, oom: remove redundant sleep in " David Rientjes
2012-11-14  9:15   ` David Rientjes
2012-11-14 13:45   ` Michal Hocko
2012-11-14 13:45     ` Michal Hocko
2012-11-15  8:46   ` Kamezawa Hiroyuki
2012-11-15  8:46     ` Kamezawa Hiroyuki
2012-11-14  9:15 ` [patch 4/4] mm, oom: remove statically defined arch functions of same name David Rientjes
2012-11-14  9:15   ` David Rientjes
2012-11-14  9:15   ` David Rientjes
2012-11-14  9:15   ` David Rientjes
2012-11-14 13:47   ` Michal Hocko
2012-11-14 13:47     ` Michal Hocko
2012-11-14 13:47     ` Michal Hocko
2012-11-14 13:47     ` Michal Hocko
2012-11-15  8:48   ` Kamezawa Hiroyuki
2012-11-15  8:48     ` Kamezawa Hiroyuki
2012-11-15  8:48     ` Kamezawa Hiroyuki
2012-11-15  8:48     ` Kamezawa Hiroyuki
2012-11-14 10:50 ` Michal Hocko [this message]
2012-11-14 10:50   ` [patch 1/4] mm, oom: ensure sysrq+f always passes valid zonelist Michal Hocko
2012-11-14 11:03   ` David Rientjes
2012-11-14 11:03     ` David Rientjes
2012-11-14 13:31     ` Michal Hocko
2012-11-14 13:31       ` Michal Hocko
2012-11-15  8:41 ` Kamezawa Hiroyuki
2012-11-15  8:41   ` Kamezawa Hiroyuki

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=20121114105049.GE17111@dhcp22.suse.cz \
    --to=mhocko@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.