]> git.ipfire.org Git - thirdparty/linux.git/commit
locking: Add task::blocked_lock to serialize blocked_on state
authorJohn Stultz <jstultz@google.com>
Tue, 24 Mar 2026 19:13:19 +0000 (19:13 +0000)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 3 Apr 2026 12:23:39 +0000 (14:23 +0200)
commitfa4a1ff8ab235a308d8c983827657a69649185fd
tree832bd48a7c5f4e55fa33a3ffee76facc978838d5
parentf4fe6be82e6d27349de66a42d6d1b2b11dc97a14
locking: Add task::blocked_lock to serialize blocked_on state

So far, we have been able to utilize the mutex::wait_lock
for serializing the blocked_on state, but when we move to
proxying across runqueues, we will need to add more state
and a way to serialize changes to this state in contexts
where we don't hold the mutex::wait_lock.

So introduce the task::blocked_lock, which nests under the
mutex::wait_lock in the locking order, and rework the locking
to use it.

Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com>
Link: https://patch.msgid.link/20260324191337.1841376-5-jstultz@google.com
include/linux/sched.h
init/init_task.c
kernel/fork.c
kernel/locking/mutex-debug.c
kernel/locking/mutex.c
kernel/locking/mutex.h
kernel/locking/ww_mutex.h
kernel/sched/core.c