Re: [PATCH] sched_ext: Refresh idle state when kicking CPUs
From: Tejun Heo
Date: Mon Jan 06 2025 - 13:53:31 EST
Hello,
On Sat, Jan 04, 2025 at 08:06:26AM +0100, Andrea Righi wrote:
...
> The issue is that we call ops.update_idle() when a CPU enters or exits
> SCHED_IDLE, whereas it should ideally be called when the CPU transitions
> in/out of the idle state. So perhaps a kick from idle should trigger
> ops.update_idle(cpu, false)? Still, I'm not sure if that would provide any
> benefit... after all, do you see any practical scenarios where having
> unbalanced transitions could be a problem?
If possible, we should keep the calls balanced even if that means a bit of
complications on the core side as these things can become subtle bugs from
BPF scheduler side. And, yeah, I think kicking transitioning the CPU out of
idle makes sense to me.
Thanks.
--
tejun