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 /init | |
| parent | f4fe6be82e6d27349de66a42d6d1b2b11dc97a14 (diff) | |
| download | linux-fa4a1ff8ab235a308d8c983827657a69649185fd.tar.gz linux-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 'init')
| -rw-r--r-- | init/init_task.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/init/init_task.c b/init/init_task.c index 5c838757fc10..b5f48ebdc2b6 100644 --- a/init/init_task.c +++ b/init/init_task.c @@ -169,6 +169,7 @@ struct task_struct init_task __aligned(L1_CACHE_BYTES) = { .journal_info = NULL, INIT_CPU_TIMERS(init_task) .pi_lock = __RAW_SPIN_LOCK_UNLOCKED(init_task.pi_lock), + .blocked_lock = __RAW_SPIN_LOCK_UNLOCKED(init_task.blocked_lock), .timer_slack_ns = 50000, /* 50 usec default slack */ .thread_pid = &init_struct_pid, .thread_node = LIST_HEAD_INIT(init_signals.thread_head), |
