All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xishi Qiu <qiuxishi@huawei.com>
To: Xishi Qiu <qiuxishi@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
	Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	izumi.taku@jp.fujitsu.com, Tang Chen <tangchen@cn.fujitsu.com>,
	Gu Zheng <guz.fnst@cn.fujitsu.com>,
	Xiexiuqi <xiexiuqi@huawei.com>, Mel Gorman <mgorman@suse.de>,
	David Rientjes <rientjes@google.com>,
	Linux MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] memory-hotplug: fix BUG_ON in move_freepages()
Date: Fri, 17 Apr 2015 17:13:31 +0800	[thread overview]
Message-ID: <5530CEBB.9030209@huawei.com> (raw)
In-Reply-To: <5530B2E9.3010102@huawei.com>

> Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>

> ---
>  mm/page_alloc.c |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index ebffa0e..1a5743e 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -4667,6 +4667,10 @@ static unsigned long __meminit zone_spanned_pages_in_node(int nid,
>  {
>  	unsigned long zone_start_pfn, zone_end_pfn;
>  
> +	/* When hotadd a new node, init node's zones as empty zones */
> +	if (!node_online(nid))
> +		return 0;
> +
>  	/* Get the start and end of the zone */
>  	zone_start_pfn = arch_zone_lowest_possible_pfn[zone_type];
>  	zone_end_pfn = arch_zone_highest_possible_pfn[zone_type];
> @@ -4698,6 +4702,10 @@ unsigned long __meminit __absent_pages_in_range(int nid,
>  	unsigned long start_pfn, end_pfn;

I made a mistake here, should change zone_absent_pages_in_node(), sorry!
I'll send V2

>  	int i;
>  
> +	/* When hotadd a new node, init node's zones as empty zones */
> +	if (!node_online(nid))
> +		return 0;
> +
>  	for_each_mem_pfn_range(i, nid, &start_pfn, &end_pfn, NULL) {
>  		start_pfn = clamp(start_pfn, range_start_pfn, range_end_pfn);
>  		end_pfn = clamp(end_pfn, range_start_pfn, range_end_pfn);
> @@ -4746,6 +4754,9 @@ static inline unsigned long __meminit zone_spanned_pages_in_node(int nid,
>  					unsigned long node_end_pfn,
>  					unsigned long *zones_size)
>  {
> +	if (!node_online(nid))
> +		return 0;
> +
>  	return zones_size[zone_type];
>  }
>  
> @@ -4755,6 +4766,9 @@ static inline unsigned long __meminit zone_absent_pages_in_node(int nid,
>  						unsigned long node_end_pfn,
>  						unsigned long *zholes_size)
>  {
> +	if (!node_online(nid))
> +		return 0;
> +
>  	if (!zholes_size)
>  		return 0;
>  



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

WARNING: multiple messages have this Message-ID (diff)
From: Xishi Qiu <qiuxishi@huawei.com>
To: Xishi Qiu <qiuxishi@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
	Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	<izumi.taku@jp.fujitsu.com>, Tang Chen <tangchen@cn.fujitsu.com>,
	Gu Zheng <guz.fnst@cn.fujitsu.com>,
	Xiexiuqi <xiexiuqi@huawei.com>, Mel Gorman <mgorman@suse.de>,
	David Rientjes <rientjes@google.com>,
	Linux MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] memory-hotplug: fix BUG_ON in move_freepages()
Date: Fri, 17 Apr 2015 17:13:31 +0800	[thread overview]
Message-ID: <5530CEBB.9030209@huawei.com> (raw)
In-Reply-To: <5530B2E9.3010102@huawei.com>

> Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>

> ---
>  mm/page_alloc.c |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index ebffa0e..1a5743e 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -4667,6 +4667,10 @@ static unsigned long __meminit zone_spanned_pages_in_node(int nid,
>  {
>  	unsigned long zone_start_pfn, zone_end_pfn;
>  
> +	/* When hotadd a new node, init node's zones as empty zones */
> +	if (!node_online(nid))
> +		return 0;
> +
>  	/* Get the start and end of the zone */
>  	zone_start_pfn = arch_zone_lowest_possible_pfn[zone_type];
>  	zone_end_pfn = arch_zone_highest_possible_pfn[zone_type];
> @@ -4698,6 +4702,10 @@ unsigned long __meminit __absent_pages_in_range(int nid,
>  	unsigned long start_pfn, end_pfn;

I made a mistake here, should change zone_absent_pages_in_node(), sorry!
I'll send V2

>  	int i;
>  
> +	/* When hotadd a new node, init node's zones as empty zones */
> +	if (!node_online(nid))
> +		return 0;
> +
>  	for_each_mem_pfn_range(i, nid, &start_pfn, &end_pfn, NULL) {
>  		start_pfn = clamp(start_pfn, range_start_pfn, range_end_pfn);
>  		end_pfn = clamp(end_pfn, range_start_pfn, range_end_pfn);
> @@ -4746,6 +4754,9 @@ static inline unsigned long __meminit zone_spanned_pages_in_node(int nid,
>  					unsigned long node_end_pfn,
>  					unsigned long *zones_size)
>  {
> +	if (!node_online(nid))
> +		return 0;
> +
>  	return zones_size[zone_type];
>  }
>  
> @@ -4755,6 +4766,9 @@ static inline unsigned long __meminit zone_absent_pages_in_node(int nid,
>  						unsigned long node_end_pfn,
>  						unsigned long *zholes_size)
>  {
> +	if (!node_online(nid))
> +		return 0;
> +
>  	if (!zholes_size)
>  		return 0;
>  




  reply	other threads:[~2015-04-17  9:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17  7:14 [PATCH 1/2] memory-hotplug: fix BUG_ON in move_freepages() Xishi Qiu
2015-04-17  7:14 ` Xishi Qiu
2015-04-17  9:13 ` Xishi Qiu [this message]
2015-04-17  9:13   ` Xishi Qiu

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=5530CEBB.9030209@huawei.com \
    --to=qiuxishi@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=guz.fnst@cn.fujitsu.com \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=izumi.taku@jp.fujitsu.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=rientjes@google.com \
    --cc=tangchen@cn.fujitsu.com \
    --cc=xiexiuqi@huawei.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.