Re: [PATCH 1/2] sched_ext: Enable tick for finite slices on nohz_full
From: Tejun Heo
Date: Mon Jul 06 2026 - 18:10:02 EST
Hello, Andrea.
Sashiko's first point looks real to me. The fix covers infinite->finite,
but a finite slice landing on a nohz_full CPU after idle has the same
issue whenever the previous run wasn't infinite (finite->idle->finite):
the enqueue path already cleared TICK_DEP_BIT_SCHED against the idle
rq->curr, and set_next_task_scx() re-asserts only on a slice-type
transition, so with SCX_RQ_CAN_STOP_TICK unchanged the tick stays
stopped.
set_next_task_scx() knows the incoming task, so it can assert directly
rather than keying off the transition, like sched_fair_update_stop_tick()
does for CFS. Moving the finite assertion out of the transition branch
should do it:
if (p->scx.slice != SCX_SLICE_INF && tick_nohz_full_cpu(cpu_of(rq)))
tick_nohz_dep_set_cpu(cpu_of(rq), TICK_DEP_BIT_SCHED);
Can you fold that in and add a finite->idle->finite selftest case for v2?
Thanks.
--
tejun