Re: [RFC PATCH v3 0/4] mm: enable lru cache for smaller large folios
From: Barry Song
Date: Fri Sep 11 2026 - 17:22:20 EST
On Fri, Sep 11, 2026 at 11:39 PM Garg, Shivank <shivankg@xxxxxxx> wrote:
[...]
>
> Thanks for this series.
> I tested this against a Graph500 regression with 16K mTHP.
> The series removes the regression and reduces folio_lruvec_lock_irqsave contention to approximately the 4K rate.
>
>
> Tested-by: Shivank Garg <shivankg@xxxxxxx>
>
Thanks very much, Shivank. I’m very happy to see that
mTHP LRUCACHE not only resolves your regression but also
improves the performance of your case.
As discussed with David, this series will be respun after Hugh’s
work[1] is merged.
In the meantime, I’d really appreciate it if you could test an
updated version that I haven’t sent out before:
https://git.kernel.org/pub/scm/linux/kernel/git/baohua/linux.git/log/?h=mthp_lrucache
It includes some modifications based on Sashiko’s review comments
on the version you tested. I’d like to know whether it still provides
the same performance gains you saw with that version.
[1] https://lore.kernel.org/linux-mm/e28f9a94-4339-f8ac-8301-6be3c9b5b7ce@xxxxxxxxxx/
>
> System and Workload
> ===================
>
> AMD EPYC Zen 5 System, 2 sockets, 160 cores/socket,
> SMT on -> 320 cores / 640 threads
> 2 NUMA nodes, ~512 GB/node
> node 0 CPUs: 0-159,320-479
>
> Base: v7.3-rc2+ (50d05c7c76c9)
> Runtime: performance governor, preempt=full (lazy)
>
> Workload: Graph500, Scale 27, edgefactor 16
> Metric: median_time in ms (lower is better)
>
> Bind to node 0 with numactl -C 0-159,320-479 -m 0
>
>
> Performance
> ===========
>
> Base Patched delta
> 4K 109.60 109.11 -0.4%
> mTHP-16K 144.10 99.00 -31.3%
> mTHP-64K 104.75 104.25 -0.5%
>
> mTHP-16K was ~31% slower than THP-never, due to lock contentions.
> With your series, mTHP-16 performs ~9% faster than THP-never.
>
>
> The dominant folio_lruvec_lock_irqsave entries were:
>
> Base Patched
> contended wait contended wait
> 4K 834603 2.41 m 844193 2.61 m
> mTHP-16K 7008834 28.88 m 840695 4.87 m
> mTHP-64K 188144 752 ms 40874 93.46 ms
>
>
Best Regards
Barry