Received: by 10.213.65.68 with SMTP id h4csp143218imn; Tue, 27 Mar 2018 18:51:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx49oG9xuum9iKLygabPF0mx5JGoNZv7/lHeetWAsdx83KorIrLO+1E2/m094sY+Fyr1bmjqn X-Received: by 2002:a17:902:bf43:: with SMTP id u3-v6mr1644548pls.227.1522201897691; Tue, 27 Mar 2018 18:51:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522201897; cv=none; d=google.com; s=arc-20160816; b=PCU2OCeIBjw3J4OcmKUqQg7VyWmGGWKFR3WXxuysQbQADchbzsFvkn2SbCVQorU7/Z qBC59eC4hDIyZ8qpMFUtX46bA6je56jVJmEW5e2M3LblfZ+6m6Y7YTwma7b8sV0aDYEM jIiEUTaiq22QCbg1Sy/WcpQOEpdqhZKnrfHF+UiUtU3t2ZmjfHnjxApSoYMonJTHeK0u Ttb74LxthunMUOlmSYwndwvHupWjXIskCiXrvwlINNWol6Sj+uMJeAC149lMsXZVOeR+ FolJKKPtTR6NCwbv/cixObgbxRa1AA4Kz+gFPNdHL9yyilh+q28Cf3t73PTWr7jh/pqH Oz4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject:dkim-signature:arc-authentication-results; bh=RYKw4QU1UBPiC0ZzqdQSmvZgwaA6Id1MKdm50S6r/rw=; b=evaf6FJtOelfywfYbnZ7Auwc/GI7KpPRvDLyxUn+z/ZT9bJWySXvrom6Hk6qksB8DG Oo9JWXbQSuEgSC/Td+skYQFfzkqyywaF0ORjqGfA7jKDpzKPXtQlcAqeSjwkwWI4MLyb 2NVgUP3mP7GSG3X6EZGRLW/0GfEhCqRFCaArW/h/Sojvm8S9JBbc4p+FAwKeGnZYbTTe /GcdWSzX8U7edpbkHd5ngzipvdvRdnvoxWiAhfvQZ3jlHNp9H6wq06mUByOjUn6wGDem IEhgG+17M2MS1BlQMHSQricutqAsbbQQPj9ghmbDsZvF8rad8a2p068cgjwSzuE0gpr5 urhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Jf0H2XNo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17si1713252pgq.421.2018.03.27.18.51.22; Tue, 27 Mar 2018 18:51:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Jf0H2XNo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752594AbeC1BuW (ORCPT + 99 others); Tue, 27 Mar 2018 21:50:22 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:33056 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752311AbeC1BuV (ORCPT ); Tue, 27 Mar 2018 21:50:21 -0400 Received: by mail-pl0-f65.google.com with SMTP id c11-v6so627060plo.0 for ; Tue, 27 Mar 2018 18:50:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=RYKw4QU1UBPiC0ZzqdQSmvZgwaA6Id1MKdm50S6r/rw=; b=Jf0H2XNosL118SpMKcV0SALvxyuJC4Xp310IC5x3dXqddqZ1v6cuR8U/Bj9sGm7Zzn Fl1xwuntBiPjQqm73QhXbVm8wKC35lcecpgvtVBMRTRJ1+96XOrie13RlzN6IdeDIc8s lJHpOPPhxJGBtC598paFLOb1NmQKSoeXsExibxhs6AYBD9+Yfy6Incgbjgoa1XuAl458 Q47TviMKaZLnMnXp2Cp5yDC671a6IH5rzaMKGklz1sDjuapY3Y4CzSevuRP66cNhDv8b C4kWn6JQ024TnrUVOHJmX7wqOg5ovXcii29IV0tM1qPVct1+phMa7j3vGeiSRx0y6qq2 Awpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=RYKw4QU1UBPiC0ZzqdQSmvZgwaA6Id1MKdm50S6r/rw=; b=XaUlN9G7yOarWUxgEbiGyRtoGrwkVUsa06UVk61LChTFrSfFwmDgX+4EyQjmU+SmmA RXOYhP6qxChR/QMBAb7JqnP2eMCu4DiaXzKCQxT9gXS1mbRLiNrmHJlEwFtY7gC2zRR2 XHALi1kBr0dmujrK4htXE+2Bu9rp5r04DP2iSe+pFnjgSNz+ppOJ5n9nOmU3OBra9Pv4 0LdPU/3hPRUpaPpppSzEQJtMVQbloYSkeGHHGvmiDJ9OD72/33RSyBvmsOvkt4+DNPB2 Z3slRFy0PO6mDwdc+pffrTrBmDrTuezODV8tZjF4qVbw5gyzf4EyIHXK2UFKzGNN5/Ub d2TQ== X-Gm-Message-State: AElRT7GLDeRTHR67Acrel8FKfxxiKzOxN6Wq1c5zuZEWkoyTQJCQ+Z1J w2JhMi4PhUufPgoE+JORpOo= X-Received: by 2002:a17:902:2884:: with SMTP id f4-v6mr1671042plb.153.1522201820544; Tue, 27 Mar 2018 18:50:20 -0700 (PDT) Received: from [0.0.0.0] (67.216.217.169.16clouds.com. [67.216.217.169]) by smtp.gmail.com with ESMTPSA id 12sm5263565pfr.108.2018.03.27.18.49.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Mar 2018 18:50:20 -0700 (PDT) Subject: Re: [PATCH v2 1/5] mm: page_alloc: remain memblock_next_valid_pfn() when CONFIG_HAVE_ARCH_PFN_VALID is enable 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 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 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 theĀ  related codes to arm arch directory. Cheer, Jia