From: Beata Michalska <beata.michalska@arm.com>
To: Will Deacon <will@kernel.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com,
mark.rutland@arm.com, rafael@kernel.org, viresh.kumar@linaro.org,
ionela.voinescu@arm.com, sumitg@nvidia.com,
yang@os.amperecomputing.com
Subject: Re: [PATCH] arm64: Provide an AMU-based version of arch_freq_get_on_cpu
Date: Mon, 14 Aug 2023 09:27:17 +0200 [thread overview]
Message-ID: <ZNnXVXHYjzZV15y_@e129154.nice.arm.com> (raw)
In-Reply-To: <20230727095604.GA18721@willie-the-truck>
On Thu, Jul 27, 2023 at 10:56:05AM +0100, Will Deacon wrote:
> On Wed, Jun 07, 2023 at 03:00:49PM +0100, Beata Michalska wrote:
> > On Wed, Jun 07, 2023 at 10:58:56AM +0100, Sudeep Holla wrote:
> > > On Tue, Jun 06, 2023 at 04:57:54PM +0100, Beata Michalska wrote:
> > > > With the Frequency Invariance Engine (FIE) being already wired up with
> > > > sched tick and making use of relevant (core counter and constant
> > > > counter) AMU counters, getting the current frequency for a given CPU
> > > > on supported platforms, can be achieved by utilizing the frequency scale
> > > > factor which reflects an average CPU frequency for the last tick period
> > > > length.
> > > >
> > > > With that at hand, arch_freq_get_on_cpu dedicated implementation
> > > > gets enrolled into cpuinfo_cur_freq policy sysfs attribute handler,
> > > > which is expected to represent the current frequency of a given CPU,
> > > > as obtained by the hardware. This is exactly the type of feedback that
> > > > cycle counters provide.
> > > >
> > > > In order to avoid calling arch_freq_get_on_cpu from the scaling_cur_freq
> > > > attribute handler for platforms that do provide cpuinfo_cur_freq, and
> > > > yet keeping things intact for those platform that do not, its use gets
> > > > conditioned on the presence of cpufreq_driver (*get) callback (which also
> > > > seems to be the case for creating cpuinfo_cur_freq attribute).
> > > >
> > >
> > > LGTM,
> > >
> > > Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
> > >
> > Thanks for the review.
> > > However I fail to understand if both the changes are dependent ?
> > > Can this be split into 2 patches ? I fail to see the dependency, what
> > > am I missing ? Even if there is some dependency to get arch value
> > > (arch_freq_get_on_cpu() from show_cpuinfo_cur_freq()), you can push
> > > that change first followed by the arm64 change as 2 different change.
> > >
> > I guess I could split the patch into two parts:
> > 1. adding implementation for the arch_freq_get_on_cpu
> > 2. wiring it up with the cpufreq relevant attrib handlers
> >
> > or the other way round (if that's what you have in mind).
> >
> > Will wait a bit for any further comments before pushing new v.
>
> Are you still planning on a v2?
Apologies for late reply, 've been away for a while and then got bit swamped.
I do not think there will be v2 unless I'll find reasonable way to handle cases
as one mentioned in [1].
---
BR
B.
[1] https://lore.kernel.org/linux-arm-kernel/691d3eb2-cd93-f0fc-a7a4-2a8c0d44262c@nvidia.com/T/#m4e74cb5a0aaa353c60fedc6cfb95ab7a6e381e3c
>
> Will
next prev parent reply other threads:[~2023-08-14 7:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 15:57 [PATCH] arm64: Provide an AMU-based version of arch_freq_get_on_cpu Beata Michalska
2023-06-07 9:58 ` Sudeep Holla
2023-06-07 14:00 ` Beata Michalska
2023-07-27 9:56 ` Will Deacon
2023-08-14 7:27 ` Beata Michalska [this message]
2023-06-08 5:15 ` Viresh Kumar
2023-06-08 5:18 ` Viresh Kumar
2023-06-08 14:45 ` Beata Michalska
2023-06-09 4:39 ` Viresh Kumar
2023-06-16 9:57 ` Beata Michalska
2023-06-14 18:59 ` Sumit Gupta
2023-06-16 9:53 ` Beata Michalska
2023-06-23 14:33 ` Sumit Gupta
2023-10-18 13:05 ` Sumit Gupta
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=ZNnXVXHYjzZV15y_@e129154.nice.arm.com \
--to=beata.michalska@arm.com \
--cc=catalin.marinas@arm.com \
--cc=ionela.voinescu@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=rafael@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=sumitg@nvidia.com \
--cc=viresh.kumar@linaro.org \
--cc=will@kernel.org \
--cc=yang@os.amperecomputing.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox