[PATCH] arm64: clear_page[s] using memset
Linus Walleij
linusw at kernel.org
Wed Aug 26 04:50:25 PDT 2026
On Mon, Aug 24, 2026 at 3:38 PM Usama Anjum <usama.anjum at arm.com> wrote:
> I've ran tests for with 1 warmup and 3 repeats in 4 sessions (12 times).
>
> Results for SUT Class aws-m7g.metal:
> ╭─────────────┬────────────────────────────────────────────────┬───────────────────────────────────────────────┬───────────────────────────────────────────╮
> │ Benchmark │ Result Class │ next-20260821 without this patch (base) │ next-20260821 with this patch │
> ├─────────────┼────────────────────────────────────────────────┼───────────────────────────────────────────────┼───────────────────────────────────────────┤
> │ perf/mem │ memset -k 1GB -f default -s 16GB (bytes/sec) │ 63932542232.12 │ 1.92% │
> │ │ mmap -p 1GB -f demand -s 32GB -l 5 (bytes/sec) │ 63272579168.03 │ -0.57% │
> │ │ mmap -p 4KB -f demand -s 32GB -l 5 (bytes/sec) │ 49692830849.48 │ -1.11% │
> ╰─────────────┴────────────────────────────────────────────────┴───────────────────────────────────────────────┴───────────────────────────────────────────╯
>
> Results for SUT Class cesw-aarch64-ampereone-1s-a192-32x:
> ╭─────────────┬────────────────────────────────────────────────┬───────────────────────────────────────────────┬───────────────────────────────────────────╮
> │ Benchmark │ Result Class │ next-20260821 without this patch (base) │ next-20260821 with this patch │
> ├─────────────┼────────────────────────────────────────────────┼───────────────────────────────────────────────┼───────────────────────────────────────────┤
> │ perf/mem │ memset -k 1GB -f default -s 16GB (bytes/sec) │ 33895562998.71 │ 0.25% │
> │ │ mmap -p 1GB -f demand -s 32GB -l 5 (bytes/sec) │ 34338454210.17 │ 1.16% │
> │ │ mmap -p 4KB -f demand -s 32GB -l 5 (bytes/sec) │ 25687107580.90 │ -0.85% │
> ╰─────────────┴────────────────────────────────────────────────┴───────────────────────────────────────────────┴───────────────────────────────────────────╯
Looking at these results and comparing to e.g. this committ:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=94962b2628e6af2c48be6ebdf9f76add28d60ecc
These results are all just noise, the clear_page() optimization over memset() is
pointless on ARM64 and this patch can be applied.
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list