From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
Linux PM <linux-pm@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] cpufreq: intel_pstate: Rearrange checks in hybrid_get_cost()
Date: Wed, 01 Jul 2026 11:08:34 -0700 [thread overview]
Message-ID: <0878786a83120630ce4e8c601f41927e82866b16.camel@linux.intel.com> (raw)
In-Reply-To: <2832945.mvXUDI8C0e@rafael.j.wysocki>
On Wed, 2026-06-17 at 19:02 +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Make the checks in hybrid_get_cost() more straightforward.
>
Please do the same for hwp_get_cpu_scaling()
if (hybrid_get_cpu_type(cpu) != INTEL_CPU_TYPE_ATOM)
to
if (hybrid_get_cpu_type(cpu) == INTEL_CPU_TYPE_CORE)
Thanks,
Srinivas
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/cpufreq/intel_pstate.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -979,12 +979,10 @@ static int hybrid_get_cost(struct device
> * capacity. Similarly, P-cores start to be populated when
> E-cores are
> * utilized above 60% of the capacity.
> */
> - if (hybrid_get_cpu_type(dev->id) == INTEL_CPU_TYPE_ATOM) {
> - if (hybrid_has_l3(dev->id)) /* E-core */
> - *cost += 1;
> - } else { /* P-core */
> + if (hybrid_get_cpu_type(dev->id) == INTEL_CPU_TYPE_CORE) /*
> P-core */
> *cost += 2;
> - }
> + else if (hybrid_has_l3(dev->id)) /* E-core */
> + *cost += 1;
>
> return 0;
> }
>
>
>
next prev parent reply other threads:[~2026-07-01 18:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 17:02 [PATCH v1] cpufreq: intel_pstate: Rearrange checks in hybrid_get_cost() Rafael J. Wysocki
2026-07-01 18:08 ` srinivas pandruvada [this message]
2026-07-01 19:07 ` Rafael J. Wysocki (Intel)
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=0878786a83120630ce4e8c601f41927e82866b16.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@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