Re: [PATCH v2] sched_ext: Update other_load_avgs on set_next_task_scx and idle entry

From: Peng Huang

Date: Mon Nov 23 2026 - 15:20:03 EST


Hello Tejun,

On Sun, Nov 22, 2026 at 11:47:04PM -1000, Tejun Heo wrote:
> I think this overstates the staleness. While the tick is running,
> scx_tick() updates them on every tick, so they're at most a tick old,
> at idle entry too. That's already a lot more often than fair, which
> updates them at load balancing intervals.
>
> update_other_load_avgs() isn't necessarily cheap and I don't think we
> want to call it from scheduling hot paths. If anything, sched_ext is
> already updating them too often and we should pace it down.
>
> The actual hole is CPUs with the tick stopped, where nothing updates
> them, and this patch doesn't address that.
>
> Also, how was this tested? Is this from reading the code, or was the
> effect observed or tested in some way?

Fair points on all counts -- calling update_other_load_avgs() from
set_next_task_scx() and put_prev_task_scx() adds unnecessary hot-path
cost when scx_tick() already covers active-tick CPUs every tick.

To answer your question on testing: on an Android 6.18 setup running
sched_ext, we observed frozen/elevated avg_rt in Perfetto traces, but
the actual root cause there turned out to be idle rq_clock_pelt()
stalling due to non-zero dormant rq->cfs.avg.util_sum (discussed in
the separate sched/pelt thread). This upstream patch came from reading
the SCX_RQ_CAN_STOP_TICK code paths afterwards rather than an isolated
reproducer on mainline.

Let's drop this patch. If we later observe a concrete issue on
tick-stopped CPUs, we can come back with a targeted fix and benchmark
numbers.

Thanks,
Peng