All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ionela Voinescu <ionela.voinescu@arm.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Beata Michalska <beata.michalska@arm.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
	sudeep.holla@arm.com, will@kernel.org, viresh.kumar@linaro.org,
	sumitg@nvidia.com, yang@os.amperecomputing.com,
	vanshikonda@os.amperecomputing.com, lihuisong@huawei.com,
	zhanjie9@hisilicon.com, ptsm@linux.microsoft.com,
	Jonathan Corbet <corbet@lwn.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H . Peter Anvin" <hpa@zytor.com>, Phil Auld <pauld@redhat.com>,
	x86@kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v10 2/4] cpufreq: Introduce an optional cpuinfo_avg_freq sysfs entry
Date: Mon, 17 Feb 2025 15:07:24 +0000	[thread overview]
Message-ID: <Z7NQrBvnfYwXva1W@arm.com> (raw)
In-Reply-To: <Z7NOcd3IamyMTjbH@arm.com>

Hi Catalin,

On Monday 17 Feb 2025 at 14:57:53 (+0000), Catalin Marinas wrote:
> On Mon, Feb 17, 2025 at 12:52:44PM +0100, Rafael J. Wysocki wrote:
> > On Fri, Jan 31, 2025 at 5:25 PM Beata Michalska <beata.michalska@arm.com> wrote:
> > >
> > > Currently the CPUFreq core exposes two sysfs attributes that can be used
> > > to query current frequency of a given CPU(s): namely cpuinfo_cur_freq
> > > and scaling_cur_freq. Both provide slightly different view on the
> > > subject and they do come with their own drawbacks.
> > >
> > > cpuinfo_cur_freq provides higher precision though at a cost of being
> > > rather expensive. Moreover, the information retrieved via this attribute
> > > is somewhat short lived as frequency can change at any point of time
> > > making it difficult to reason from.
> > >
> > > scaling_cur_freq, on the other hand, tends to be less accurate but then
> > > the actual level of precision (and source of information) varies between
> > > architectures making it a bit ambiguous.
> > >
> > > The new attribute, cpuinfo_avg_freq, is intended to provide more stable,
> > > distinct interface, exposing an average frequency of a given CPU(s), as
> > > reported by the hardware, over a time frame spanning no more than a few
> > > milliseconds. As it requires appropriate hardware support, this
> > > interface is optional.
> > >
> > > Note that under the hood, the new attribute relies on the information
> > > provided by arch_freq_get_on_cpu, which, up to this point, has been
> > > feeding data for scaling_cur_freq attribute, being the source of
> > > ambiguity when it comes to interpretation. This has been amended by
> > > restoring the intended behavior for scaling_cur_freq, with a new
> > > dedicated config option to maintain status quo for those, who may need
> > > it.
> > 
> > In case anyone is waiting for my input here
> > 
> > Acked-by: Rafael J. Wysocki <rafael@kernel.org>
> > 
> > for this and the previous patch and please feel free to route them
> > both through ARM64.
> 
> Thanks Rafael. I indeed plan to take them through the arm64 tree.

Just a mention that this set depends on the patch that Beata linked at
[6]. That patch applies cleanly on next-20250217 and it still
builds/boots/works as expected.

Thanks,
Ionela.


> 
> -- 
> Catalin


  reply	other threads:[~2025-02-17 15:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-31 16:24 [PATCH v10 0/4] Add support for AArch64 AMUv1-based average freq Beata Michalska
2025-01-31 16:24 ` [PATCH v10 1/4] cpufreq: Allow arch_freq_get_on_cpu to return an error Beata Michalska
2025-02-05  7:00   ` Viresh Kumar
2025-01-31 16:24 ` [PATCH v10 2/4] cpufreq: Introduce an optional cpuinfo_avg_freq sysfs entry Beata Michalska
2025-02-05  7:01   ` Viresh Kumar
2025-02-17 11:52   ` Rafael J. Wysocki
2025-02-17 14:57     ` Catalin Marinas
2025-02-17 15:07       ` Ionela Voinescu [this message]
2025-02-17 16:05         ` Sudeep Holla
2025-02-17 18:20           ` Catalin Marinas
2025-01-31 16:24 ` [PATCH v10 3/4] arm64: Provide an AMU-based version of arch_freq_get_on_cpu Beata Michalska
2025-01-31 16:24 ` [PATCH v10 4/4] arm64: Update AMU-based freq scale factor on entering idle Beata Michalska
2025-02-17 21:32 ` [PATCH v10 0/4] Add support for AArch64 AMUv1-based average freq Catalin Marinas
2025-02-18  0:00   ` Beata Michalska
2025-02-18  9:18     ` Catalin Marinas

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=Z7NQrBvnfYwXva1W@arm.com \
    --to=ionela.voinescu@arm.com \
    --cc=beata.michalska@arm.com \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=lihuisong@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pauld@redhat.com \
    --cc=ptsm@linux.microsoft.com \
    --cc=rafael@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=sumitg@nvidia.com \
    --cc=tglx@linutronix.de \
    --cc=vanshikonda@os.amperecomputing.com \
    --cc=viresh.kumar@linaro.org \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    --cc=yang@os.amperecomputing.com \
    --cc=zhanjie9@hisilicon.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.