From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752787AbdDDHbB (ORCPT ); Tue, 4 Apr 2017 03:31:01 -0400 Received: from mx2.suse.de ([195.135.220.15]:45161 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751843AbdDDHbA (ORCPT ); Tue, 4 Apr 2017 03:31:00 -0400 Date: Tue, 4 Apr 2017 09:30:56 +0200 From: Michal Hocko To: Reza Arbab Cc: linux-mm@kvack.org, Andrew Morton , Mel Gorman , Vlastimil Babka , Andrea Arcangeli , Yasuaki Ishimatsu , Tang Chen , qiuxishi@huawei.com, Kani Toshimitsu , slaoub@gmail.com, Joonsoo Kim , Andi Kleen , Zhang Zhen , David Rientjes , Daniel Kiper , Igor Mammedov , Vitaly Kuznetsov , LKML Subject: Re: [PATCH 3/6] mm: remove return value from init_currently_empty_zone Message-ID: <20170404073056.GB15132@dhcp22.suse.cz> References: <20170330115454.32154-1-mhocko@kernel.org> <20170330115454.32154-4-mhocko@kernel.org> <20170403212232.s3zynq2hh6hpnefr@arbab-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170403212232.s3zynq2hh6hpnefr@arbab-laptop> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 03-04-17 16:22:32, Reza Arbab wrote: > On Thu, Mar 30, 2017 at 01:54:51PM +0200, Michal Hocko wrote: > >init_currently_empty_zone doesn't have any error to return yet it is > >still an int and callers try to be defensive and try to handle potential > >error. Remove this nonsense and simplify all callers. > > Semi-related; arch_remove_memory() returns int, but callers ignore it. > > Is that worth cleaning up? If so, should the implementations be simplified, > or should we maybe do a pr_error() or something with it? No, pr_error is not really helpful. Either that path can fail and we should handle it properly - which will be hard because remove_memory cannot handle that or we should just make arch_remove_memory non-failing. I have a suspicion that this path doesn't really fail in fact. This requires a deeper inspection though. I've put that on my todo list. Thanks! -- Michal Hocko SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f199.google.com (mail-wr0-f199.google.com [209.85.128.199]) by kanga.kvack.org (Postfix) with ESMTP id 41F226B039F for ; Tue, 4 Apr 2017 03:31:01 -0400 (EDT) Received: by mail-wr0-f199.google.com with SMTP id y77so27189333wrb.22 for ; Tue, 04 Apr 2017 00:31:01 -0700 (PDT) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id l2si23277476wre.212.2017.04.04.00.30.59 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 04 Apr 2017 00:31:00 -0700 (PDT) Date: Tue, 4 Apr 2017 09:30:56 +0200 From: Michal Hocko Subject: Re: [PATCH 3/6] mm: remove return value from init_currently_empty_zone Message-ID: <20170404073056.GB15132@dhcp22.suse.cz> References: <20170330115454.32154-1-mhocko@kernel.org> <20170330115454.32154-4-mhocko@kernel.org> <20170403212232.s3zynq2hh6hpnefr@arbab-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170403212232.s3zynq2hh6hpnefr@arbab-laptop> Sender: owner-linux-mm@kvack.org List-ID: To: Reza Arbab Cc: linux-mm@kvack.org, Andrew Morton , Mel Gorman , Vlastimil Babka , Andrea Arcangeli , Yasuaki Ishimatsu , Tang Chen , qiuxishi@huawei.com, Kani Toshimitsu , slaoub@gmail.com, Joonsoo Kim , Andi Kleen , Zhang Zhen , David Rientjes , Daniel Kiper , Igor Mammedov , Vitaly Kuznetsov , LKML On Mon 03-04-17 16:22:32, Reza Arbab wrote: > On Thu, Mar 30, 2017 at 01:54:51PM +0200, Michal Hocko wrote: > >init_currently_empty_zone doesn't have any error to return yet it is > >still an int and callers try to be defensive and try to handle potential > >error. Remove this nonsense and simplify all callers. > > Semi-related; arch_remove_memory() returns int, but callers ignore it. > > Is that worth cleaning up? If so, should the implementations be simplified, > or should we maybe do a pr_error() or something with it? No, pr_error is not really helpful. Either that path can fail and we should handle it properly - which will be hard because remove_memory cannot handle that or we should just make arch_remove_memory non-failing. I have a suspicion that this path doesn't really fail in fact. This requires a deeper inspection though. I've put that on my todo list. Thanks! -- Michal Hocko SUSE Labs -- 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