Re: [PATCH] sched_ext: Don't warn on core-sched forced idle in put_prev_task_scx()

From: Tejun Heo

Date: Mon Jun 29 2026 - 15:43:01 EST


Hello, Kuba.

On Thu, Jun 25, 2026 at 09:45:30AM +0000, Kuba Piecuch wrote:
> Nit: balance_one() doesn't happen in balance() anymore, it happens in pick.
> So IMO it should read "... skips pick_task_scx() for the CPU, ...".

Right, fixed in v2.

> Is there a more precise check that we could do to determine if this switch is
> due to core-sched forcing the CPU idle? I was thinking about
> rq->core->core_forceidle_count, but IIUC that's the core-wide number of CPUs
> forced idle, so it's not a reliable signal about any particular CPU.

I couldn't find anything with better granularity either, so v2 keeps the
sched_core_enabled() gate.

> I wasn't able to quickly convince myself that an IMMED task will be reenqueued
> in the case where a CPU running an SCX task has an IMMED task enqueued in its
> local DSQ by a remote CPU, and the CPU is forced idle while the IMMED task
> is on the local DSQ.
> Looks like we might need a call to schedule_reenq_local() somewhere in here
> (in a separate patch, of course). WDYT?

Makes sense, and not too surprising. For now maybe we just note it in the
comment.

Thanks.

--
tejun