Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932598AbdCaHH3 (ORCPT ); Fri, 31 Mar 2017 03:07:29 -0400 Received: from out0-193.mail.aliyun.com ([140.205.0.193]:57227 "EHLO out0-193.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932268AbdCaHH1 (ORCPT ); Fri, 31 Mar 2017 03:07:27 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R491e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e02c03295;MF=hillf.zj@alibaba-inc.com;NM=1;PH=DS;RN=20;SR=0;TI=SMTPD_---.7t5GN.7_1490944001; Reply-To: "Hillf Danton" From: "Hillf Danton" To: "'Michal Hocko'" Cc: , "'Andrew Morton'" , "'Mel Gorman'" , "'Vlastimil Babka'" , "'Andrea Arcangeli'" , "'Reza Arbab'" , "'Yasuaki Ishimatsu'" , "'Tang Chen'" , , "'Kani Toshimitsu'" , , "'Joonsoo Kim'" , "'Andi Kleen'" , "'Zhang Zhen'" , "'David Rientjes'" , "'Daniel Kiper'" , "'Igor Mammedov'" , "'Vitaly Kuznetsov'" , "'LKML'" References: <20170330115454.32154-1-mhocko@kernel.org> <20170330115454.32154-4-mhocko@kernel.org> <04ad01d2a9d1$d99b0540$8cd10fc0$@alibaba-inc.com> <20170331064901.GC27098@dhcp22.suse.cz> In-Reply-To: <20170331064901.GC27098@dhcp22.suse.cz> Subject: Re: [PATCH 3/6] mm: remove return value from init_currently_empty_zone Date: Fri, 31 Mar 2017 15:06:41 +0800 Message-ID: <04e301d2a9ed$5a0620a0$0e1261e0$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQFU6y+5EAZL2+8hDBYbLS7ZosefXwEgoNBTAijC5XsBy7oiraKBWURw Content-Language: zh-cn Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 842 Lines: 23 On March 31, 2017 2:49 PM Michal Hocko wrote: > On Fri 31-03-17 11:49:49, Hillf Danton wrote: > [...] > > > -/* Can fail with -ENOMEM from allocating a wait table with vmalloc() or > > > - * alloc_bootmem_node_nopanic()/memblock_virt_alloc_node_nopanic() */ > > > -static int __ref ensure_zone_is_initialized(struct zone *zone, > > > +static void __ref ensure_zone_is_initialized(struct zone *zone, > > > unsigned long start_pfn, unsigned long num_pages) > > > { > > > - if (zone_is_empty(zone)) > > > - return init_currently_empty_zone(zone, start_pfn, num_pages); > > > - > > > - return 0; > > > + if (!zone_is_empty(zone)) > > > + init_currently_empty_zone(zone, start_pfn, num_pages); > > > } > > Semantic change added? > > could you be more specific? Well, I'm wondering why you are trying to initiate a nonempty zone. Hillf