x86/perf/intel/uncore|rapl: Fix error handling and sanitize pmu management
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest28 patches 2 repliesIn review
- v228 patches 18 repliesSuperseded
- v111 patches 18 repliesSuperseded
Changes in v3 from the cover letter
- Change export to GPL
- Fix the leftover while loop
- Fix the snb pmu_private bogosity
- Explain in the changelogs why we want to keep pmu_private
- Drop the proc/cpuinfo change
- Add an explanation to the Kconfig help text why selecting 'm' might break existing setups.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/28 | x86/perf/intel/uncore: Remove pointless mask checkarch/ | +0 | 0 replies | |
| 2/28 | x86/perf/intel/uncore: Simplify error rollbackarch/ | +24 | 0 replies | |
| 3/28 | x86/perf/intel/uncore: Fix error handlingarch/ arch/ | +94 | 0 replies | |
| 4/28 | x86/perf/intel/uncore: Add sanity checks for pci dev package idarch/ | +1 | 0 replies | |
| 5/28 | x86/perf/intel_uncore: Cleanup hardware on exitarch/ arch/ arch/ +1 more | +33 | 0 replies | |
| 6/28 | x86/perf/intel/uncore: Drop pointless hotplug priorityarch/ | +0 | 0 replies | |
| 7/28 | x86/perf/intel_uncore: Make code readablearch/ | +50 | 0 replies | |
| 8/28 | x86/perf/uncore: Make uncore_pcibus_to_physid staticarch/ arch/ | +1 | 0 replies | |
| 9/28 | perf: Allow storage of pmu private data in eventinclude/ | +1 | 0 replies | |
| 10/28 | x86/perf/intel_uncore: Store box in event->pmu_privatearch/ arch/ arch/ | +12 | 0 replies | |
| 11/28 | x86/topology: Create logical package idarch/ arch/ arch/ +3 more | +141 | 0 replies | |
| 12/28 | x86/perf/uncore: Track packages not per cpu dataarch/ arch/ arch/ | +197 | 0 replies | |
| 13/28 | x86/perf/intel_uncore: Clear all hardware state on exitarch/ | +26 | 0 replies | |
| 14/28 | x86/perf/intel_uncore: Make PCI and MSR uncore independentarch/ | +18 | 0 replies | |
| 15/28 | cpumask: Export cpumask_any_butlib/ | +1 | 0 replies | |
| 16/28 | x86/perf/intel_uncore: Make it modulararch/ arch/ arch/ +1 more | +38 | 0 replies | |
| 17/28 | x86/perf/cqm: Get rid of the silly for_each_cpu lookupsarch/ | +12 | 0 replies | |
| 18/28 | x86/perf/intel_rapl: Make Knights Landings support functionalarch/ | +1 | 0 replies | |
| 19/28 | x86/perf/intel/rapl: Add proper error handlingarch/ | +21 | 0 replies | |
| 20/28 | x86/perf/intel/rapl: Sanitize the quirk handlingarch/ | +19 | 3 replies | |
| 21/28 | x86/perf/intel/rapl: Calculate timing oncearch/ | +18 | 0 replies | |
| 22/28 | x86/perf/intel/rapl: Cleanup the printk outputarch/ | +23 | 0 replies | |
| 23/28 | x86/perf/intel/rapl: Refactor code some morearch/ | +31 | 0 replies | |
| 24/28 | x86/perf/intel/rapl: Make pmu lock rawarch/ | +10 | 0 replies | |
| 25/28 | x86/perf/intel/rapl: Utilize event->pmu_privatearch/ | +12 | 0 replies | |
| 26/28 | x86/perf/intel/rapl: Convert it to a per package facilityarch/ | +87 | 0 replies | |
| 27/28 | perf: Export perf_event_sysfs_showkernel/ | +1 | 0 replies | |
| 28/28 | x86/perf/intel/rapl: Make it modulararch/ arch/ arch/ | +35 | 0 replies |
Reviews trailers per patch
None of the 28 patches has a Reviewed-by or Acked-by.
| Patch | Andi Kleen |
|---|---|
| 1/28 | |
| 2/28 | |
| 3/28 | |
| 4/28 | |
| 5/28 | |
| 6/28 | |
| 7/28 | |
| 8/28 | |
| 9/28 | |
| 10/28 | |
| 11/28 | |
| 12/28 | |
| 13/28 | |
| 14/28 | Requested-by |
| 15/28 | |
| 16/28 | |
| 17/28 | |
| 18/28 | |
| 19/28 | |
| 20/28 | |
| 21/28 | |
| 22/28 | |
| 23/28 | |
| 24/28 | |
| 25/28 | |
| 26/28 | |
| 27/28 | |
| 28/28 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [patch V3 00/28] x86/perf/intel/uncore|rapl: Fix error handling and sanitize pmu management
This series addresses the following issues:
- Add proper error handling to uncore and rapl drivers
- Get rid of the pseudo per cpuness of these drivers and do a proper per package storage
- Allow them to be modular
In order to do proper per package storage I added a facility which sanity checks the physical package id of the processors which is supplied by bios and does a logical package id translation. That allows drivers to do allocations for the maximum number of possible packages independent of possible BIOS creativity.
The module patches are optional. Andi pointed out that they miss the proper auto loading/probing machinery, but I kept them and let Peter decide what to do with them.
Changes vs. V2:
- Change export to GPL
- Fix the leftover while loop
- Fix the snb pmu_private bogosity
- Explain in the changelogs why we want to keep pmu_private
- Drop the proc/cpuinfo change
- Add an explanation to the Kconfig help text why selecting 'm' might break existing setups.
Delta patch below.
Thanks,
tglx
---
arch/x86/Kconfig.perf +6 -0
@@ -8,6 +8,9 @@ config PERF_EVENTS_INTEL_UNCORE Include support for Intel uncore performance events. These are available on NehalemEX and more modern processors. + Note: Selecting 'm' might break existing setups as the drivers + lack the autoprobe/load magic. If you need them select: y. + If unsure say y. config PERF_EVENTS_INTEL_RAPL
@@ -18,6 +21,9 @@ config PERF_EVENTS_INTEL_RAPL Include support for Intel rapl performance events for power monitoring on modern processors. + Note: Selecting 'm' might break existing setups as the drivers + lack the autoprobe/load magic. If you need them select: y. + If unsure say y. endmenu
arch/x86/kernel/cpu/perf_event_intel_uncore.c +2 -2
@@ -774,9 +774,9 @@ static void __uncore_exit_boxes(struct istatic void uncore_exit_boxes (void *dummy) { -struct intel_uncore_type **types = uncore_msr_uncores; +struct intel_uncore_type **types; -while (*types) +for (types = uncore_msr_uncores; *types; types++)__uncore_exit_boxes (*types++,smp_processor_id ()); }
arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c +1 -1
@@ -313,7 +313,7 @@ static int snb_uncore_imc_event_init(strreturn -EINVAL ; event->cpu = box->cpu; - event->pmu_private = pmu; + event->pmu_private = box; event->hw.idx =-1 ; event->hw.last_tag = ~0ULL ;
arch/x86/kernel/cpu/proc.c +0 -1
@@ -12,7 +12,6 @@ static void show_cpuinfo_core(struct seq {#ifdef CONFIG_SMP seq_printf (m,"physical id\t: %d\n" , c->phys_proc_id); -seq_printf (m,"logical id\t: %d\n" , c->logical_proc_id);seq_printf (m,"siblings\t: %d\n" ,cpumask_weight (topology_core_cpumask (cpu)));seq_printf (m,"core id\t\t: %d\n" , c->cpu_core_id);
kernel/events/core.c +1 -1
@@ -9335,7 +9335,7 @@ ssize_t perf_event_sysfs_show(struct devreturn 0 ; } -EXPORT_SYMBOL (perf_event_sysfs_show); +EXPORT_SYMBOL_GPL (perf_event_sysfs_show);static int __init perf_event_sysfs_init (void ) {