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.2 required=3.0 tests=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 6E148C433DF for ; Tue, 16 Jun 2020 09:49:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2605C2074D for ; Tue, 16 Jun 2020 09:49:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2605C2074D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C08218D0003; Tue, 16 Jun 2020 05:49:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B9A4A8D0002; Tue, 16 Jun 2020 05:49:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A81D88D0003; Tue, 16 Jun 2020 05:49:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0135.hostedemail.com [216.40.44.135]) by kanga.kvack.org (Postfix) with ESMTP id 8C9B78D0002 for ; Tue, 16 Jun 2020 05:49:02 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 536B08248076 for ; Tue, 16 Jun 2020 09:49:02 +0000 (UTC) X-FDA: 76934601324.04.cent47_080a1cf26dfe Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id 25F72800DE05 for ; Tue, 16 Jun 2020 09:49:02 +0000 (UTC) X-HE-Tag: cent47_080a1cf26dfe X-Filterd-Recvd-Size: 2334 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Tue, 16 Jun 2020 09:49:01 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BB3001FB; Tue, 16 Jun 2020 02:49:00 -0700 (PDT) Received: from [10.163.80.105] (unknown [10.163.80.105]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0160C3F6CF; Tue, 16 Jun 2020 02:48:58 -0700 (PDT) Subject: Re: [PATCH] mm/pgtable: Move extern zero_pfn outside __HAVE_COLOR_ZERO_PAGE To: David Hildenbrand , linux-mm@kvack.org Cc: Arnd Bergmann , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org References: <1592280498-15442-1-git-send-email-anshuman.khandual@arm.com> From: Anshuman Khandual Message-ID: <19858112-8f10-493c-9873-84f2000b00b0@arm.com> Date: Tue, 16 Jun 2020 15:18:53 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 25F72800DE05 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000004, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 06/16/2020 01:09 PM, David Hildenbrand wrote: > On 16.06.20 06:08, Anshuman Khandual wrote: >> zero_pfn variable is required whether __HAVE_COLOR_ZERO_PAGE is enabled > > Why is that relevant for this patch? That just states how it is organized right now wrt __HAVE_COLOR_ZERO_PAGE. > >> or not. Also it should not really be declared individually in all functions >> where it gets used. Just move the declaration outside, which also makes it >> available for other potential users. > > So, all you're essentially doing is exposing zero_pfn in pgtable.h now. Right, but it just happens in the process of consolidating three different instances of 'extern unsigned long zero_pfn' in the same file which are redundant. > > If everybody should just use my_zero_pfn(), I don't really see the > benefit of this patch, sorry. It consolidates redundant declarations and reduces code. We could just have a comment for zero_pfn stating that it should not be used directly.