mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
sched/proxy: Remove PROXY_WAKING
Now that the proxy path uses ->is_blocked, use the '->is_blocked && !->blocked_on' state instead of PROXY_WAKING. Notably, this is where a blocked_on relation is broken but the donor task might still need a return migration. Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260526113322.596522894%40infradead.org
This commit is contained in:
committed by
Peter Zijlstra
parent
be365ce2bc
commit
ec9d4f1c42
@@ -1044,7 +1044,7 @@ static noinline void __sched __mutex_unlock_slowpath(struct mutex *lock, unsigne
|
||||
next_lock = __get_task_blocked_on(donor);
|
||||
if (next_lock == lock) {
|
||||
next = get_task_struct(donor);
|
||||
__set_task_blocked_on_waking(donor, next_lock);
|
||||
__clear_task_blocked_on(next, lock);
|
||||
current->blocked_donor = NULL;
|
||||
}
|
||||
raw_spin_unlock(&donor->blocked_lock);
|
||||
@@ -1060,7 +1060,7 @@ static noinline void __sched __mutex_unlock_slowpath(struct mutex *lock, unsigne
|
||||
|
||||
raw_spin_lock_nested(&next->blocked_lock, SINGLE_DEPTH_NESTING);
|
||||
debug_mutex_wake_waiter(lock, waiter);
|
||||
__set_task_blocked_on_waking(next, lock);
|
||||
__clear_task_blocked_on(next, lock);
|
||||
raw_spin_unlock(&next->blocked_lock);
|
||||
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ __ww_mutex_die(struct MUTEX *lock, struct MUTEX_WAITER *waiter,
|
||||
* blocked_on to PROXY_WAKING. Otherwise we can see
|
||||
* circular blocked_on relationships that can't resolve.
|
||||
*/
|
||||
set_task_blocked_on_waking(waiter->task, lock);
|
||||
clear_task_blocked_on(waiter->task, lock);
|
||||
wake_q_add(wake_q, waiter->task);
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ static bool __ww_mutex_wound(struct MUTEX *lock,
|
||||
* are waking the mutex owner, who may be currently
|
||||
* blocked on a different mutex.
|
||||
*/
|
||||
set_task_blocked_on_waking(owner, NULL);
|
||||
clear_task_blocked_on(owner, NULL);
|
||||
wake_q_add(wake_q, owner);
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user