[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zog5-Yd5wV0-Y76y@slm.duckdns.org>
Date: Fri, 5 Jul 2024 08:22:49 -1000
From: Tejun Heo <tj@...nel.org>
To: Vincent Guittot <vincent.guittot@...aro.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
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).
Thanks.
--
tejun
Powered by blists - more mailing lists