From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: x86 Maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Ricardo Neri <ricardo.neri@intel.com>,
Tim Chen <tim.c.chen@intel.com>
Subject: Re: [PATCH v2 3/3] cpufreq: intel_pstate: Set asymmetric CPU capacity on hybrid systems
Date: Mon, 26 Aug 2024 16:07:42 -0700 [thread overview]
Message-ID: <20240826230742.GA7773@ranerica-svr.sc.intel.com> (raw)
In-Reply-To: <3311190.44csPzL39Z@rjwysocki.net>
On Mon, Aug 12, 2024 at 02:44:30PM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.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.
next prev parent reply other threads:[~2024-08-26 23:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-12 12:35 [PATCH v2 0/3] x86 / intel_pstate: Set asymmetric CPU capacity on hybrid systems Rafael J. Wysocki
2024-08-12 12:37 ` [PATCH v2 1/3] x86/sched: Introduce arch_rebuild_sched_domains() Rafael J. Wysocki
2024-08-12 12:42 ` [PATCH v2 2/3] x86/sched: Add basic support for CPU capacity scaling Rafael J. Wysocki
2024-08-13 1:27 ` Chen Yu
2024-08-13 11:07 ` Rafael J. Wysocki
2024-08-26 22:08 ` Ricardo Neri
2024-08-27 11:57 ` Rafael J. Wysocki
2024-08-12 12:44 ` [PATCH v2 3/3] cpufreq: intel_pstate: Set asymmetric CPU capacity on hybrid systems Rafael J. Wysocki
2024-08-26 23:07 ` Ricardo Neri [this message]
2024-08-27 11:49 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240826230742.GA7773@ranerica-svr.sc.intel.com \
--to=ricardo.neri-calderon@linux.intel.com \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=ricardo.neri@intel.com \
--cc=rjw@rjwysocki.net \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=tglx@linutronix.de \
--cc=tim.c.chen@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox