Skip to content

locking/rtmutex: Avoid PI state recursion through sched_submit_work()

Peter Zijlstra lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6sched: Constrain locks in sched_submit_work()kernel/sched/core.c+9 -00 replies
2/6locking/rtmutex: Avoid unconditional slowpath for DEBUG_RT_MUTEXESkernel/locking/rtmutex.c kernel/locking/ww_rt_mutex.c+21 -20 replies
3/6sched: Extract __schedule_loop()kernel/sched/core.c+11 -108 replies
4/6sched: Provide rt_mutex specific scheduler helpersinclude/linux/sched.h include/linux/sched/rt.h kernel/sched/core.c+39 -40 replies
5/6locking/rtmutex: Use rt_mutex specific scheduler helperskernel/locking/rtmutex.c kernel/locking/rwbase_rt.c kernel/locking/rwsem.c +1 more+25 -30 replies
6/6locking/rtmutex: Add a lockdep assert to catch potential nested blockingkernel/locking/rtmutex.c kernel/locking/rwbase_rt.c kernel/locking/spinlock_rt.c+6 -00 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by.

PatchThomas Gleixner
1/6
2/6
3/6
4/6Originally-by
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] locking/rtmutex: Avoid PI state recursion through sched_submit_work()

Hi!

This is basically the 'same' patches as send earlier by Sebastian here:

https://lkml.kernel.org/r/[email protected]

I spend a number of days trying to invert rtmutex, only to make a giant mess of things and finally conceded that this is the least horrible approach.

There's a bunch of naming differences and I added some asserts that should hopefully avoid things from going sideways without notice. I've also updated the changelogs to high-light the actual problem. The whole pi_blocked_on 'corruption' is a mere consequence of the more fundamental problem that the whole PI state recurses.

I've not tested this with the rest of the RT patches stuck on, so very limited actual testing happened.

If anybody could please confirm stuff still works as advertised, I'll go queue this mess and we can hopefully forget all about it.