Re: [PATCH v2 2/2] sched_ext: Add cpuperf support

From: Tejun Heo
Date: Sat Jul 06 2024 - 21:44:44 EST


Hello,

On Sat, Jul 06, 2024 at 11:01:20AM +0200, Vincent Guittot wrote:
> > There's scx_enabled() and scx_switched_all(). The former is set when some
> > tasks may be on sched_ext. The latter when all tasks are on sched_ext. When
> > some tasks may be on sched_ext but other tasks may be on fair, the condition
> > is scx_enabled() && !scx_switched_all(). So, the above if statement
> > condition is true for all cases that tasks may be on CFS (sched_ext is
> > disabled or is enabled in partial mode).
>
> My point is that if there is no fair task, cpu_util_cfs_boost() will
> already return 0 so there is no need to add a sched_ext if statement
> there

I see, but scx_switched_all() is a static key while cpu_util_cfs_boost()
isn't necessarily trivial. I can remove the conditional but wouldn't it make
more sense to keep it?

Thanks.

--
tejun