Re: [PATCH sched_ext/for-6.15] sched_ext: Implement SCX_OPS_ALLOW_QUEUED_WAKEUP
From: Andrea Righi
Date: Thu Feb 13 2025 - 11:45:08 EST
On Thu, Feb 13, 2025 at 06:27:55AM -1000, Tejun Heo wrote:
> Hello,
>
> On Thu, Feb 13, 2025 at 09:18:41AM +0100, Andrea Righi wrote:
> > > Implement SCX_OPS_ALLOW_QUEUED_WAKEUP which allows BPF schedulers to choose
> > > to enable ttwu_queue optimization.
> >
> > I'm wondering whether it makes sense to introduce a new SCX_OPS flag for
> > this, considering that we already have the TTWU_QUEUE sched feature, that
> > determines this behavior.
> >
> > Is this in perspective of a future scenario, when we may potentially have
> > multiple scx schedulers running at the same time and they may want to set a
> > different queued wakeup behavior?
>
> It's more that it can be a breaking change for schedulers that expect
> ops.select_cpu() to be called on wakeups. e.g. If we make this behavior the
> default, scx_layered as of the last relesae would break in an unobvious but
> serious way - it'd fail to occupy CPUs fully as it'd be skipping picking
> idle CPU and pushing tasks there for a noticeable portion of wakeups on
> multi-LLC machines. The same holds for most of the C schedulers.
>
> Down the line, once everyone is onboard, we can maybe make it the default
> and drop the flag but, for now, this needs to be opt-in.
>
> Thanks.
Makes sense, thanks for the clarification. With that:
Acked-by: Andrea Righi <arighi@xxxxxxxxxx>
-Andrea