Re: [RFC PATCH] locking/percpu-rwsem: do not do lock handoff in percpu_up_write

From: Hillf Danton
Date: Tue Jan 30 2024 - 06:43:16 EST


On Mon, 29 Jan 2024 12:36:20 -0800 Benjamin Segall <bsegall@xxxxxxxxxx>
>
> The basic locking issue was due to userspace rapidly spawning threads
> (or processes) more rapidly than the cpus they are running on can
> support, and this causing issues for unrelated threads doing cgroup
> operations on other cpus.
>
> The contention can be due to a combination of just straight up spawning
> way too many, userspace misconfiguration of cpus allowed, or load
> balancer weaknesses. (If you pick minimum cpu.shares values and have
> large machines, SCHED_LOAD_RESOLUTION isn't really enough for load
> balance to do a good job, and what you're telling the load balancer you
> want isn't really a good idea in the first place).

Sigh, add change to percpu-rwsem's handoff because cgroup has a cough
in chest.