Re: [PATCH v2 5/6] s390/mm: Batch PTE updates in lazy MMU mode

Heiko Carstens
2026-04-16T05:41:02Z

On Wed, Apr 15, 2026 at 05:01:23PM +0200, Alexander Gordeev wrote:
> diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
> index 7828fbe0fc42..deffc819268e 100644
> --- a/arch/s390/Kconfig
> +++ b/arch/s390/Kconfig
> @@ -732,6 +732,17 @@ config MAX_PHYSMEM_BITS
> Increasing the number of bits also increases the kernel image size.
> By default 46 bits (64TB) are supported.
>
> +config IPTE_BATCH
> + def_bool y
> + prompt "Enables Additional Entries for IPTE instruction"
> + select ARCH_HAS_LAZY_MMU_MODE
> + help
> + This option enables using of "Additional Entries" field of the IPTE
> + instruction, which capitalizes on the lazy MMU mode infrastructure.
> + As result, multiple PTEs are invalidated in one go. That improves
> + performance of many memory-management system calls (like mremap(),
> + mprotect(), etc.) and decreases CEC-wide quiesce traffic.
> +
> endmenu

Just some general comments before I find time to look deeper into this
series: please let us not add yet another config option. This will be
enabled anywhere in any case.

Not having this option makes maintenance easier.

> +#if !defined(CONFIG_IPTE_BATCH) || defined(__DECOMPRESSOR)
> +static inline
> +bool ipte_batch_ptep_test_and_clear_young(struct vm_area_struct *vma,
> + unsigned long addr, pte_t *ptep,
> + int *res)
> +{
> + return false;
> +}

Why does this depend on __DECOMPRESSOR? Which code in the decompressor
would generate a call to the ipte_batch functions?