diff options
author | Chen Yu <[email protected]> | 2015-09-09 18:27:31 +0800 |
---|---|---|
committer | Rafael J. Wysocki <[email protected]> | 2015-09-09 22:55:23 +0200 |
commit | 43717aadd2bc87fb10fbf1cd815c1cbae9bb95b3 (patch) | |
tree | a525f784c4a857f55c09d6dc8eee594ea042cffb /tools/perf/scripts/python/bin/export-to-postgresql-report | |
parent | 953ba9ff77f3d08635712eaeffb218d46889b58a (diff) |
intel_pstate: Fix user input of min/max to legal policy region
In current code, max_perf_pct might be smaller than min_perf_pct
by improper user input:
$ grep . /sys/devices/system/cpu/intel_pstate/m*_perf_pct
/sys/devices/system/cpu/intel_pstate/max_perf_pct:100
/sys/devices/system/cpu/intel_pstate/min_perf_pct:100
$ echo 80 > /sys/devices/system/cpu/intel_pstate/max_perf_pct
$ grep . /sys/devices/system/cpu/intel_pstate/m*_perf_pct
/sys/devices/system/cpu/intel_pstate/max_perf_pct:80
/sys/devices/system/cpu/intel_pstate/min_perf_pct:100
Fix this problem by 2 steps:
1. Normalize the user input to [min_policy, max_policy].
2. Make sure max_perf_pct>=min_perf_pct, suggested by Seiichi Ikarashi.
Signed-off-by: Chen Yu <[email protected]>
Acked-by: Kristen Carlson Accardi <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions