diff options
author | Janakarajan Natarajan <Janakarajan.Natarajan@amd.com> | 2019-11-05 20:16:54 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2019-11-06 03:22:46 +0300 |
commit | 7adafe541fe5e015261a92d39db8b163db477337 (patch) | |
tree | 57ebf767ed21b79514a515eec992f21111736193 /tools/power/cpupower/utils/helpers/cpuid.c | |
parent | d3f5d2a192a299f56579ae6e6283f9011b00208f (diff) | |
download | linux-7adafe541fe5e015261a92d39db8b163db477337.tar.xz |
cpupower: mperf_monitor: Introduce per_cpu_schedule flag
The per_cpu_schedule flag is used to move the cpupower process to the cpu
on which we are looking to read the APERF/MPERF registers.
This prevents IPIs from being generated by read_msr()s as we are already
on the cpu of interest.
Ex: If cpupower is running on CPU 0 and we execute
read_msr(20, MSR_APERF, val) then,
read_msr(20, MSR_MPERF, val)
the msr module will generate an IPI from CPU 0 to CPU 20 to query
for the MSR_APERF and then the MSR_MPERF in separate IPIs.
This delay, caused by IPI latency, between reading the APERF and MPERF
registers may cause both of them to go out of sync.
The use of the per_cpu_schedule flag reduces the probability of this
from happening. It comes at the cost of a negligible increase in cpu
consumption caused by the migration of cpupower across each of the
cpus of the system.
Signed-off-by: Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>
Acked-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/power/cpupower/utils/helpers/cpuid.c')
0 files changed, 0 insertions, 0 deletions