From mboxrd@z Thu Jan 1 00:00:00 1970 From: Baoquan He Subject: Re: [PATCH 17/21] mm: free_area_init: allow defining max_zone_pfn in descending order Date: Fri, 24 Apr 2020 08:33:56 +0800 Message-ID: <20200424003356.GA10119@MiWiFi-R3L-srv> References: <20200412194859.12663-1-rppt@kernel.org> <20200412194859.12663-18-rppt@kernel.org> <20200423025311.GZ4247@MiWiFi-R3L-srv> <20200423025720.GA4247@MiWiFi-R3L-srv> <20200423055559.GF14260@kernel.org> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To :Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=n2dWJbdFmIc0aMZ8wHTt5vQhPaXxDdsL9ipp25mLNTI=; b=gaCYbtIKGhf9r7DMHoUKy6pul nTKbEdzQ39WVB1dKq4BU0uNeRf+/wW+8GzyPnnioozYhI3WnLD/scfP8S60DbspzmGPCGlU7iDfOw FRogX6NhJCuO7vquvlJuZVaOCyd58E38KRH09gxVjQw/JtqJJLawIA6xzjhlxBLmKUHMtAP+dZ5+c YfDr8UF/ta7DIHmUT0wpFIxoPC0j9MLQ7jR6a3mnoSb599ewzfGQDdR0zH1wtmSYKPVvV9zEbWG4a kW9hxzqkXlHzpINmPqBNx9gtJhB3lYVmkgdHhW1OA7EKBYE1yvrszey0IS2Ei3KptWr65Iys68DG2 wId1y1weg==; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587688453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=n2dWJbdFmIc0aMZ8wHTt5vQhPaXxDdsL9ipp25mLNTI=; b=eTmMEfXZAwNiRciPiT/2R4efctZxwysLoOEOVLuaQHYhsgs+1nUUTTIEa+GlWs6BinkhT+ GfUhNQ8DNAE0D6d0zVFRyY9zaj8EMII0AeZucu/vOBaRqeQ3D6MuU+W7O44hk21hfwtXzR wI1FCE8+Cgg4ZzF6/fyI+Gl7eBnY4EU= Content-Disposition: inline In-Reply-To: <20200423055559.GF14260@kernel.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+glpr-linux-riscv=m.gmane-mx.org@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Mike Rapoport Cc: Rich Felker , linux-ia64@vger.kernel.org, linux-doc@vger.kernel.org, Catalin Marinas , Heiko Carstens , Michal Hocko , "James E.J. Bottomley" , Max Filippov , Guo Ren , linux-csky@vger.kernel.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-riscv@lists.infradead.org, Greg Ungerer , linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-c6x-dev@linux-c6x.org, Brian Cain , Jonathan Corbet , linux-sh@vger.kernel.org, Michael Ellerman , Helge Deller , x86@kernel.org, Russell King , Ley Foon Tan On 04/23/20 at 08:55am, Mike Rapoport wrote: > On Thu, Apr 23, 2020 at 10:57:20AM +0800, Baoquan He wrote: > > On 04/23/20 at 10:53am, Baoquan He wrote: > > > On 04/12/20 at 10:48pm, Mike Rapoport wrote: > > > > From: Mike Rapoport > > > > > > > > Some architectures (e.g. ARC) have the ZONE_HIGHMEM zone below the > > > > ZONE_NORMAL. Allowing free_area_init() parse max_zone_pfn array even it is > > > > sorted in descending order allows using free_area_init() on such > > > > architectures. > > > > > > > > Add top -> down traversal of max_zone_pfn array in free_area_init() and use > > > > the latter in ARC node/zone initialization. > > > > > > Or maybe leave ARC as is. The change in this patchset doesn't impact > > > ARC's handling about zone initialization, leaving it as is can reduce > > > the complication in implementation of free_area_init(), which is a > > > common function. So I personally don't see a strong motivation to have > > > this patch. > > > > OK, seems this patch is prepared to simplify free_area_init_node(), so > > take back what I said at above. > > > > Then this looks necessary, even though it introduces special case into > > common function free_area_init(). > > The idea is to have a single free_area_init() for all architectures > without keeping two completely different ways of calculating the zone > extents. > Another thing, is that with this we could eventually switch ARC from > DISCONTIGMEM. Yeah, I think uniting them into a single free_area_init() is a great idea. Even though I had been through this patchset, when looked into each of them, still may forget the detail in later patch :)