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=-8.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 246AAC28CBC for ; Wed, 6 May 2020 10:22:22 +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 EBA68206DB for ; Wed, 6 May 2020 10:22:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ByW3wNev" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EBA68206DB 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-arm-kernel-bounces+infradead-linux-arm-kernel=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:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FVUoCFtKQu7/NRCJPtqUtLVx7SVjeIDul5bQSp5ZGBM=; b=ByW3wNevKCPcNg atM/EpE4w7faJgUi960B4tQqJAR4MY3/5F7YxMJcUmgG2g3vMc6nBengLLCSUaAKiokyYUkSvDC55 j58p6hHeFnXlu3KhFhwT4ILraMqYz2pMf0K5P7RsAdDOX9YeebYo9BtdidelOVjuyYHAPR09AMntK dAmg3Bj97t8owiq02SilVWvW2gkvokTde7/Frw09B9MkCpFpVqkeO9J7ltxsTm6goph9i+Yrjn8km wllvbjfIXulrhcEtcBO/X15Iyf1II36ccbPYxLjflKWbyj363tDutYbN4Gw0yIGteg3CL1b9eNW8F +6cgi6RAWTs1TPg57L7A==; 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 1jWHBy-00034M-Rj; Wed, 06 May 2020 10:22:18 +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 1jWHBv-00033v-N8 for linux-arm-kernel@lists.infradead.org; Wed, 06 May 2020 10:22:17 +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 239E730E; Wed, 6 May 2020 03:22:15 -0700 (PDT) Received: from [10.163.71.196] (unknown [10.163.71.196]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E9A7E3F71F; Wed, 6 May 2020 03:22:12 -0700 (PDT) Subject: Re: [PATCH V2 1/3] arm64/mm: Drop __HAVE_ARCH_HUGE_PTEP_GET To: Will Deacon References: <1588745534-24418-1-git-send-email-anshuman.khandual@arm.com> <1588745534-24418-2-git-send-email-anshuman.khandual@arm.com> <20200506074315.GD7021@willie-the-truck> From: Anshuman Khandual Message-ID: <14911279-f800-a781-a4fd-de43215aa909@arm.com> Date: Wed, 6 May 2020 15:51:42 +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: <20200506074315.GD7021@willie-the-truck> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200506_032215_795967_9239A6CE X-CRM114-Status: GOOD ( 17.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mm@kvack.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Catalin Marinas Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 05/06/2020 01:13 PM, Will Deacon wrote: > On Wed, May 06, 2020 at 11:42:12AM +0530, Anshuman Khandual wrote: >> Platform specific huge_ptep_get() is required only when fetching the huge >> PTE involves more than just dereferencing the page table pointer. This is >> not the case on arm64 platform. Hence huge_ptep_pte() can be dropped along >> with it's __HAVE_ARCH_HUGE_PTEP_GET subscription. >> >> Cc: Catalin Marinas >> Cc: Will Deacon >> Cc: Andrew Morton >> Cc: linux-arm-kernel@lists.infradead.org >> Cc: linux-mm@kvack.org >> Cc: linux-kernel@vger.kernel.org >> Signed-off-by: Anshuman Khandual >> --- >> arch/arm64/include/asm/hugetlb.h | 6 ------ >> 1 file changed, 6 deletions(-) >> >> diff --git a/arch/arm64/include/asm/hugetlb.h b/arch/arm64/include/asm/hugetlb.h >> index 2eb6c234d594..b88878ddc88b 100644 >> --- a/arch/arm64/include/asm/hugetlb.h >> +++ b/arch/arm64/include/asm/hugetlb.h >> @@ -17,12 +17,6 @@ >> extern bool arch_hugetlb_migration_supported(struct hstate *h); >> #endif >> >> -#define __HAVE_ARCH_HUGE_PTEP_GET >> -static inline pte_t huge_ptep_get(pte_t *ptep) >> -{ >> - return READ_ONCE(*ptep); >> -} > > Hmm, I'm nervous about dropping the READ_ONCE() here. We added them after > running into page-table issues with THP [1] and it's really important to > use them consistently to avoid hitting that again. > > If the generic code used READ_ONCE(), I'd be happy to switch to it. Sure, will add READ_ONCE() in the generic huge_ptep_get(). AFAICS it should not cause any problem for other platforms (but let me know otherwise). > > Will > > [1] https://lore.kernel.org/lkml/1506527369-19535-1-git-send-email-will.deacon@arm.com/ > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel