Re: [PATCH 1/2] sched_ext: Fix ops.dequeue() semantics
From: Tejun Heo
Date: Thu Feb 12 2026 - 12:07:10 EST
Hello,
On Thu, Feb 12, 2026 at 04:45:43PM +0100, Andrea Righi wrote:
> > > So, we need a way to mark "this migration is internal to SCX", like a new
> > > SCX_TASK_MIGRATING_INTERNAL flag?
Yeah, I think this is what we should do. That's the only ops.dequeue()
without matching ops.enqueue(), right?
...
> > IIUC one example might sway your opinion (or not):
> > Note that not receiving a ops.dequeue() for tasks leaving one LOCAL_DSQ
> > (and maybe being enqueued at another) prevents e.g. accurate PELT load
> > tracking on the BPF side.
> > Regular utilization tracking works through ops.running() and
> > ops.stopping() but load I don't think load can be implemented accurately.
>
> It makes sense to me and I think it's actually valid reason to prefer the
> "always trigger" way.
I don't think this is a valid argument. PELT is done that way because the
association of the task and the CPU is meaningful for in-kernel schedulers.
The queues are actually per-CPU. For SCX scheds, the relationship is not
known to the kernel. Only the BPF scheduler itself knows, if it wants to
attribute per-task load to a specific CPU, which CPU it should be attributed
to. What's the point of following in-kernel association for PELT if the task
was going to be hot migrated to another CPU on execution?
Thanks.
--
tejun