Re: [GIT PULL] sched_ext: Initial pull request for v6.11

From: Tejun Heo
Date: Tue Jul 30 2024 - 21:12:00 EST


Hello,

On Tue, Jul 30, 2024 at 11:04:43AM +0200, Peter Zijlstra wrote:
> > #ifdef CONFIG_NO_HZ_COMMON
> > -static bool sugov_cpu_is_busy(struct sugov_cpu *sg_cpu)
> > +static bool sugov_hold_freq(struct sugov_cpu *sg_cpu)
> > {
> > - unsigned long idle_calls = tick_nohz_get_idle_calls_cpu(sg_cpu->cpu);
> > - bool ret = idle_calls == sg_cpu->saved_idle_calls;
> > + unsigned long idle_calls;
> > + bool ret;
> > +
> > + /*
> > + * The heuristics in this function is for the fair class. For SCX, the
> > + * performance target comes directly from the BPF scheduler. Let's just
> > + * follow it.
> > + */
> > + if (scx_switched_all())
> > + return false;
>
> This one does seem really weird. It makes schedutil behave significantly
> different from the BPF pov depending on if you have this partial mode on
> or not.
>
> So I would really like this to be reconsidered as I agree with Qais,
> things should be consistent.

I replied in the other thread and Vincent raised it too. To reiterate, when
switched_all(), if we want to keep accumulating util signal from the fair
class, we need to keep calling fair's update_blocked_averages() so that the
value can decay. We can but it seems silly to keep calling it to decay it to
zero when we know it's becoming and staying zero.

Thanks.

--
tejun