[PATCH v2 12/16] mm/vmemmap optimization: Split hugetlb and devdax vmemmap optimization
Ritesh Harjani (IBM)
ritesh.list at gmail.com
Wed Jun 28 11:09:30 AEST 2023
"Aneesh Kumar K.V" <aneesh.kumar at linux.ibm.com> writes:
> Arm disabled hugetlb vmemmap optimization [1] because hugetlb vmemmap
> optimization includes an update of both the permissions (writeable to
> read-only) and the output address (pfn) of the vmemmap ptes. That is not
> supported without unmapping of pte(marking it invalid) by some
> architectures.
>
> With DAX vmemmap optimization we don't require such pte updates and
> architectures can enable DAX vmemmap optimization while having hugetlb
> vmemmap optimization disabled. Hence split DAX optimization support into a
> different config.
>
> loongarch and riscv don't have devdax support. So the DAX config is not
> enabled for them. With this change, arm64 should be able to select DAX
> optimization
>
> [1] commit 060a2c92d1b6 ("arm64: mm: hugetlb: Disable HUGETLB_PAGE_OPTIMIZE_VMEMMAP")
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar at linux.ibm.com>
> ---
> arch/loongarch/Kconfig | 2 +-
> arch/riscv/Kconfig | 2 +-
> arch/x86/Kconfig | 3 ++-
> fs/Kconfig | 2 +-
> include/linux/mm.h | 2 +-
> mm/Kconfig | 5 ++++-
> 6 files changed, 10 insertions(+), 6 deletions(-)
what about s390?
git grep "ARCH_WANT_OPTIMIZE_VMEMMAP" .
arch/s390/Kconfig: select ARCH_WANT_OPTIMIZE_VMEMMAP
> diff --git a/mm/Kconfig b/mm/Kconfig
> index 7672a22647b4..7b388c10baab 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -461,7 +461,10 @@ config SPARSEMEM_VMEMMAP
> # Select this config option from the architecture Kconfig, if it is preferred
> # to enable the feature of HugeTLB/dev_dax vmemmap optimization.
> #
> -config ARCH_WANT_OPTIMIZE_VMEMMAP
> +config ARCH_WANT_OPTIMIZE_DAX_VMEMMAP
> + bool
> +
> +config ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
> bool
>
> config HAVE_MEMBLOCK_PHYS_MAP
> --
> 2.40.1
-ritesh
More information about the Linuxppc-dev
mailing list