Re: [PATCH 1/2] sched_ext: Fix ops.dequeue() semantics

From: Andrea Righi
Date: Mon Dec 29 2025 - 12:17:18 EST


Hi,

On Sun, Dec 28, 2025 at 01:42:28PM -1000, Tejun Heo wrote:
> Hello,
>
> On Fri, Dec 19, 2025 at 11:43:14PM +0100, Andrea Righi wrote:
> > + Once ``ops.enqueue()`` is called, the task is considered "enqueued" and
> > + is owned by the BPF scheduler. Ownership is retained until the task is
>
> Can we avoid using "ownership" for this? From user's POV, this is fine but
> kernel side internally uses the word for different purposes - e.g. we say
> the BPF side owns the task if the task's SCX_OPSS_QUEUED is set (ie. it's on
> BPF data structure, not on a DSQ). Here, the ownership encompasses both
> kernel-side and BPF-side queueing, so the term becomes rather confusing.
> Maybe we can stick with "queued" or "enqueued"?

Agreed. I can't find a better term to describe this phase of the lifecycle,
where ops.enqueue() has been called and the task remains in that state
until the corresponding ops.dequeue() occurs (either due to a "dispatch"
dequeue or "real" dequeue).

So maybe we should stick with "enqueued" and clarify exactly what this
state means.

Thanks,
-Andrea