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.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 59553C55182 for ; Tue, 21 Apr 2020 07:07:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1F2722098B for ; Tue, 21 Apr 2020 07:07:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="NUGOg1mX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F2722098B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DC0068E0005; Tue, 21 Apr 2020 03:07:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D6F998E0003; Tue, 21 Apr 2020 03:07:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C85838E0005; Tue, 21 Apr 2020 03:07:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0254.hostedemail.com [216.40.44.254]) by kanga.kvack.org (Postfix) with ESMTP id B05D68E0003 for ; Tue, 21 Apr 2020 03:07:13 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 66358181AEF10 for ; Tue, 21 Apr 2020 07:07:13 +0000 (UTC) X-FDA: 76730980746.19.cap06_793bcdb35f749 X-HE-Tag: cap06_793bcdb35f749 X-Filterd-Recvd-Size: 4217 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Tue, 21 Apr 2020 07:07:12 +0000 (UTC) Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E98DB206A5; Tue, 21 Apr 2020 07:07:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587452832; bh=nSyfKCbkaVtKHCZaeQ7c7Ek5l6MXuMmFCJQlpVuLZfU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NUGOg1mXOuq/6HjHGlurmlbGhycqsLCFz0LK/ZaeGdY21oV5cjw12MYLtLeAPVFbw VfFOlg1Z5rWrrgro1MaB35twX1Nt57OaWBkyZtWSW5gWCA7FSq6FKpOboLcPfpRpUG 9JxWfHvdPYP99brmwfjsmetxSMPBroBpO5dVQfOY= Date: Tue, 21 Apr 2020 08:07:05 +0100 From: Will Deacon To: Anshuman Khandual Cc: linux-mm@kvack.org, Vineet Gupta , Russell King , Catalin Marinas , Thomas Bogendoerfer , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Steven Rostedt , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Andrew Morton , nouveau@lists.freedesktop.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] mm/thp: Rename pmd_mknotpresent() as pmd_mknotvalid() Message-ID: <20200421070703.GC14448@willie-the-truck> References: <1584680057-13753-1-git-send-email-anshuman.khandual@arm.com> <1584680057-13753-3-git-send-email-anshuman.khandual@arm.com> <20200420210354.GD29998@willie-the-truck> <78fee884-78fc-6102-1a37-12106dc21336@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <78fee884-78fc-6102-1a37-12106dc21336@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Tue, Apr 21, 2020 at 04:57:26AM +0530, Anshuman Khandual wrote: > > > On 04/21/2020 02:33 AM, Will Deacon wrote: > > On Fri, Mar 20, 2020 at 10:24:17AM +0530, Anshuman Khandual wrote: > >> pmd_present() is expected to test positive after pmdp_mknotpresent() as the > >> PMD entry still points to a valid huge page in memory. pmdp_mknotpresent() > >> implies that given PMD entry is just invalidated from MMU perspective while > >> still holding on to pmd_page() referred valid huge page thus also clearing > >> pmd_present() test. This creates the following situation which is counter > >> intuitive. > >> > >> [pmd_present(pmd_mknotpresent(pmd)) = true] > >> > >> This renames pmd_mknotpresent() as pmd_mknotvalid() reflecting the helper's > >> functionality more accurately while changing the above mentioned situation > >> as follows. This does not create any functional change. > >> > >> [pmd_present(pmd_mknotvalid(pmd)) = true] > >> > >> This is not applicable for platforms that define own pmdp_invalidate() via > >> __HAVE_ARCH_PMDP_INVALIDATE. Suggestion for renaming came during a previous > >> discussion here. > > > > Bikeshed alert: maybe pmd_mkinvalid() would be better, given that this is > > a one-trick pony for pmdp_invalidate()? > > I had thought about making it pmd_mkinvalid() earlier. But as we were replacing > pmd_mknotpresent(), hence went with similar pattern pmd_mknotvalid() which was > originally suggested by Catalin. There is an existing pte_mknotpresent() in arc > platform as well. I dont have a very strong opinion either way, will be happy > to rename. But then still wondering if we really need to. I just think that having pmdp_invalidate() call pmd_mkinvalid() makes a lot of sense and, since this is a pure renaming patch, then that's worth taking into consideration. If you go with pmd_mkinvalid(), then: Acked-by: Will Deacon Will