From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: Henry Tseng <henrytseng@qnap.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-pm@vger.kernel.org, SW Chen <swchen@qnap.com>,
Kevin Ko <kevinko@qnap.com>
Subject: Re: [PATCH v2 1/2] cpufreq: intel_pstate: Fix scaling for hybrid-capable CPUs not reporting hybrid
Date: Sun, 10 May 2026 07:34:28 -0700 [thread overview]
Message-ID: <3bc634d8d8566f188909fca9e176f651f6295dfb.camel@linux.intel.com> (raw)
In-Reply-To: <20260508063032.3248602-2-henrytseng@qnap.com>
On Fri, 2026-05-08 at 14:30 +0800, Henry Tseng wrote:
> Commit 9b18d536b124 ("cpufreq: intel_pstate: Use CPPC to get scaling
> factors") restructured hwp_get_cpu_scaling() so that, when the CPU
> model is registered in intel_hybrid_scaling_factor[] and
> hybrid_get_cpu_type() does not return INTEL_CPU_TYPE_CORE, the
> function early-returns core_get_scaling() (100000) instead of
> falling through to intel_pstate_cppc_get_scaling().
>
> This regresses the behavior previously addressed by
> commit 0fcfc9e51990 ("cpufreq: intel_pstate: Fix scaling for
> hybrid-capable systems with disabled E-cores"). On hybrid-capable
> processors not reporting X86_FEATURE_HYBRID_CPU (no E-cores
> enumerated), hybrid_get_cpu_type() returns 0. Before 9b18d536b124,
> such CPUs fell through to intel_pstate_cppc_get_scaling(), which
> returned the registered hybrid_scaling_factor. After 9b18d536b124,
> for models registered in the table the early return takes
> core_get_scaling() before reaching that fallback, so the registered
> factor is not used.
>
> Fix this by returning hybrid_scaling_factor directly for CPU models
> registered in intel_hybrid_scaling_factor[] that do not report
> X86_FEATURE_HYBRID_CPU, before checking hybrid_get_cpu_type().
>
> With that fix, non-hybrid CPUs in the table now reach
> intel_pstate_hybrid_hwp_adjust() with scaling != perf_ctl_scaling.
> Since commit 5313ec4a215a ("cpufreq: intel_pstate: Improve printing
> of
> debug messages") sets hwp_is_hybrid = true unconditionally inside
> that
> function, set hwp_is_hybrid based on X86_FEATURE_HYBRID_CPU instead,
> so the flag is not set on non-hybrid systems.
>
> Fixes: 9b18d536b124 ("cpufreq: intel_pstate: Use CPPC to get scaling
> factors")
> Signed-off-by: Henry Tseng <henrytseng@qnap.com>
> ---
> drivers/cpufreq/intel_pstate.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/intel_pstate.c
> b/drivers/cpufreq/intel_pstate.c
> index 1292da53e5fc..d39592e86570 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -585,7 +585,7 @@ static void intel_pstate_hybrid_hwp_adjust(struct
> cpudata *cpu)
> if (scaling == perf_ctl_scaling)
> return;
>
> - hwp_is_hybrid = true;
> + hwp_is_hybrid = cpu_feature_enabled(X86_FEATURE_HYBRID_CPU);
>
> cpu->pstate.turbo_freq = rounddown(cpu->pstate.turbo_pstate
> * scaling,
> perf_ctl_scaling);
> @@ -2275,6 +2275,9 @@ static int knl_get_turbo_pstate(int cpu)
> static int hwp_get_cpu_scaling(int cpu)
> {
> if (hybrid_scaling_factor) {
> + if (!cpu_feature_enabled(X86_FEATURE_HYBRID_CPU))
> + return hybrid_scaling_factor;
It breaks Alder Lake systems with only E-cores and no P-cores. So need
to think about this. So this change didn't restore the behavior of
0fcfc9e51990.
So need to think about this.
Thanks,
Srinivas
> +
> /*
> * Return the hybrid scaling factor for P-cores and
> use the
> * default core scaling for E-cores.
next prev parent reply other threads:[~2026-05-10 14:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-08 6:30 [PATCH v2 0/2] cpufreq: intel_pstate: Add scaling factor for Bartlett Lake P-core only SKUs Henry Tseng
2026-05-08 6:30 ` [PATCH v2 1/2] cpufreq: intel_pstate: Fix scaling for hybrid-capable CPUs not reporting hybrid Henry Tseng
2026-05-10 14:34 ` srinivas pandruvada [this message]
2026-05-08 6:30 ` [PATCH v2 2/2] cpufreq: intel_pstate: Use HYBRID_SCALING_FACTOR_ADL for Bartlett Lake Henry Tseng
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=3bc634d8d8566f188909fca9e176f651f6295dfb.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=henrytseng@qnap.com \
--cc=kevinko@qnap.com \
--cc=lenb@kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=swchen@qnap.com \
--cc=viresh.kumar@linaro.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