[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0hiNxLsX2ExT8QphkTev4-i++4xo4CuG3rVkLqTZsiBgA@mail.gmail.com>
Date: Tue, 27 Aug 2024 13:49:18 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>, x86 Maintainers <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>, Linux PM <linux-pm@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>, Peter Zijlstra <peterz@...radead.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
"Rafael J. Wysocki" <rafael@...nel.org>, Dietmar Eggemann <dietmar.eggemann@....com>,
Ricardo Neri <ricardo.neri@...el.com>, Tim Chen <tim.c.chen@...el.com>
Subject: Re: [PATCH v2 3/3] cpufreq: intel_pstate: Set asymmetric CPU capacity
on hybrid systems
On Tue, Aug 27, 2024 at 1:00 AM Ricardo Neri
<ricardo.neri-calderon@...ux.intel.com> wrote:
>
> On Mon, Aug 12, 2024 at 02:44:30PM +0200, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> [...]
> > @@ -3143,6 +3341,20 @@ static int intel_pstate_register_driver(
> >
> > global.min_perf_pct = min_perf_pct_min();
> >
> > + /*
> > + * On hybrid systems, use asym capacity instead of ITMT, but because
> > + * the capacity of SMT threads is not deterministic even approximately,
> > + * do not do that when SMT is in use.
> > + */
> > + if (hwp_is_hybrid && !sched_smt_active() &&
> > + arch_enable_hybrid_capacity_scale()) {
> > + sched_clear_itmt_support();
> > +
> > + hybrid_init_cpu_scaling();
> > +
> > + arch_rebuild_sched_domains();
>
> sched_clear_itmt_support() also calls arch_rebuild_sched_domains(). The
> latter is also called earlier via sched_set_itmt_support(), totaling 3
> calls, two of which are wasted.
Not necessarily two because arch_enable_hybrid_capacity_scale() may
return "false".
But you have a point.
> Perhaps at minimum hybrid_init_cpu_scaling() can be before
> sched_clear_itmt_support().
It can.
I'll send a new version of the patch with this change.
> The changes made by these two functions will
> be picked up in a single call of arch_rebuild_sched_domains().
>
> Moreover, ITMT can be not enabled at all if so we wish. By the time
> intel_pstate_set_itmt_prio() is called, the value of hwp_is_hybrid is
> already known.
But at that time it is not known whether or not
arch_enable_hybrid_capacity_scale() will succeed.
Thanks!
Powered by blists - more mailing lists