diff options
| author | Kuba Piecuch <jpiecuch@google.com> | 2026-04-28 12:46:01 +0000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-04-28 06:28:48 -1000 |
| commit | 163f8b7f9a84086c67c76aeadc04e6d43e32df6e (patch) | |
| tree | 571d82152fb8e08455663c68d3b6dae14e8dc875 /include/linux/workqueue.h | |
| parent | deb7b2f93d0129b79425f830a1e5e7e1bb2c4973 (diff) | |
sched_ext: Call wakeup_preempt() in local_dsq_post_enq()
There are several edge cases (see linked thread) where an IMMED task
can be left lingering on a local DSQ if an RT task swoops in at the
wrong time. All of these edge cases are due to rq->next_class being idle
even after dispatching a task to rq's local DSQ. We should bump
rq->next_class to &ext_sched_class as soon as we've inserted a task into
the local DSQ.
To optimize the common case of rq->next_class == &ext_sched_class,
only call wakeup_preempt() if rq->next_class is below EXT. If next_class
is EXT or above, wakeup_preempt() is a no-op anyway.
This lets us also simplify the preempt_curr() logic a bit since
wakeup_preempt() will call preempt_curr() for us if next_class is
below EXT.
Link: https://lore.kernel.org/all/DHZPHUFXB4N3.2RY28MUEWBNYK@google.com/
Signed-off-by: Kuba Piecuch <jpiecuch@google.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions
