linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v3 0/5] Introduce Cpufreq Active Stats
@ 2022-04-06 22:08 Lukasz Luba
  2022-04-06 22:08 ` [RFC PATCH v3 1/5] cpufreq: stats: " Lukasz Luba
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Lukasz Luba @ 2022-04-06 22:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: lukasz.luba, dietmar.eggemann, viresh.kumar, rafael,
	daniel.lezcano, amitk, rui.zhang, amit.kachhap, linux-pm

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%).

changelog:
v3:
- moved the core implementation into the cpufreq and not
  creating a new framework (as sugested by Rafael)
- updated all function names and APIs
v2 [1]


Regards,
Lukasz Luba

[1] https://lore.kernel.org/all/20210706131828.22309-1-lukasz.luba@arm.com/
[2] https://lore.kernel.org/all/CAJZ5v0gzpfT__EyrVuZSr32ms7-YJZw7qEok0WZECv1iDRRvWA@mail.gmail.com/

Lukasz Luba (5):
  cpufreq: stats: Introduce Cpufreq Active Stats
  cpuidle: Add Cpufreq Active Stats calls tracking idle entry/exit
  thermal: Add interface to cooling devices to handle governor change
  thermal: power allocator: Prepare power actors and calm down when not
    used
  thermal: cpufreq_cooling: Improve power estimation using Cpufreq
    Active Stats

 MAINTAINERS                           |   2 +-
 drivers/cpufreq/cpufreq_stats.c       | 872 ++++++++++++++++++++++++++
 drivers/cpuidle/cpuidle.c             |   5 +
 drivers/thermal/cpufreq_cooling.c     | 131 ++++
 drivers/thermal/gov_power_allocator.c |  71 +++
 include/linux/cpufreq_stats.h         | 131 ++++
 include/linux/thermal.h               |   1 +
 7 files changed, 1212 insertions(+), 1 deletion(-)
 create mode 100644 include/linux/cpufreq_stats.h

-- 
2.17.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-04-27 13:58 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-06 22:08 [RFC PATCH v3 0/5] Introduce Cpufreq Active Stats 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
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

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).