Skip to content

Replace trace_cpu_frequency with trace_policy_frequency

Samuel Wu bpf linux-doc linux-perf-users linux-pm linux-trace-kernel lkml 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 14 repliesIn review
  2. v22 patches 1 replySuperseded

Changes in v3 from the cover letter

- Resending v2 properly (accidentally ommited cover letter in v2)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cpufreq: Replace trace_cpu_frequency with trace_policy_frequencydrivers/cpufreq/cpufreq.c drivers/cpufreq/intel_pstate.c include/trace/events/power.h +4 more+41 -3112 replies
2/2cpufreq: Documentation update for trace_policy_frequencyDocumentation/admin-guide/pm/amd-pstate.rst Documentation/admin-guide/pm/intel_pstate.rst Documentation/trace/events-power.rst+13 -131 reply

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchViresh Kumar
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] Replace trace_cpu_frequency with trace_policy_frequency

This series replaces the cpu_frequency trace event with a new trace event, policy_frequency. Since by definition all CPUs in a policy are of the same frequency, we can emit a frequency change per policy instead of per CPU. This saves some compute and memory from the kernel side, while simplifying analysis from the post-processing of the trace log side.

Any process that relied on cpu_frequency trace event needs to switch to the new policy_frequency trace event in order to maintain functionality. The decision of replacing instead of adding the trace event is intentional. Since emitting once per policy instead of once per CPU is anyways a semantics change that would require a tooling update, the trace event was also appropriately renamed. The presence of the policy_frequency event in a trace log is a clear and obvious signal for tooling to determine kernel version and which trace event to parse.

1/2: Replaces trace_cpu_frequency with trace_policy_frequency 2/2: Corresponding documentation patch that updates references to
cpu_frequency with policy_frequency

Changes in v3:
- Resending v2 properly (accidentally ommited cover letter in v2)

Changes in v2:
- Replaced trace_cpu_frequency with trace_policy_frequency (per Christian and Viresh)
- Updated references to cpu_frequency in documentation with policy_frequency
- v1 link: https://lore.kernel.org/all/[email protected]

Samuel Wu (2):
cpufreq: Replace trace_cpu_frequency with trace_policy_frequency
cpufreq: Documentation update for trace_policy_frequency

 Documentation/admin-guide/pm/amd-pstate.rst   | 10 ++++----
 Documentation/admin-guide/pm/intel_pstate.rst | 14 +++++------
 Documentation/trace/events-power.rst          |  2 +-
 drivers/cpufreq/cpufreq.c                     | 14 ++---------
 drivers/cpufreq/intel_pstate.c                |  6 +++--
 include/trace/events/power.h                  | 24 ++++++++++++++++---
 kernel/trace/power-traces.c                   |  2 +-
 samples/bpf/cpustat_kern.c                    |  8 +++----
 samples/bpf/cpustat_user.c                    |  6 ++---
 tools/perf/builtin-timechart.c                | 12 +++++-----
 10 files changed, 54 insertions(+), 44 deletions(-)
Signature · 1 line
2.52.0.107.ga0afd4fd5b-goog