mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Linux PM <linux-pm@vger.kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Christian Loehle <christian.loehle@arm.com>,
	Jianyong Wu <wujianyong@hygon.cn>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] cpufreq: intel_pstate: Fix max_freq fallback in cpufreq_update_pressure()
Date: Wed, 23 Sep 2026 07:51:11 -0700	[thread overview]
Message-ID: <20260923145111.GA24137@ranerica-svr.sc.intel.com> (raw)
In-Reply-To: <12975163.O9o76ZdvQC@rafael.j.wysocki>

On Mon, Sep 21, 2026 at 09:12:00PM +0200, Rafael J. Wysocki wrote:
> From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> 
> After commit d2d5c129d07e ("cpufreq: Make cpufreq_update_pressure() fall
> back to cpuinfo.max_freq"), cpufreq pressure appears in the CPU load
> balancer unexpectedly in some cases in which it was not present before,
> leading to confusion and uncertainty.
> 
> Clearly, the scheduler assumes that cpufreq pressure will not be set
> unless the capacity reference frequency of the CPU is known, and the
> commit mentioned above violates that assumption.
> 
> However, in some cases the capacity reference frequency of the CPU is
> in fact known even though arch_scale_freq_ref() returns 0 and in those
> cases it should be possible to set cpufreq pressure as appropriate.
> 
> For this purpose, introduce a new cpufreq driver callback returning
> the CPU capacity reference frequency, .scale_freq_ref(), and make
> cpufreq_update_pressure() invoke it, if present, instead of falling
> back to cpuinfo.max_freq unconditionally.
> 
> Add that callback to the intel_pstate driver and make it return 0 unless
> the scale-invariant capacity of the given CPU has been explicitly set,
> in which cases its reference frequency is always cpuinfo.max_freq.
> 
> Fixes: d2d5c129d07e ("cpufreq: Make cpufreq_update_pressure() fall back to cpuinfo.max_freq")
> Reported-by: Jianyong Wu <wujianyong@hygon.cn>
> Closes: https://lore.kernel.org/linux-pm/20260915065747.1671965-1-wujianyong@hygon.cn/
> Tested-by: Jianyong Wu <wujianyong@hygon.cn>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

This patch did not break anything for me. I tested this in several Intel
processors with asymmetric capacity capacity enabled. Tasks spread as
expected when no cpufreq pressure is applied. Tasks duly migrate away when
this pressure is applied to a subset of CPUs. They come back when the
pressure is removed.

Tested-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> # Intel hybrid parts

  reply	other threads:[~2026-09-23 14:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 19:12 Rafael J. Wysocki
2026-09-23 14:51 ` Ricardo Neri [this message]
2026-09-23 14:48   ` Rafael J. Wysocki (Intel)
2026-09-23 16:19 ` Chen Yu
2026-09-23 17:05   ` 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=20260923145111.GA24137@ranerica-svr.sc.intel.com \
    --to=ricardo.neri-calderon@linux.intel.com \
    --cc=christian.loehle@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=wujianyong@hygon.cn \
    /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

all inboxes | Powered by JetHome®