Re: [RFC PATCH] cgroup/rstat: convert rstat lock from spinlock to rwlock
From: Tejun Heo
Date: Tue May 19 2026 - 13:49:58 EST
On Tue, May 19, 2026 at 12:31:34PM -0500, Thomas Falcon wrote:
> Implement rstat_ss_lock and rstat_base_lock as read-write locks
> instead of spinlocks. In addition, update tracing to reflect new
> locking implementation.
>
> The benchmark below, meant to simulate a workload performing many
> concurrent cgroup cpu.stat reads, completes in 134 seconds on an Intel
> Xeon Platinum 8568Y with 144 cpus compared to 241 seconds when
> using spinlocks.
Can you try using seqlock for readers? That'd be decouple readers a lot
better than rwlocks.
Thanks.
--
tejun