tools/power/cpupower/bench/README-BENCH
Source file repositories/reference/linux-study-clean/tools/power/cpupower/bench/README-BENCH
File Facts
- System
- Linux kernel
- Corpus path
tools/power/cpupower/bench/README-BENCH- Extension
[no extension]- Size
- 4673 bytes
- Lines
- 125
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: tools
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
This is cpufreq-bench, a microbenchmark for the cpufreq framework.
Purpose
=======
What is this benchmark for:
- Identify worst case performance loss when doing dynamic frequency
scaling using Linux kernel governors
- Identify average reaction time of a governor to CPU load changes
- (Stress) Testing whether a cpufreq low level driver or governor works
as expected
- Identify cpufreq related performance regressions between kernels
- Possibly Real time priority testing? -> what happens if there are
processes with a higher prio than the governor's kernel thread
- ...
What this benchmark does *not* cover:
- Power saving related regressions (In fact as better the performance
throughput is, the worse the power savings will be, but the first should
mostly count more...)
- Real world (workloads)
Description
===========
cpufreq-bench helps to test the condition of a given cpufreq governor.
For that purpose, it compares the performance governor to a configured
powersave module.
How it works
============
You can specify load (100% CPU load) and sleep (0% CPU load) times in us which
will be run X time in a row (cycles):
sleep=25000
load=25000
cycles=20
This part of the configuration file will create 25ms load/sleep turns,
repeated 20 times.
Adding this:
sleep_step=25000
load_step=25000
rounds=5
Will increase load and sleep time by 25ms 5 times.
Together you get following test:
25ms load/sleep time repeated 20 times (cycles).
50ms load/sleep time repeated 20 times (cycles).
..
100ms load/sleep time repeated 20 times (cycles).
First it is calibrated how long a specific CPU intensive calculation
takes on this machine and needs to be run in a loop using the performance
governor.
Then the above test runs are processed using the performance governor
and the governor to test. The time the calculation really needed
with the dynamic freq scaling governor is compared with the time needed
on full performance and you get the overall performance loss.
Example of expected results with ondemand governor:
This shows expected results of the first two test run rounds from
above config, you there have:
100% CPU load (load) | 0 % CPU load (sleep) | round
25 ms | 25 ms | 1
Annotation
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.