[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0gLv1ybYWM4BfmXoW5cHtZXW3tUL+PoXDKQqSBa2UCj0w@mail.gmail.com>
Date: Mon, 16 Dec 2024 15:58:09 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Dietmar Eggemann <dietmar.eggemann@....com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>, Linux PM <linux-pm@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>, Lukasz Luba <lukasz.luba@....com>,
Peter Zijlstra <peterz@...radead.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Morten Rasmussen <morten.rasmussen@....com>, Vincent Guittot <vincent.guittot@...aro.org>,
Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>,
Pierre Gondois <pierre.gondois@....com>
Subject: Re: [RFC][PATCH v021 4/9] sched/topology: Adjust cpufreq checks for EAS
On Mon, Dec 16, 2024 at 3:49 PM Dietmar Eggemann
<dietmar.eggemann@....com> wrote:
>
> On 29/11/2024 17:00, Rafael J. Wysocki wrote:
>
> [...]
>
> > @@ -261,11 +262,14 @@ static bool sched_is_eas_possible(const
> > }
> > return false;
> > }
> > + /* Require schedutil or a "setpolicy" driver */
> > gov = policy->governor;
> > + cpufreq_ok = gov == &schedutil_gov ||
> > + (!gov && policy->policy != CPUFREQ_POLICY_UNKNOWN);
> > cpufreq_cpu_put(policy);
> > - if (gov != &schedutil_gov) {
> > + if (!cpufreq_ok) {
> > if (sched_debug()) {
> > - pr_info("rd %*pbl: Checking EAS, schedutil is mandatory\n",
> > + pr_info("rd %*pbl: Checking EAS, unsuitable cpufreq governor\n",
> > cpumask_pr_args(cpu_mask));
> > }
> > return false;
>
> build_perf_domains() which calls sched_is_eas_possible() has schedutil
> (4) mentioned in the function header as well:
>
> /*
> * EAS can be used on a root domain if it meets all the following
> conditions:
> * 1. an Energy Model (EM) is available;
> * 2. the SD_ASYM_CPUCAPACITY flag is set in the sched_domain hierarchy.
> * 3. no SMT is detected.
> * 4. schedutil is driving the frequency of all CPUs of the rd; <-- !
> * 5. frequency invariance support is present;
> */
>
> IMHO, his patch should remove the function header since the conditions
> in sched_is_eas_possible() have comments already or are self-explanatory.
Fair enough.
I'm considering a patch moving these checks to cpufreq, then I'll
change all of that.
Powered by blists - more mailing lists