kernel_optimize_test/tools/power
Janakarajan Natarajan 7adafe541f 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>
2019-11-05 17:22:46 -07:00
..
acpi ACPICA: iASL,acpi_dump: Improve y/n query 2019-08-21 00:00:36 +02:00
cpupower cpupower: mperf_monitor: Introduce per_cpu_schedule flag 2019-11-05 17:22:46 -07:00
pm-graph pm-graph: make setVal unbuffered again for python2 and python3 2019-09-04 23:10:26 +02:00
x86 platform-drivers-x86 for v5.4-2 2019-09-24 12:39:40 -07:00