From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f72.google.com (mail-pl0-f72.google.com [209.85.160.72]) by kanga.kvack.org (Postfix) with ESMTP id 2ADD06B0006 for ; Tue, 27 Mar 2018 21:50:23 -0400 (EDT) Received: by mail-pl0-f72.google.com with SMTP id d14-v6so623286plj.4 for ; Tue, 27 Mar 2018 18:50:23 -0700 (PDT) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id ay8-v6sor1225084plb.120.2018.03.27.18.50.21 for (Google Transport Security); Tue, 27 Mar 2018 18:50:21 -0700 (PDT) Subject: Re: [PATCH v2 1/5] mm: page_alloc: remain memblock_next_valid_pfn() when CONFIG_HAVE_ARCH_PFN_VALID is enable References: <1521894282-6454-1-git-send-email-hejianet@gmail.com> <1521894282-6454-2-git-send-email-hejianet@gmail.com> From: Jia He Message-ID: <0a8ba07b-b046-c1b4-9c4e-74d7b5dc370e@gmail.com> Date: Wed, 28 Mar 2018 09:49:53 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: owner-linux-mm@kvack.org List-ID: To: Daniel Vacek Cc: Andrew Morton , Michal Hocko , Catalin Marinas , Mel Gorman , Will Deacon , Mark Rutland , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Pavel Tatashin , Daniel Jordan , AKASHI Takahiro , Gioh Kim , Steven Sistare , Eugeniu Rosca , Vlastimil Babka , open list , linux-mm@kvack.org, James Morse , Ard Biesheuvel , Steve Capper , x86@kernel.org, Greg Kroah-Hartman , Kate Stewart , Philippe Ombredanne , Johannes Weiner , Kemi Wang , Petr Tesarik , YASUAKI ISHIMATSU , Andrey Ryabinin , Nikolay Borisov , Jia He On 3/28/2018 12:52 AM, Daniel Vacek Wrote: > On Sat, Mar 24, 2018 at 1:24 PM, Jia He wrote: >> Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns >> where possible") optimized the loop in memmap_init_zone(). But it causes >> possible panic bug. So Daniel Vacek reverted it later. >> >> But memblock_next_valid_pfn is valid when CONFIG_HAVE_ARCH_PFN_VALID is >> enabled. And as verified by Eugeniu Rosca, arm can benifit from this >> commit. So remain the memblock_next_valid_pfn. > It is not dependent on CONFIG_HAVE_ARCH_PFN_VALID option but on > arm(64) implementation of pfn_valid() function, IIUC. So it should > really be moved from generic source file to arm specific location. I'd > say somewhere close to the pfn_valid() implementation. Such as to > arch/arm{,64}/mm/ init.c-ish? > > --nX Ok, thanks for your suggestions. I will try to move theA related codes to arm arch directory. Cheer, Jia