Re: [SLUB] nfs_page cmpxchg_double_fail and perf lock perturbation on dual-socket NFS/RDMA

From: Namhyung Kim

Date: Fri Sep 18 2026 - 03:17:54 EST


On Thu, Sep 17, 2026 at 03:10:47PM +0100, Harry Yoo wrote:
> ... now I realize we need to add PERFORMANCE EVENTS SUBSYSTEM folks
> as well ;-)
>
> Hmm, sounds like perf lock is somehow triggering slab allocations
> and interfering the workload.
>
> It could be because SLUB is merging nfs_page cache with some other
> cache that perf uses.
>
> Could you please check if it reproduces with slab_nomerge kernel
> parameter?
>
> On Thu, Sep 17, 2026 at 02:46:24PM +0100, Harry Yoo wrote:
> > Hi Tim and Chuck, thanks for reporting this to linux-mm.
> > Will take a look at this but let me Cc SLAB ALLOCATOR folks here first.
> >
> > --
> > Cheers,
> > Harry / Hyeonggon
> >
[SNIP]
> > On Wed, Sep 16, 2026 at 11:22:27PM +0000, Tim Menninger wrote:
> > > My questions are:
> > >
> > > 1. Do the uninstrumented cmpxchg_double_fail rates above look abnormal
> > > for this workload/topology, or are they within the range one would
> > > expect from this degree of concurrency and NUMA placement?
> > >
> > > 2. Is there a less invasive way you would recommend measuring the
> > > nfs_page list_lock/freelist contention? I would like to distinguish
> > > the steady-state behavior from what is observed during the perf-lock
> > > capture.

You can use the BPF version of perf lock to check lock contention like
below. (it only work with 'contention' subcommand.) It won't create
a data file and just shows the result.

$ sudo perf lock con -ab sleep 10

or

$ sudo perf lock con -ab -E 5 sleep 10

to see top-5 locks only.

Thanks,
Namhyung