Re: [RFC PATCH] mm: page_alloc: Add kernel parameter to select maximum PCP batch scale number

From: Claudiu Beznea
Date: Mon Mar 24 2025 - 10:28:38 EST


Hi,

On 26.11.2024 11:51, Claudiu wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
>
> Commit 52166607ecc9 ("mm: restrict the pcp batch scale factor to avoid
> too long latency") introduced default PCP (Per-CPU Pageset) batch size as
> a configuration flag. The configuration flag is CONFIG_PCP_BATCH_SCALE_MAX.
>
> The ARM64 defconfig has CONFIG_PCP_BATCH_SCALE_MAX=5. This defconfig
> is used by a high range of SoCs.
>
> The Renesas RZ/G3S SoC is a single CPU SoC, with L1$ (I-cache 32Kbytes,
> D-cache 32 Kbytes), L3$ (256 Kbytes), but no L2$. It is currently used in
> a configuration with 1 GiB RAM size. In this configuration, starting with
> commit 52166607ecc9 ("mm: restrict the pcp batch scale factor to avoid too
> long latency") the "bonnie++ -d /mnt -u root" benchmark takes ~14 minutes
> while previously it took ~10 minutes. The /mnt directory is mounted on SD
> card. Same behavior is reproduced on similar Renesas single core devices
> (e.g., Renesas RZ/G2UL).
>
> Add a new kernel parameter to allow systems like Renesas RZ/G3S to
> continue have the same performance numbers with the default mainline
> ARM64 config. With pcp_batch_scale_max=5 (the default value) the bonnie++
> benchmark takes ~14 minutes while with pcp_batch_scale_max=0 it takes
> ~10 minutes.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
> ---

Can you please let me know your input on this patch?

Thank you,
Claudiu