x86/perfcounters: x86 and AMD cpu updates
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest29 patches 56 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/29 | x86: perfcounter: remove X86_FEATURE_ARCH_PERFMON flag for AMD cpusarch/ arch/ | +3 | 13 replies | |
| 2/29 | perfcounter: declare perf_max_counters only for CONFIG_PERF_COUNTERSinclude/ | +2 | 1 reply | |
| 3/29 | x86/perfcounters: add default path to cpu detectionarch/ | +2 | 1 reply | |
| 4/29 | x86/perfcounters: rework pmc_amd_save_disable_all() and pmc_amd_restore_all()arch/ | +14 | 8 replies | |
| 5/29 | x86/perfcounters: protect per-cpu variables with compile barriers onlyarch/ | +2 | 1 reply | |
| 6/29 | perfcounters: rename struct hw_perf_counter_ops into struct pmuarch/ arch/ include/ +1 more | +66 | 1 reply | |
| 7/29 | x86/perfcounters: rename struct pmc_x86_ops into struct x86_pmuarch/ | +68 | 1 reply | |
| 8/29 | x86/perfcounters: make interrupt handler model specificarch/ | +13 | 1 reply | |
| 9/29 | x86/perfcounters: remove get_status() from struct x86_pmuarch/ | +5 | 1 reply | |
| 10/29 | x86/perfcounters: remove ack_status() from struct x86_pmuarch/ | +2 | 1 reply | |
| 11/29 | x86/perfcounters: rename __hw_perf_counter_set_period into x86_perf_counter_set_periodarch/ | +3 | 1 reply | |
| 12/29 | x86/perfcounters: rename intel only functionsarch/ | +4 | 1 reply | |
| 13/29 | x86/perfcounters: modify initialization of struct x86_pmuarch/ | +16 | 1 reply | |
| 14/29 | x86/perfcounters: make x86_pmu data a static structarch/ | +25 | 1 reply | |
| 15/29 | x86/perfcounters: move counter parameters to struct x86_pmuarch/ | +37 | 1 reply | |
| 16/29 | x86/perfcounters: make pmu version genericarch/ | +13 | 1 reply | |
| 17/29 | x86/perfcounters: make x86_pmu_read() static inlinearch/ | +1 | 1 reply | |
| 18/29 | x86/perfcounters: rename cpuc->active_maskarch/ | +5 | 5 replies | |
| 19/29 | x86/perfcounters: generic use of cpuc->activearch/ | +9 | 1 reply | |
| 20/29 | x86/perfcounters: consistent use of type int for counter indexarch/ include/ | +5 | 1 reply | |
| 21/29 | x86/perfcounters: rework counter enable functionsarch/ | +24 | 1 reply | |
| 22/29 | x86/perfcounters: rework counter disable functionsarch/ | +23 | 1 reply | |
| 23/29 | x86/perfcounters: change and remove pmu initialization checksarch/ | +13 | 1 reply | |
| 24/29 | x86/perfcounters: implement the interrupt handler for AMD cpusarch/ | +37 | 1 reply | |
| 25/29 | x86/perfcounters: return raw count with x86_perf_counter_update()arch/ | +4 | 1 reply | |
| 26/29 | x86/perfcounters: introduce max_period variablearch/ | +12 | 2 replies | |
| 27/29 | x86/perfcounters: remove vendor check in fixed_mode_idx()arch/ | +1 | 2 replies | |
| 28/29 | x86/perfcounters: remove unused function argument in intel_pmu_get_status()arch/ | +3 | 1 reply | |
| 29/29 | perfcounters: updating kerneltop documentationDocumentation/ | +1 | 2 replies |
Reviews trailers per patch
All 29 patches have a Reviewed-by or Acked-by.
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/29] x86/perfcounters: x86 and AMD cpu updates
This patch series updates the perfcounters implementation mainly for the x86 architecture.
Also, it introduces a data structure (struct pmu) describing a generic performance monitoring unit (pmu). This structure is a replacement for struct hw_perf_counter_ops. Similiar, I introduced struct x86_pmu for the x86 architecture (as a replacement for struct pmc_x86_ops).
There are patches for x86 with some fixes and cleanups, a change in the model specific split and a complete rework of AMD pmu code. The result is simplified model specific code and more generalized and unified code. Features that are only supported by AMD or Intel are now implemented in vendor specific functions.
The AMD pmu differs to Intel, especially there is no status register and also there are no fixed counters. This makes a separate interrupt handler for AMD cpus necessary. Also, a global disable/enable of the performance counters (e.g. to avoid NMIs to protect the modification of a list) is expensive on AMD cpus leading to up to 4 msr reads/writes per counter. There is still some more work to do here to avoid this.
This patch series bases on the tip/percounters/core branch.
I developed this patches based on 03ced43 and later rebased to 1b88991. The latest tip/percounters/core branch seems to be broken, no nmis are delivered, only perfcounter interrupts with no results on kerneltop. I am still debugging this. However, I could test successfully the patch series based on 03ced43 and want to release the patches anyway.
-Robert