mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lukasz Luba <lukasz.luba@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-kernel@vger.kernel.org, dietmar.eggemann@arm.com,
	rafael@kernel.org, daniel.lezcano@linaro.org, amitk@kernel.org,
	rui.zhang@intel.com, amit.kachhap@gmail.com,
	linux-pm@vger.kernel.org
Subject: Re: [RFC PATCH v3 0/5] Introduce Cpufreq Active Stats
Date: Tue, 26 Apr 2022 08:46:57 +0100	[thread overview]
Message-ID: <f6bb20c6-38a0-57d6-8979-d14e445da623@arm.com> (raw)
In-Reply-To: <20220426031125.ozaxwecwvuby6wo3@vireshk-i7>



On 4/26/22 04:11, Viresh Kumar wrote:
> On 06-04-22, 23:08, Lukasz Luba wrote:
>> Hi all,
>>
>> This is the 3rd version of patch set which tries to address issues which are
>> due to missing proper information about CPU performance in time.
>>
>> The issue description:
>> 1. "Cpufreq statistics cover the time when CPUs are in idle states, so they
>>     are not suitable for certain purposes, like thermal control." Rafael [2]
>> 2. Thermal governor Intelligent Power Allocation (IPA) has to estimate power,
>>     for the last period, e.g. 100ms, for each CPU in the Cluster, to grant new
>>     power and set max possible frequency. Currently in some cases it gets big
>>     error, when the frequency of CPU changed in the middle. It is due to the
>>     fact that IPA reads the current frequency for the CPU, not aware of all
>>     other frequencies which were actively (not in idle) used in the last 100ms.
>>
>> This code focuses on tracking the events of idle entry/exit for each CPU
>> and combine them with the frequency tracked statistics inside internal
>> statistics arrays (per-CPU). In the old cpufreq stats we have one shared
>> statistics array for the policy (all CPUs) and not take into account
>> periods when each CPU was in idle.
>>
>> Sometimes the IPA error between old estimation signal and reality is quite
>> big (>50%).
> 
> It would have been useful to show how the stats hierarchy looks in userspace
> now.
> 

I haven't modify your current cpufreq stats, they are still counting
total time (idle + running) for the given frequency. I think this is
still useful for some userspace tools. These new proposed stats don't
have such sysfs interface to read them. I don't know if userspace would
be interested in this information (the running only time). IIRC Android
uses bpf mechanisms to get this information to the userspace.

  reply	other threads:[~2022-04-26  7:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 22:08 Lukasz Luba
2022-04-06 22:08 ` [RFC PATCH v3 1/5] cpufreq: stats: " Lukasz Luba
2022-04-06 22:08 ` [RFC PATCH v3 2/5] cpuidle: Add Cpufreq Active Stats calls tracking idle entry/exit Lukasz Luba
2022-04-26 12:05   ` Artem Bityutskiy
2022-04-26 15:01     ` Lukasz Luba
2022-04-26 16:29       ` Artem Bityutskiy
2022-04-27 13:58         ` Lukasz Luba
2022-04-06 22:08 ` [RFC PATCH v3 3/5] thermal: Add interface to cooling devices to handle governor change Lukasz Luba
2022-04-06 22:08 ` [RFC PATCH v3 4/5] thermal: power allocator: Prepare power actors and calm down when not used Lukasz Luba
2022-04-06 22:08 ` [RFC PATCH v3 5/5] thermal: cpufreq_cooling: Improve power estimation using Cpufreq Active Stats Lukasz Luba
2022-04-26  3:11 ` [RFC PATCH v3 0/5] Introduce " Viresh Kumar
2022-04-26  7:46   ` Lukasz Luba [this message]
2022-04-26  7:54     ` Viresh Kumar
2022-04-26  7:59       ` Lukasz Luba
2022-04-26  8:02         ` Viresh Kumar
2022-04-26 14:40           ` Lukasz Luba

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=f6bb20c6-38a0-57d6-8979-d14e445da623@arm.com \
    --to=lukasz.luba@arm.com \
    --cc=amit.kachhap@gmail.com \
    --cc=amitk@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.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

all inboxes | Powered by JetHome®