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>, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH 2/2 V3] memory-hotplug: remove reset_node_managed_pages() and reset_node_managed_pages() in hotadd_new_pgdat()
Date: Wed, 22 Apr 2015 14:27:25 +0800 [thread overview]
Message-ID: <55373F4D.6060901@huawei.com> (raw)
In-Reply-To: <55362349.3090406@huawei.com>
add CC: Tejun Heo <tj@kernel.org>
On 2015/4/21 18:15, Xishi Qiu wrote:
> After hotadd_new_pgdat()->free_area_init_node(), pgdat's spanned/present are 0,
> and zone's spanned/present/managed are 0, so remove reset_node_managed_pages()
> and reset_node_managed_pages().
>
> Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
> ---
> mm/memory_hotplug.c | 25 -------------------------
> 1 files changed, 0 insertions(+), 25 deletions(-)
>
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index 49d7c07..ac6462f 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -1064,16 +1064,6 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ
> }
> #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */
>
> -static void reset_node_present_pages(pg_data_t *pgdat)
> -{
> - struct zone *z;
> -
> - for (z = pgdat->node_zones; z < pgdat->node_zones + MAX_NR_ZONES; z++)
> - z->present_pages = 0;
> -
> - pgdat->node_present_pages = 0;
> -}
> -
> /* we are OK calling __meminit stuff here - we have CONFIG_MEMORY_HOTPLUG */
> static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start)
> {
> @@ -1108,21 +1098,6 @@ static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start)
> build_all_zonelists(pgdat, NULL);
> mutex_unlock(&zonelists_mutex);
>
> - /*
> - * zone->managed_pages is set to an approximate value in
> - * free_area_init_core(), which will cause
> - * /sys/device/system/node/nodeX/meminfo has wrong data.
> - * So reset it to 0 before any memory is onlined.
> - */
> - reset_node_managed_pages(pgdat);
> -
> - /*
> - * When memory is hot-added, all the memory is in offline state. So
> - * clear all zones' present_pages because they will be updated in
> - * online_pages() and offline_pages().
> - */
> - reset_node_present_pages(pgdat);
> -
> return pgdat;
> }
>
--
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>
prev parent reply other threads:[~2015-04-22 6:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 10:15 [PATCH 2/2 V3] memory-hotplug: remove reset_node_managed_pages() and reset_node_managed_pages() in hotadd_new_pgdat() Xishi Qiu
2015-04-22 6:27 ` Xishi Qiu [this message]
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=55373F4D.6060901@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=tj@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).