linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Will Deacon <will@kernel.org>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 1/3] arm64/mm: Drop __HAVE_ARCH_HUGE_PTEP_GET
Date: Wed, 6 May 2020 15:51:42 +0530	[thread overview]
Message-ID: <14911279-f800-a781-a4fd-de43215aa909@arm.com> (raw)
In-Reply-To: <20200506074315.GD7021@willie-the-truck>



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 <catalin.marinas@arm.com>
>> Cc: Will Deacon <will@kernel.org>
>> Cc: Andrew Morton <akpm@linux-foundation.org>
>> Cc: linux-arm-kernel@lists.infradead.org
>> Cc: linux-mm@kvack.org
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
>> ---
>>  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/
> 


  reply	other threads:[~2020-05-06 10:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-06  6:12 [PATCH V2 0/3] mm/hugetlb: Add some new generic fallbacks Anshuman Khandual
2020-05-06  6:12 ` [PATCH V2 1/3] arm64/mm: Drop __HAVE_ARCH_HUGE_PTEP_GET Anshuman Khandual
2020-05-06  7:43   ` Will Deacon
2020-05-06 10:21     ` Anshuman Khandual [this message]
2020-05-06  6:12 ` [PATCH V2 2/3] mm/hugetlb: Define a generic fallback for is_hugepage_only_range() Anshuman Khandual
2020-05-06  6:12 ` [PATCH V2 3/3] mm/hugetlb: Define a generic fallback for arch_clear_hugepage_flags() Anshuman Khandual

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14911279-f800-a781-a4fd-de43215aa909@arm.com \
    --to=anshuman.khandual@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox