diff options
| author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2025-11-27 18:55:29 +0300 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2025-12-06 12:03:13 +0300 |
| commit | 22abd832776b1317ae4c3f8a097c8b71bf83fb38 (patch) | |
| tree | e9cb35fe2bd2b5c36e1bbb8696fd600a2644dd30 /drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |
| parent | e38e5299747b23015b00b0109891815db44a2f30 (diff) | |
| download | linux-22abd832776b1317ae4c3f8a097c8b71bf83fb38.tar.xz | |
sched/rt: Remove a preempt-disable section in rt_mutex_setprio()
rt_mutex_setprio() has only one caller: rt_mutex_adjust_prio(). It
expects that task_struct::pi_lock and rt_mutex_base::wait_lock are held.
Both locks are raw_spinlock_t and are acquired with disabled interrupts.
Nevertheless rt_mutex_setprio() disables preemption while invoking
__balance_callbacks() and raw_spin_rq_unlock(). Even if one of the
balance callbacks unlocks the rq then it must not enable interrupts
because rt_mutex_base::wait_lock is still locked.
Therefore interrupts should remain disabled and disabling preemption is
not needed.
Commit 4c9a4bc89a9cc ("sched: Allow balance callbacks for check_class_changed()")
adds a preempt-disable section to rt_mutex_setprio() and
__sched_setscheduler(). In __sched_setscheduler() the preemption is
disabled before rq is unlocked and interrupts enabled but I don't see
why it makes a difference in rt_mutex_setprio().
Remove the preempt_disable() section from rt_mutex_setprio().
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://patch.msgid.link/20251127155529.t_sTatE4@linutronix.de
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c')
0 files changed, 0 insertions, 0 deletions
