On Mon, Jul 01, 2019 at 08:52:33AM +0200, Juri Lelli wrote: > Hi, > > On 28/06/19 15:03, Peter Zijlstra wrote: > > On Fri, Jun 28, 2019 at 10:06:16AM +0200, Juri Lelli wrote: > > > cpuset_rwsem is going to be acquired from sched_setscheduler() with a > > > following patch. There are however paths (e.g., spawn_ksoftirqd) in > > > which sched_scheduler() is eventually called while holding hotplug lock; > > > this creates a dependecy between hotplug lock (to be always acquired > > > first) and cpuset_rwsem (to be always acquired after hotplug lock). > > > > > > Fix paths which currently take the two locks in the wrong order (after > > > a following patch is applied). > > > Signed-off-by: Juri Lelli <juri.lelli@xxxxxxxxxx> > > > > This all reminds me of this: > > > > https://lkml.kernel.org/r/1510755615-25906-1-git-send-email-prsood@xxxxxxxxxxxxxx > > > > Which sadly got reverted again. If we do this now (I've always been a > > proponent), then we can make that rebuild synchronous again, which > > should also help here IIRC. > > Why was that reverted? Perf regression of some type? IIRC TJ figured it wasn't strictly required to fix the lock invertion at that time and they sorted it differently. If I (re)read the thread correctly the other day, he didn't have fundamental objections against it, but wanted the simpler fix.