On Thu, 2026-06-11 at 13:34 +0100, Tvrtko Ursulin wrote:
> Due the scheduler locking design, and the inability to always lock both
> the entity and the run-queue in the consistent order, a completion exists
> which effectively marks the entity as in use from a call path which is not
> able to lock it.
> 
> When entity is selected from the run job worker, its completion is marked
> as non-idle all until the code is sure it will not be dereferencing it any
> more, at which point it signals it as idle, releasing the potential
> parallel cleanup path.
> 
> We can remove the need for this completion by implementing the identical
> guarantee by simply flushing the run job work from the cleanup path, after
> having removed the entity from the run queue.
> 
> We then know that the entity is no longer reachable by the run queue
> selection logic, so as soon as any pending work is done the cleanup can
> safely proceed. And because we have marked the entity as stopped, we also
> know that the entity cannot re-enter the run queue.
> 
> Signed-off-by: Tvrtko Ursulin <[email protected]>

I think Christian and I agree that this patch is cool. It fell through
the cracks in summer and would now need a rebase.


If you're still up to it, I'd say go for v1


Greetings,
Philipp

Reply via email to