[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240826230742.GA7773@ranerica-svr.sc.intel.com>
Date: Mon, 26 Aug 2024 16:07:42 -0700
From: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: 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 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.
Perhaps at minimum hybrid_init_cpu_scaling() can be before
sched_clear_itmt_support(). 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.
Powered by blists - more mailing lists