From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754376AbbHYCGs (ORCPT ); Mon, 24 Aug 2015 22:06:48 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:10820 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751352AbbHYCGr (ORCPT ); Mon, 24 Aug 2015 22:06:47 -0400 Message-ID: <55DBCCE2.3070901@huawei.com> Date: Tue, 25 Aug 2015 10:03:14 +0800 From: Xishi Qiu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Tang Chen , Yasuaki Ishimatsu , Andrew Morton , Naoya Horiguchi , Vlastimil Babka , , David Rientjes , Kamezawa Hiroyuki , CC: LKML , Linux MM Subject: [PATCH] memory-hotplug: fix comment in zone_spanned_pages_in_node() and zone_spanned_pages_in_node() Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090204.55DBCCEC.0053,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 2ef6fb01c8d6be1487300f07f9630e41 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When hotadd a node from add_memory(), we will add memblock first, so the node is not empty. But when from cpu_up(), the node should be empty. Signed-off-by: Xishi Qiu --- mm/page_alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 2ec3ca3..d370445 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5051,7 +5051,7 @@ static unsigned long __meminit zone_spanned_pages_in_node(int nid, { unsigned long zone_start_pfn, zone_end_pfn; - /* When hotadd a new node, the node should be empty */ + /* When hotadd a new node from cpu_up(), the node should be empty */ if (!node_start_pfn && !node_end_pfn) return 0; @@ -5118,7 +5118,7 @@ static unsigned long __meminit zone_absent_pages_in_node(int nid, unsigned long zone_high = arch_zone_highest_possible_pfn[zone_type]; unsigned long zone_start_pfn, zone_end_pfn; - /* When hotadd a new node, the node should be empty */ + /* When hotadd a new node from cpu_up(), the node should be empty */ if (!node_start_pfn && !node_end_pfn) return 0; -- 2.0.0