From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f69.google.com (mail-pg0-f69.google.com [74.125.83.69]) by kanga.kvack.org (Postfix) with ESMTP id E7F716B0038 for ; Fri, 31 Mar 2017 02:18:20 -0400 (EDT) Received: by mail-pg0-f69.google.com with SMTP id g2so67664485pge.7 for ; Thu, 30 Mar 2017 23:18:20 -0700 (PDT) Received: from out0-250.mail.aliyun.com (out0-250.mail.aliyun.com. [140.205.0.250]) by mx.google.com with ESMTP id q87si4141872pfi.271.2017.03.30.23.18.19 for ; Thu, 30 Mar 2017 23:18:20 -0700 (PDT) Reply-To: "Hillf Danton" From: "Hillf Danton" References: <20170330115454.32154-1-mhocko@kernel.org> <20170330115454.32154-6-mhocko@kernel.org> In-Reply-To: <20170330115454.32154-6-mhocko@kernel.org> Subject: Re: [PATCH 5/6] mm, memory_hotplug: do not associate hotadded memory to zones until online Date: Fri, 31 Mar 2017 14:18:08 +0800 Message-ID: <04c901d2a9e6$91968a20$b4c39e60$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Language: zh-cn Sender: owner-linux-mm@kvack.org List-ID: To: 'Michal Hocko' , linux-mm@kvack.org Cc: 'Andrew Morton' , 'Mel Gorman' , 'Vlastimil Babka' , 'Andrea Arcangeli' , 'Reza Arbab' , 'Yasuaki Ishimatsu' , 'Tang Chen' , qiuxishi@huawei.com, 'Kani Toshimitsu' , slaoub@gmail.com, 'Joonsoo Kim' , 'Andi Kleen' , 'David Rientjes' , 'Daniel Kiper' , 'Igor Mammedov' , 'Vitaly Kuznetsov' , 'LKML' , 'Michal Hocko' , 'Dan Williams' , 'Heiko Carstens' , 'Lai Jiangshan' , 'Martin Schwidefsky' On March 30, 2017 7:55 PM Michal Hocko wrote: > > +static void __meminit resize_zone_range(struct zone *zone, unsigned long start_pfn, > + unsigned long nr_pages) > +{ > + unsigned long old_end_pfn = zone_end_pfn(zone); > + > + if (start_pfn < zone->zone_start_pfn) > + zone->zone_start_pfn = start_pfn; > + > + zone->spanned_pages = max(start_pfn + nr_pages, old_end_pfn) - zone->zone_start_pfn; > +} The implementation above implies zone can only go bigger. Can we resize zone with the given data? btw, this mail address, Zhang Zhen , is not reachable. Hillf -- 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: email@kvack.org