[PATCH v7 02/12] mm: x86: add CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG

Yu Zhao yuzhao at google.com
Tue Feb 8 00:27:01 PST 2022


On Tue, Feb 08, 2022 at 01:18:52AM -0700, Yu Zhao wrote:
> Some architectures support the accessed bit in non-leaf PMD entries,
> e.g., x86 sets the accessed bit in a non-leaf PMD entry when using it
> as part of linear address translation [1]. Page table walkers that
> clear the accessed bit may use this capability to reduce their search
> space.
> 
> Note that:
> 1. Although an inline function is preferable, this capability is added
>    as a configuration option for the consistency with the existing
>    macros.
> 2. Due to the little interest in other varieties, this capability was
>    only tested on Intel and AMD CPUs.

Clarified ARCH_HAS_NONLEAF_PMD_YOUNG for x86 as requested here:
https://lore.kernel.org/linux-mm/CAHk-=wgvOqj6LUhNp8V5ddT8eZyYdFDzMZE73KgPggOnc28VWg@mail.gmail.com/

<snipped>

> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 9f5bd41bf660..e787b7fc75be 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -85,6 +85,7 @@ config X86
>  	select ARCH_HAS_PMEM_API		if X86_64
>  	select ARCH_HAS_PTE_DEVMAP		if X86_64
>  	select ARCH_HAS_PTE_SPECIAL
> +	select ARCH_HAS_NONLEAF_PMD_YOUNG

And enabled it for both 32-bit and 64-bit.

<snipped>



More information about the linux-arm-kernel mailing list