Commit acade63
perf/x86/intel: Apply mid ACK for small core
A warning as below may be occasionally triggered in an ADL machine when
these conditions occur:
- Two perf record commands run one by one. Both record a PEBS event.
- Both runs on small cores.
- They have different adaptive PEBS configuration (PEBS_DATA_CFG).
[ ] WARNING: CPU: 4 PID: 9874 at arch/x86/events/intel/ds.c:1743 setup_pebs_adaptive_sample_data+0x55e/0x5b0
[ ] RIP: 0010:setup_pebs_adaptive_sample_data+0x55e/0x5b0
[ ] Call Trace:
[ ] <NMI>
[ ] intel_pmu_drain_pebs_icl+0x48b/0x810
[ ] perf_event_nmi_handler+0x41/0x80
[ ] </NMI>
[ ] __perf_event_task_sched_in+0x2c2/0x3a0
Different from the big core, the small core requires the ACK right
before re-enabling counters in the NMI handler, otherwise a stale PEBS
record may be dumped into the later NMI handler, which trigger the
warning.
Add a new mid_ack flag to track the case. Add all PMI handler bits in
the struct x86_hybrid_pmu to track the bits for different types of
PMUs. Apply mid ACK for the small cores on an Alder Lake machine.
The existing hybrid() macro has a compile error when taking address of
a bit-field variable. Add a new macro hybrid_bit() to get the
bit-field value of a given PMU.
Fixes: f83d2f9 ("perf/x86/intel: Add Alder Lake Hybrid support")
Reported-by: Ammy Yi <[email protected]>
Signed-off-by: Kan Liang <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Andi Kleen <[email protected]>
Tested-by: Ammy Yi <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]1 parent df51fe7 commit acade63
2 files changed
+30
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2904 | 2904 | | |
2905 | 2905 | | |
2906 | 2906 | | |
2907 | | - | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
2908 | 2910 | | |
2909 | 2911 | | |
2910 | 2912 | | |
2911 | 2913 | | |
2912 | 2914 | | |
2913 | | - | |
2914 | | - | |
2915 | 2915 | | |
2916 | 2916 | | |
2917 | 2917 | | |
2918 | 2918 | | |
2919 | 2919 | | |
2920 | 2920 | | |
2921 | | - | |
2922 | | - | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
2923 | 2927 | | |
2924 | | - | |
| 2928 | + | |
2925 | 2929 | | |
2926 | 2930 | | |
2927 | 2931 | | |
| |||
2958 | 2962 | | |
2959 | 2963 | | |
2960 | 2964 | | |
| 2965 | + | |
| 2966 | + | |
2961 | 2967 | | |
2962 | 2968 | | |
2963 | 2969 | | |
| |||
2969 | 2975 | | |
2970 | 2976 | | |
2971 | 2977 | | |
2972 | | - | |
| 2978 | + | |
2973 | 2979 | | |
2974 | 2980 | | |
2975 | 2981 | | |
| |||
6129 | 6135 | | |
6130 | 6136 | | |
6131 | 6137 | | |
6132 | | - | |
6133 | 6138 | | |
6134 | 6139 | | |
6135 | 6140 | | |
| |||
6167 | 6172 | | |
6168 | 6173 | | |
6169 | 6174 | | |
| 6175 | + | |
6170 | 6176 | | |
6171 | 6177 | | |
6172 | 6178 | | |
| |||
6192 | 6198 | | |
6193 | 6199 | | |
6194 | 6200 | | |
| 6201 | + | |
6195 | 6202 | | |
6196 | 6203 | | |
6197 | 6204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
656 | 656 | | |
657 | 657 | | |
658 | 658 | | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
659 | 663 | | |
660 | 664 | | |
661 | 665 | | |
| |||
686 | 690 | | |
687 | 691 | | |
688 | 692 | | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
689 | 703 | | |
690 | 704 | | |
691 | 705 | | |
| |||
755 | 769 | | |
756 | 770 | | |
757 | 771 | | |
| 772 | + | |
758 | 773 | | |
759 | 774 | | |
760 | 775 | | |
| |||
0 commit comments