Skip to content

cpufreq: Record stats with fast-switching

Viresh Kumar linux-pm lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 1 replyIn review
  2. v24 patches 18 repliesSuperseded
  3. v14 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- Use READ/WRITE_ONCE() for reset-time as well.
- Use unlikely for few conditionals in the hot path.
- Better changelogs.
- Rebase changes.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5cpufreq: stats: Defer stats update to cpufreq_stats_record_transition()drivers/cpufreq/cpufreq_stats.c+56 -190 replies
2/5cpufreq: stats: Remove lockingdrivers/cpufreq/cpufreq_stats.c+0 -60 replies
3/5cpufreq: stats: Mark few conditionals with unlikely()drivers/cpufreq/cpufreq_stats.c+2 -20 replies
4/5cpufreq: stats: Enable stats for fast-switch as welldrivers/cpufreq/cpufreq.c drivers/cpufreq/cpufreq_stats.c+4 -60 replies
5/5cpufreq: Move traces and update to policy->cur to cpufreq coredrivers/cpufreq/cpufreq.c kernel/sched/cpufreq_schedutil.c+8 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH V3 0/5] cpufreq: Record stats with fast-switching

Hi,

We disabled recording cpufreq stats when fast switching was introduced to the cpufreq core as the cpufreq stats required to take a spinlock and that can't be allowed (for performance reasons) on scheduler's hot path.

Here is an attempt to get rid of the lock and bring back the support.

V2->V3:
- Use READ/WRITE_ONCE() for reset-time as well.
- Use unlikely for few conditionals in the hot path.
- Better changelogs.
- Rebase changes.

V1-V2:
- Use READ_ONCE/WRITE_ONCE instead of atomic in the first patch.

--
Viresh

Viresh Kumar (5):
cpufreq: stats: Defer stats update to
cpufreq_stats_record_transition()
cpufreq: stats: Remove locking
cpufreq: stats: Mark few conditionals with unlikely()
cpufreq: stats: Enable stats for fast-switch as well
cpufreq: Move traces and update to policy->cur to cpufreq core

 drivers/cpufreq/cpufreq.c        | 11 ++++
 drivers/cpufreq/cpufreq_stats.c  | 89 ++++++++++++++++++++------------
 kernel/sched/cpufreq_schedutil.c | 12 +----
 3 files changed, 69 insertions(+), 43 deletions(-)
Signature · 1 line
2.25.0.rc1.19.g042ed3e048af