Re: [PATCH 1/2] sched_ext: Enable tick for finite slices on nohz_full

Andrea Righi <[email protected]>
Newsgroups dev.linux.lists.sched-ext,org.kernel.vger.linux-kernel
Message-ID <akyUGFsa8kJt0Lim@gpd4>
On Mon, Jul 06, 2026 at 12:09:36PM -1000, Tejun Heo wrote:
> 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?

Yep, I'm currently looking/fixing at the issues found by Sashiko. I'll send a
v2 in a bit.

Thanks,
-Andrea
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.