powerpc/selftest: Add support for cpuidle latency measurement
The cpuidle latency selftest provides support to systematically extract, analyse and present IPI and timer based wakeup latencies for each CPU and each idle state available on the system. The selftest leverages test_cpuidle_latency module's debugfs interface to interact and extract latency information from the kernel. The selftest inserts the module if already not inserted, disables all the idle states and enables them one by one testing the following: 1. Keeping source CPU constant, iterate through all the cores and pick a single CPU for each core measuring IPI latency for baseline (CPU is busy with cat /dev/random > /dev/null workload) and then when the CPU is idle. 2. Iterating through all the CPU cores and selecting one CPU for each core, then, the expected timer durations to be equivalent to the residency of the deepest idle state enabled is sent to the selected target CPU, then the difference between the expected timer duration and the time of wakeup is determined. To run this test specifically: $ sudo make -C tools/testing/selftests \ TARGETS="powerpc/cpuidle_latency" run_tests There are a few optional arguments too that the script can take [-h <help>] [-i <run timer tests>] [-m <location of the module>] [-s <source cpu for ipi test>] [-o <location of the output>] [-v <verbose> (run on all cpus)] Default Output location in: tools/testing/selftests/powerpc/cpuidle_latency/cpuidle_latency.log To run the test without re-compiling: $ cd tools/testing/selftest/powerpc/cpuidle_latency/ $ sudo ./cpuidle_latency.sh Reviewed-by:Srikar Dronamraju <srikar@linux.vnet.ibm.com> Signed-off-by:
Pratik R. Sampat <psampat@linux.ibm.com> Signed-off-by:
Aboorva Devarajan <aboorvad@linux.vnet.ibm.com>
Loading
Please register or sign in to comment