diff options
| author | John Stultz <jstultz@google.com> | 2026-03-24 19:13:19 +0000 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2026-04-03 14:23:39 +0200 |
| commit | fa4a1ff8ab235a308d8c983827657a69649185fd (patch) | |
| tree | 832bd48a7c5f4e55fa33a3ffee76facc978838d5 /kernel/locking/mutex-debug.c | |
| parent | f4fe6be82e6d27349de66a42d6d1b2b11dc97a14 (diff) | |
| download | linux-next-fa4a1ff8ab235a308d8c983827657a69649185fd.tar.gz linux-next-fa4a1ff8ab235a308d8c983827657a69649185fd.zip | |
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
Diffstat (limited to 'kernel/locking/mutex-debug.c')
| -rw-r--r-- | kernel/locking/mutex-debug.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/locking/mutex-debug.c b/kernel/locking/mutex-debug.c index 2c6b02d4699b..cc6aa9c6e981 100644 --- a/kernel/locking/mutex-debug.c +++ b/kernel/locking/mutex-debug.c @@ -54,13 +54,13 @@ void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, lockdep_assert_held(&lock->wait_lock); /* Current thread can't be already blocked (since it's executing!) */ - DEBUG_LOCKS_WARN_ON(__get_task_blocked_on(task)); + DEBUG_LOCKS_WARN_ON(get_task_blocked_on(task)); } void debug_mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter, struct task_struct *task) { - struct mutex *blocked_on = __get_task_blocked_on(task); + struct mutex *blocked_on = get_task_blocked_on(task); DEBUG_LOCKS_WARN_ON(list_empty(&waiter->list)); DEBUG_LOCKS_WARN_ON(waiter->task != task); |
