x86/cpu: Consolidate APERF/MPERF code
Status from this message: The following commit has been merged into the x86/cleanups branch of tip:
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | x86/aperfmperf: Dont wake idle CPUs in arch_freq_get_on_cpu()arch/ | +3 | 1 reply | |
| 2/10 | x86/smp: Move APERF/MPERF code where it belongsarch/ arch/ | +362 | 1 reply | |
| 3/10 | x86/aperfmperf: Separate AP/BP frequency invariance initarch/ arch/ arch/ +1 more | +20 | 1 reply | |
| 4/10 | x86/aperfmperf: Untangle Intel and AMD frequency invariance initarch/ arch/ arch/ +1 more | +49 | 1 reply | |
| 5/10 | x86/aperfmperf: Put frequency invariance aperf/mperf data into a structarch/ | +15 | 1 reply | |
| 6/10 | x86/aperfmperf: Restructure arch_scale_freq_tick()arch/ | +21 | 1 reply | |
| 7/10 | x86/aperfmperf: Make parts of the frequency invariance code unconditionalarch/ arch/ arch/ +1 more | +41 | 1 reply | |
| 8/10 | x86/aperfmperf: Store aperf/mperf data for cpu frequency readsarch/ | +13 | 1 reply | |
| 9/10 | x86/aperfmperf: Replace aperfmperf_get_khz()arch/ fs/ include/ | +35 | 1 reply | |
| 10/10 | x86/aperfmperf: Replace arch_freq_get_on_cpu()arch/ arch/ | +2 | 1 reply |
Reviews trailers per patch
All 10 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Rafael J. Wysocki | Peter Zijlstra (Intel) | Eric Dumazet | Paul E. McKenney |
|---|---|---|---|---|
| Series | A-b | T-b | A-b | |
| 1/10 | A-b | |||
| 2/10 | A-b | |||
| 3/10 | R-b | |||
| 4/10 | R-b | |||
| 5/10 | R-b | |||
| 6/10 | R-b | |||
| 7/10 | R-b | |||
| 8/10 | A-b | |||
| 9/10 | R-b | |||
| 10/10 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [patch 00/10] x86/cpu: Consolidate APERF/MPERF code
APERF/MPERF is utilized in two ways:
1) Ad hoc readout of CPU frequency which requires IPIs
2) Frequency scale calculation for frequency invariant scheduling which reads APERF/MPERF on every tick.
These are completely independent code parts. Eric observed long latencies when reading /proc/cpuinfo which reads out CPU frequency via #1 and proposed to replace the per CPU single IPI with a broadcast IPI.
While this makes the latency smaller, it is not necessary at all because #2 samples APERF/MPERF periodically, except on idle or isolated NOHZ full CPUs which are excluded from IPI already.
It could be argued that not all APERF/MPERF capable systems have the required BIOS information to enable frequency invariance support, but in practice most of them do. So the APERF/MPERF sampling can be made unconditional and just the frequency scale calculation for the scheduler excluded.
The following series consolidates that.
Thanks,
tglx
--- arch/x86/include/asm/cpu.h | 2 arch/x86/include/asm/topology.h | 17 - arch/x86/kernel/acpi/cppc.c | 28 -- arch/x86/kernel/cpu/aperfmperf.c | 474 +++++++++++++++++++++++++++++++-------- arch/x86/kernel/cpu/proc.c | 2 arch/x86/kernel/smpboot.c | 358 ----------------------------- fs/proc/cpuinfo.c | 6 include/linux/cpufreq.h | 1 8 files changed, 405 insertions(+), 483 deletions(-)