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 7F5D0C54FCC for ; Mon, 20 Apr 2020 23:28:01 +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 4B851206D9 for ; Mon, 20 Apr 2020 23:28:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mtCKMhNN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B851206D9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.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:Date: Message-ID:References:To:Subject:From:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=S6H1Rk+AvZmWxW0weikXQuchDOEg9SKUjs3nNOkIUQc=; b=mtCKMhNNRFbVY2 eM0Z+NK45fL0JoHcFJdtZ6sXSAMSX17+ESUC+edww0AenrqsxXx/IMm2eAcss8B02fQaywTe2jx8/ qG4aEVTvEmAXUYa2LORvZf1SecyHFY5Tm89mklki7U0YiWizA+qtO3UosCPXOBa8FalVIADTK7ZH7 MizZsOJO6H7zd7kZ2vCFesJdbht4yhrAKyL9YZd4bHaW5jycZh6GyFRSiM/mFXBHxicjytQW2vDmo AkMba/5Ke/Fjm+tG2p979Bd9H3c0uSgGf4PjdNeWaATTr3hXQfXEDidFNcXKZ6AGkaSv+xaOmv1wI FQaU0iB2l+nFkNxG764A==; 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 1jQfpV-0004WY-Mt; Mon, 20 Apr 2020 23:27:57 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jQfpN-0004Ov-Ni; Mon, 20 Apr 2020 23:27:51 +0000 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 3DF641FB; Mon, 20 Apr 2020 16:27:45 -0700 (PDT) Received: from [192.168.0.129] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6918F3F73D; Mon, 20 Apr 2020 16:27:39 -0700 (PDT) From: Anshuman Khandual Subject: Re: [PATCH 2/2] mm/thp: Rename pmd_mknotpresent() as pmd_mknotvalid() To: Will Deacon 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> Message-ID: <78fee884-78fc-6102-1a37-12106dc21336@arm.com> Date: Tue, 21 Apr 2020 04:57:26 +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: <20200420210354.GD29998@willie-the-truck> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200420_162749_815072_69A726B3 X-CRM114-Status: GOOD ( 12.79 ) 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: x86@kernel.org, Thomas Bogendoerfer , linux-kernel@vger.kernel.org, Peter Zijlstra , Catalin Marinas , "H. Peter Anvin" , Russell King , Steven Rostedt , linux-mips@vger.kernel.org, linux-mm@kvack.org, Ingo Molnar , Borislav Petkov , Dave Hansen , Andy Lutomirski , Vineet Gupta , nouveau@lists.freedesktop.org, Thomas Gleixner , linux-snps-arc@lists.infradead.org, Andrew Morton , linux-arm-kernel@lists.infradead.org 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/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. > > Will > _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc