Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1342964
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC 1/1] perf, x86: fix pebs warning by always update msr when disabling pebs event |
| Date | 2016-02-25 09:30 +0100 |
| Message-ID | <r5Zt9-120-23@gated-at.bofh.it> (permalink) |
| References | <r5OR3-1PG-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Feb 24, 2016 at 01:01:08PM -0800, kan.liang@intel.com wrote: > From: Kan Liang <kan.liang@intel.com> > > This patch tries to fix a pebs warning found in my stress test. > The following perf command can easily trigger the pebs warning or > spurious NMI error on Skylake/Broadwell/Haswell platforms. > > sudo perf record -e > 'cpu/umask=0x04,event=0xc4/pp,cycles,branches,ref-cycles,cache-misses, > cache-references' --call-graph fp -b -c1000 -a > Also NMI watchdog must be enabled. > > For this case, the events number is larger than counter number. So > perf has to do multiplexing. In perf_mux_hrtimer_handler, it does > perf_pmu_disable, schedule out old events, rotate_ctx, schedule in new > events and finally perf_pmu_enable. If the old events include precise > event, the MSR_IA32_PEBS_ENABLE should be cleared when perf_pmu_disable. > The MSR_IA32_PEBS_ENABLE should keep 0 until the perf_pmu_enable is > called and the new event is precise event. Right, so intel_pmu_pebs_disable_all() should be called and should be writing a 0 here. > However, unfortunately, for some reason, MSR_IA32_PEBS_ENABLE still > keeps the old state according to my test. Yeah, that a problem, please continue looking and find the root cause, we really do not want to band-aid our way around such problems, that always leads to surprises later on.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC 1/1] perf, x86: fix pebs warning by always update msr when disabling pebs event kan.liang@intel.com - 2016-02-24 22:10 +0100 Re: [RFC 1/1] perf, x86: fix pebs warning by always update msr when disabling pebs event Peter Zijlstra <peterz@infradead.org> - 2016-02-25 09:30 +0100
csiph-web