Re: [PATCH 0/2] sched: Remove sched_class::balance()

From: Tejun Heo

Date: Thu Aug 20 2026 - 03:42:22 EST


Hello, Peter.

On Thu, Aug 20, 2026 at 09:18:52AM +0200, Peter Zijlstra wrote:
...
> Right, but I worry about the cases:
>
> - there is no ext task pulled to local because $reasons (could be
> cpumask), and we retry, then it will see there are ext tasks, but no
> local and it will try again?

For SCX, rq lock is not dropped for "trying". It is only dropped when there
is a task to be migrated, so if nothing has changed since the last time,
there won't be a task to migrate and thus no lock drop.

> - custom DSQs, those BPF based things, then we always need to drop the
> lock in order to execute those BPF methods, no?

No, those all nest inside rq locks. Think about enqueue path. Enqueue needs
to run all those and we don't drop rq lock while enqueueing (unless we're
bouncing to another rq's local DSQ at least).

Thanks.

--
tejun