diff options
| author | Andrea Righi <arighi@nvidia.com> | 2026-07-08 09:46:48 +0200 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-07-08 08:29:43 -1000 |
| commit | 4ec10f38ff901dc10503d57cbdcf941248419ac1 (patch) | |
| tree | 4aad1b8b5a15a3a6f13db234758221239cf121b9 /drivers/gpu | |
| parent | 18d62044cda7a2b40f59d910659c0b0d6accad37 (diff) | |
sched_ext: Enable tick for finite slices on nohz_full
set_next_task_scx() updates the tick dependency before __schedule()
updates rq->curr. When switching from a non-EXT task, such as idle, to
an EXT task with a finite slice, sched_update_tick_dependency() checks
the outgoing task and can allow the tick to remain stopped.
The dependency can also be lost without a slice-type transition. After a
finite-slice task leaves the CPU idle, the enqueue path can clear the
dependency against the idle rq->curr. SCX_RQ_CAN_STOP_TICK still records
a finite slice, so another finite task skips the transition block and
can run without the ticks needed to expire its slice.
The reverse mismatch can also happen when the last finite-slice EXT task
is dequeued: sub_nr_running() updates the dependency before rq->curr
changes, so the outgoing task state can keep the dependency set after
the CPU goes idle.
Fix this by unconditionally enabling the scheduler tick whenever a
finite-slice EXT task is selected on a nohz_full CPU. Moreover, when the
last runnable EXT task leaves, ignore the outgoing EXT slice state so
the generic scheduler can correctly re-evaluate and clear the tick
dependency.
Fixes: 22a920209ab6 ("sched_ext: Implement tickless support")
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/gpu')
0 files changed, 0 insertions, 0 deletions
