Apply various clarifications and fixups to the README for the cpufreq governor efficiency test.
Signed-off-by: Steve Muckle smuckle@linaro.org --- doc/examples/cpufreq_governor_efficiency/README | 48 ++++++++++++------------- 1 file changed, 23 insertions(+), 25 deletions(-)
diff --git a/doc/examples/cpufreq_governor_efficiency/README b/doc/examples/cpufreq_governor_efficiency/README index 10482b85f529..0d9123daa1cd 100755 --- a/doc/examples/cpufreq_governor_efficiency/README +++ b/doc/examples/cpufreq_governor_efficiency/README @@ -1,23 +1,22 @@ Measure the efficiency of cpufreq governors using rt-app
BACKGROUND: - DVFS adds a latency in the execution of task because of the time to - decide to move at max freq. We need to measure this latency and check - that the governor stays in an acceptable range. + DVFS adds a latency in the execution of a task because some or all of the + task may not be executed at maximum frequency. We need to measure this + latency and check that the governor stays in an acceptable range.
- When rt-app runs a json file, a log file is created for each thread. - This log file records the number of loop that has been executed and + When rt-app runs a json file a log file is created for each thread. + This log file records the number of loops that have been executed and the duration for executing these loops (per phase). We can use these - figures to evaluate to latency that is added by a cpufreq governor + figures to evaluate the latency that is added by a cpufreq governor and its "performance efficiency".
- We use the run+sleep pattern to do the measurement, for the run time per - loop, the performance governor should run the expected duration as the - CPU stays a max freq. At the opposite, the powersave governor will give - use the longest duration (as it stays at lowest OPP). Other governor will - be somewhere between the 2 previous duration as they will use several OPP - and will go back to max frequency after a defined duration which depends - on its monitoring period. + We use the run+sleep pattern to do the measurement. For the run time per + loop the performance governor should run the expected duration as the CPU + stays at max freq. At the opposite, the powersave governor will give us the + longest duration (as it stays at lowest OPP). Other governors will be + somewhere between the 2 previous durations as they may use any number of + OPPs for various portions of the workload.
The formula:
@@ -34,20 +33,22 @@ Usage: ./calibration.sh <cpu> cpu: cpu number on which you want to run the test
- ./test.sh <governor> <cpu> <runtime> <sleeptime> [<loops>] + ./test.sh <governor> <cpu> <runtime> <period> [<loops>] governor: target CPUFreq governor you want to test - cpu: cpu number on which you want to run the test. Be the same - as the one passing to "calibration.sh". - runtime: running time in ms per loop of the workload pattern - sleeptime: sleeping time in ms per loop of the workload pattern + cpu: cpu number on which you want to run the test. It should + be the same as the one passed to "calibration.sh". + runtime: running time in ms per loop of the workload pattern, + at fmax + period: period in ms of the loop of the workload pattern loops: repeat times of the workload pattern. default: 10
Example: - "./calibration.sh 0" means to calculate the computing capacity of CPU0 which - will be used in the following test. + "./calibration.sh 0" means to calculate the computing capacity of CPU0 + which will be used in the following test.
- "./test.sh ondemand 0 100 100 20" means to - test "ondemand" on CPU0 with workload pattern "run 100ms + sleep 100ms"(20 loops). + "./test.sh ondemand 0 100 200 20" means to test "ondemand" on CPU0 with a + periodic workload where the busy portion is 100ms of work (if it were to be + run at fmax), the period is 200ms, and the workload runs for 20 cycles.
NOTE: - Make sure there are "sed", "cut", "grep", "rt-app", etc tools on @@ -55,6 +56,3 @@ NOTE:
- Run the test while the system is idle.
- - You can change the target governor's parameters after running "calibration.sh", - but before "test.sh". -