[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKfTPtDeA4OTPJmEHd-wKToYwDVizcny-_qxEuDUA-OcaVm2Uw@mail.gmail.com>
Date: Sat, 6 Jul 2024 11:01:20 +0200
From: Vincent Guittot <vincent.guittot@...aro.org>
To: Tejun Heo <tj@...nel.org>
Cc: rafael@...nel.org, viresh.kumar@...aro.org, linux-pm@...r.kernel.org,
void@...ifault.com, linux-kernel@...r.kernel.org, kernel-team@...a.com,
mingo@...hat.com, peterz@...radead.org, David Vernet <dvernet@...a.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>
Subject: Re: [PATCH v2 2/2] sched_ext: Add cpuperf support
On Fri, 5 Jul 2024 at 20:22, Tejun Heo <tj@...nel.org> wrote:
>
> Hello, Vincent.
>
> On Fri, Jul 05, 2024 at 02:41:41PM +0200, Vincent Guittot wrote:
> > > static void sugov_get_util(struct sugov_cpu *sg_cpu, unsigned long boost)
> > > {
> > > - unsigned long min, max, util = cpu_util_cfs_boost(sg_cpu->cpu);
> > > + unsigned long min, max, util = scx_cpuperf_target(sg_cpu->cpu);
> > >
> > > + if (!scx_switched_all())
> > > + util += cpu_util_cfs_boost(sg_cpu->cpu);
> >
> > I don't see the need for this. If fair is not used, this returns zero
>
> 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
Vincent
>
> Thanks.
>
> --
> tejun
Powered by blists - more mailing lists