From: Lukasz Luba <lukasz.luba@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
cristian.marussi@arm.com, rjw@rjwysocki.net
Subject: Re: [PATCH 0/4] CPUFreq statistics retrieved by drivers
Date: Tue, 4 Aug 2020 11:44:10 +0100 [thread overview]
Message-ID: <1f978078-b2df-a2e5-6af8-e73f65044ba7@arm.com> (raw)
In-Reply-To: <20200804103857.mxgkmt6qmmzejuzb@vireshk-mac-ubuntu>
On 8/4/20 11:38 AM, Viresh Kumar wrote:
> On 04-08-20, 11:29, Lukasz Luba wrote:
>> On 8/4/20 6:35 AM, Viresh Kumar wrote:
>>> IIUC, the only concern right now is to capture stats with fast switch ? Maybe we
>>> can do something else in that case and brainstorm a bit..
>>
>> Correct, the fast switch is the only concern right now and not tracked. We
>> could fill in that information with statistics data from firmware
>> with a cpufreq driver help.
>>
>> I could make the if from patch 1/4 covering narrowed case, when
>> fast switch is present, check for drivers stats.
>> Something like:
>> -----------8<------------------------------------------------------------
>> if (policy->fast_switch_enabled)
>> if (policy->has_driver_stats)
>> return cpufreq_stats_present_driver_data(policy, buf);
>> else
>> return 0;
>> -------------->8----------------------------------------------------------
>
> I don't think doing it with help of firmware is the right thing to do
> here then. For another platform we may not have a firmware which can
> help us, we need something in the opp core itself for that. Lemme see
> if I can do something about it.
OK, great, I will wait then with this patch series v2 which would change
into debugfs scmi only. Could you please add me on CC, I am very
interested in.
>
>>> Why is firmware the governor here ? Aren't you talking about the simple fast
>>> switch case only ?
>>
>> I used a term 'governor' for the firmware because it makes the final
>> set for the frequency. It (FW) should respect the frequency value
>> set using the fast switch. I don't know how other firmware (e.g. Intel)
>> treats this fast switch value or if they even expose FW stats, though.
>
> For Intel I think, Linux is one of the entities that vote for deciding
> the frequency of the CPUs and the firmware (after taking all such
> factors into account) chooses a frequency by its own, which must be >=
> the frequency requested by Linux.
>
>> You can read about this statistics region in [1] at:
>> 4.5.5 Performance domain statistics shared memory region
>>
>>>
>>> Over that, I think this cpufreq stats information isn't parsed by any tool right
>>> now and tweaking it a bit won't hurt anyone (like if we start capturing things a
>>> bit differently). So we may not want to worry about breaking userspace ABI here,
>>> if what we are looking to do is the right thing to do.
>>
>> So, there is some hope... IMHO it would be better to have this cpufreq
>> stats in normal location, rather then in scmi debugfs.
>
> I agree.
>
>>> I am not sure what notifications are we talking about here.
>>
>> There is a notification mechanism described in the SCMI spec [1] at
>> 4.5.4 Notifications.
>> We were referring to that mechanism.
>
> Ahh, I see. All I was thinking was about the cpufreq specific
> notifiers :)
>
next prev parent reply other threads:[~2020-08-04 10:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-29 15:12 [PATCH 0/4] CPUFreq statistics retrieved by drivers Lukasz Luba
2020-07-29 15:12 ` [PATCH 1/4] cpufreq: Add support for statistics read from drivers Lukasz Luba
2020-07-29 15:12 ` [PATCH 2/4] scmi: perf: Extend protocol to support performance statistics Lukasz Luba
2020-07-31 1:50 ` kernel test robot
2020-07-31 15:15 ` Cristian Marussi
2020-08-04 11:10 ` Lukasz Luba
2020-07-29 15:12 ` [PATCH 3/4] cpufreq: scmi: Move scmi_cpufreq_driver structure to the top Lukasz Luba
2020-07-29 15:12 ` [PATCH 4/4] cpufreq: scmi: Read statistics from FW shared memory Lukasz Luba
2020-07-30 8:53 ` [PATCH 0/4] CPUFreq statistics retrieved by drivers Viresh Kumar
2020-07-30 9:10 ` Sudeep Holla
2020-07-30 9:36 ` Lukasz Luba
2020-07-31 15:56 ` Sudeep Holla
2020-08-04 17:19 ` Florian Fainelli
2020-08-05 12:36 ` Sudeep Holla
2020-08-04 5:35 ` Viresh Kumar
2020-08-04 10:29 ` Lukasz Luba
2020-08-04 10:38 ` Viresh Kumar
2020-08-04 10:44 ` Lukasz Luba [this message]
2020-09-02 7:26 ` Viresh Kumar
2020-08-04 17:27 ` Florian Fainelli
2020-08-05 11:04 ` Lukasz Luba
2020-08-05 13:04 ` Viresh Kumar
2020-08-05 16:03 ` Sudeep Holla
2020-08-05 17:33 ` Florian Fainelli
2020-08-06 13:37 ` Sudeep Holla
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=1f978078-b2df-a2e5-6af8-e73f65044ba7@arm.com \
--to=lukasz.luba@arm.com \
--cc=cristian.marussi@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=sudeep.holla@arm.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;
as well as URLs for NNTP newsgroup(s).