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 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20200423055559.GF14260@kernel.org> 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 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 List-Id: linux-arch.vger.kernel.org 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 :) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C443CC2BA19 for ; Fri, 24 Apr 2020 00:34:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9874320724 for ; Fri, 24 Apr 2020 00:34:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gaCYbtIK"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="eTmMEfXZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9874320724 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org 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==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRmIN-0001GO-Kz; Fri, 24 Apr 2020 00:34:19 +0000 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120] helo=us-smtp-1.mimecast.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRmIK-0001E1-FV for linux-riscv@lists.infradead.org; Fri, 24 Apr 2020 00:34:18 +0000 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= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-101-PdLkUA6CP7mzy-z_Ga33bw-1; Thu, 23 Apr 2020 20:34:09 -0400 X-MC-Unique: PdLkUA6CP7mzy-z_Ga33bw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 087DD800D24; Fri, 24 Apr 2020 00:34:03 +0000 (UTC) Received: from localhost (ovpn-12-92.pek2.redhat.com [10.72.12.92]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ACFBF1C957; Fri, 24 Apr 2020 00:33:58 +0000 (UTC) Date: Fri, 24 Apr 2020 08:33:56 +0800 From: Baoquan He To: Mike Rapoport Subject: Re: [PATCH 17/21] mm: free_area_init: allow defining max_zone_pfn in descending order 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200423055559.GF14260@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200423_173416_597803_E9BEA800 X-CRM114-Status: GOOD ( 17.49 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 , Mike Rapoport , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, Mark Salter , Matt Turner , linux-mips@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, linux-xtensa@linux-xtensa.org, linux-alpha@vger.kernel.org, linux-um@lists.infradead.org, linux-m68k@lists.linux-m68k.org, Tony Luck , Greentime Hu , Paul Walmsley , Stafford Horne , Guan Xuetao , Hoan Tran , Michal Simek , Thomas Bogendoerfer , Yoshinori Sato , Nick Hu , linux-mm@kvack.org, Vineet Gupta , linux-kernel@vger.kernel.org, openrisc@lists.librecores.org, Richard Weinberger , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org 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 :) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8173C2BA19 for ; Fri, 24 Apr 2020 00:34:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 87B5220724 for ; Fri, 24 Apr 2020 00:34:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KdEgONvP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 87B5220724 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 39C6F8E0005; Thu, 23 Apr 2020 20:34:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 34DE78E0003; Thu, 23 Apr 2020 20:34:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 263B78E0005; Thu, 23 Apr 2020 20:34:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0094.hostedemail.com [216.40.44.94]) by kanga.kvack.org (Postfix) with ESMTP id 07AA88E0003 for ; Thu, 23 Apr 2020 20:34:13 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C12AD5841 for ; Fri, 24 Apr 2020 00:34:12 +0000 (UTC) X-FDA: 76740876744.27.tiger19_41d4d61d90d06 X-HE-Tag: tiger19_41d4d61d90d06 X-Filterd-Recvd-Size: 5851 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Fri, 24 Apr 2020 00:34:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587688451; 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=KdEgONvPhf2zQD4Q1oLX8Ely0LBgNy0lS2p8q13iySOytEW/mNJpWisq+dGCigKsbJy9Xt cxgpfTckjoV58f/Wxxz5HJj8SE5UfXksovh8zrsviVhbiqTiYbSQvG0GeK9XebBT6TMs0q CMoiN9EFU71/wJ078VeHCYoDXCnYtpg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-101-PdLkUA6CP7mzy-z_Ga33bw-1; Thu, 23 Apr 2020 20:34:09 -0400 X-MC-Unique: PdLkUA6CP7mzy-z_Ga33bw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 087DD800D24; Fri, 24 Apr 2020 00:34:03 +0000 (UTC) Received: from localhost (ovpn-12-92.pek2.redhat.com [10.72.12.92]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ACFBF1C957; Fri, 24 Apr 2020 00:33:58 +0000 (UTC) Date: Fri, 24 Apr 2020 08:33:56 +0800 From: Baoquan He To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, Andrew Morton , Brian Cain , Catalin Marinas , "David S. Miller" , Geert Uytterhoeven , Greentime Hu , Greg Ungerer , Guan Xuetao , Guo Ren , Heiko Carstens , Helge Deller , Hoan Tran , "James E.J. Bottomley" , Jonathan Corbet , Ley Foon Tan , Mark Salter , Matt Turner , Max Filippov , Michael Ellerman , Michal Hocko , Michal Simek , Nick Hu , Paul Walmsley , Richard Weinberger , Rich Felker , Russell King , Stafford Horne , Thomas Bogendoerfer , Tony Luck , Vineet Gupta , x86@kernel.org, Yoshinori Sato , linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-csky@vger.kernel.org, linux-doc@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, Mike Rapoport Subject: Re: [PATCH 17/21] mm: free_area_init: allow defining max_zone_pfn in descending order 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200423055559.GF14260@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 :) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD896C2BA19 for ; Fri, 24 Apr 2020 00:36:16 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 801DE20724 for ; Fri, 24 Apr 2020 00:36:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ajMWxHXT"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ajMWxHXT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 801DE20724 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 497ZwZ2M7lzDr84 for ; Fri, 24 Apr 2020 10:36:14 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=redhat.com (client-ip=207.211.31.81; helo=us-smtp-delivery-1.mimecast.com; envelope-from=bhe@redhat.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ajMWxHXT; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=ajMWxHXT; dkim-atps=neutral Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 497ZtJ0V9JzDr4M for ; Fri, 24 Apr 2020 10:34:15 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587688452; 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=ajMWxHXT2w7PK1YNEfcT4u5MfXF7NLTrQHRMfcHeo8VEd65ITKkjgBlIHMhhf/x2yMEFlP 1KY3c1Sg68XtDRtBTnLanl6wH+u/KhpeOFt82XNQVEUVs6HtRR7Iz7c4lVwuJb3LEZaD5x Cw132f/1eJlmbpV50uV9329c4A/Q7fA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587688452; 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=ajMWxHXT2w7PK1YNEfcT4u5MfXF7NLTrQHRMfcHeo8VEd65ITKkjgBlIHMhhf/x2yMEFlP 1KY3c1Sg68XtDRtBTnLanl6wH+u/KhpeOFt82XNQVEUVs6HtRR7Iz7c4lVwuJb3LEZaD5x Cw132f/1eJlmbpV50uV9329c4A/Q7fA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-101-PdLkUA6CP7mzy-z_Ga33bw-1; Thu, 23 Apr 2020 20:34:09 -0400 X-MC-Unique: PdLkUA6CP7mzy-z_Ga33bw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 087DD800D24; Fri, 24 Apr 2020 00:34:03 +0000 (UTC) Received: from localhost (ovpn-12-92.pek2.redhat.com [10.72.12.92]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ACFBF1C957; Fri, 24 Apr 2020 00:33:58 +0000 (UTC) Date: Fri, 24 Apr 2020 08:33:56 +0800 From: Baoquan He To: Mike Rapoport Subject: Re: [PATCH 17/21] mm: free_area_init: allow defining max_zone_pfn in descending order 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200423055559.GF14260@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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, Helge Deller , x86@kernel.org, Russell King , Ley Foon Tan , Mike Rapoport , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, Mark Salter , Matt Turner , linux-mips@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, linux-xtensa@linux-xtensa.org, linux-alpha@vger.kernel.org, linux-um@lists.infradead.org, linux-m68k@lists.linux-m68k.org, Tony Luck , Greentime Hu , Paul Walmsley , Stafford Horne , Guan Xuetao , Hoan Tran , Michal Simek , Thomas Bogendoerfer , Yoshinori Sato , Nick Hu , linux-mm@kvack.org, Vineet Gupta , linux-kernel@vger.kernel.org, openrisc@lists.librecores.org, Richard Weinberger , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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 :) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81807C54FCB for ; Fri, 24 Apr 2020 00:34:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 593CA20724 for ; Fri, 24 Apr 2020 00:34:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EXbMG4dQ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="eTmMEfXZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 593CA20724 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9m/PLRiL7OIezusxDNcJ7QFAo2KgBK+JT8qvh/waCEM=; b=EXbMG4dQy+brBU 5AdTiDmCVEEV9JBaUuxt2R8V1UI8FtVu7PwgFKoWtMabTRcftvyOJcaR3AmlZkrcJL4mk+8qtzN3x 8X+rMnZGM97k6sSqbJ4EISKNGqwjRLxdHuYV8QLdZhazg4OGJ1ZdNZDyH8wMoNn6iNOnKf9pwrZo+ O2FrgL4dOibRkcykSYZcylkkJ0qTAAQqSBKX4hDzCnJCq348ZUFYTixSXRTImuoW03L1VmQW/yJyj ZC6I0iRlVRRVmJjuCrnU2I5trIriiem4aD0jG4LdlxeGgAckkusRNmkjrKt55sQW/fW7gpeatVzwi wtcZKKSJMO+YTpU/S2LA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRmIO-0001HH-Ed; Fri, 24 Apr 2020 00:34:20 +0000 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120] helo=us-smtp-1.mimecast.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRmIK-0001E2-FQ for linux-snps-arc@lists.infradead.org; Fri, 24 Apr 2020 00:34:18 +0000 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= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-101-PdLkUA6CP7mzy-z_Ga33bw-1; Thu, 23 Apr 2020 20:34:09 -0400 X-MC-Unique: PdLkUA6CP7mzy-z_Ga33bw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 087DD800D24; Fri, 24 Apr 2020 00:34:03 +0000 (UTC) Received: from localhost (ovpn-12-92.pek2.redhat.com [10.72.12.92]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ACFBF1C957; Fri, 24 Apr 2020 00:33:58 +0000 (UTC) Date: Fri, 24 Apr 2020 08:33:56 +0800 From: Baoquan He To: Mike Rapoport Subject: Re: [PATCH 17/21] mm: free_area_init: allow defining max_zone_pfn in descending order 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 Content-Disposition: inline In-Reply-To: <20200423055559.GF14260@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200423_173416_596587_013CBFC3 X-CRM114-Status: GOOD ( 17.49 ) X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 , Mike Rapoport , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, Mark Salter , Matt Turner , linux-mips@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, linux-xtensa@linux-xtensa.org, linux-alpha@vger.kernel.org, linux-um@lists.infradead.org, linux-m68k@lists.linux-m68k.org, Tony Luck , Greentime Hu , Paul Walmsley , Stafford Horne , Guan Xuetao , Hoan Tran , Michal Simek , Thomas Bogendoerfer , Yoshinori Sato , Nick Hu , linux-mm@kvack.org, Vineet Gupta , linux-kernel@vger.kernel.org, openrisc@lists.librecores.org, Richard Weinberger , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+linux-snps-arc=archiver.kernel.org@lists.infradead.org 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 :) _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc From mboxrd@z Thu Jan 1 00:00:00 1970 From: Baoquan He Date: Fri, 24 Apr 2020 08:33:56 +0800 Subject: [OpenRISC] [PATCH 17/21] mm: free_area_init: allow defining max_zone_pfn in descending order In-Reply-To: <20200423055559.GF14260@kernel.org> 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> Message-ID: <20200424003356.GA10119@MiWiFi-R3L-srv> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: openrisc@lists.librecores.org 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 :)