Re: [PATCH 1/2] events/core: introduce perf_pmu_disable_all() to turn off all PMU

2020-11-24 Thread Pingfan Liu
On Mon, Nov 23, 2020 at 10:05 PM Peter Zijlstra wrote: > > On Mon, Nov 23, 2020 at 01:37:25PM +0800, Pingfan Liu wrote: > > > +/* When crashed, other cpus hang in idle loop, so here do an emergency job > > under no lock */ > > -ENOPARSE, -ETOOLONG > > > +void perf_pmu_disable_all(void) > > +{ >

Re: [PATCH 1/2] events/core: introduce perf_pmu_disable_all() to turn off all PMU

2020-11-23 Thread Peter Zijlstra
On Mon, Nov 23, 2020 at 01:37:25PM +0800, Pingfan Liu wrote: > +/* When crashed, other cpus hang in idle loop, so here do an emergency job > under no lock */ -ENOPARSE, -ETOOLONG > +void perf_pmu_disable_all(void) > +{ > + struct pmu *pmu; > + > + list_for_each_entry(pmu, , entry) > +

[PATCH 1/2] events/core: introduce perf_pmu_disable_all() to turn off all PMU

2020-11-22 Thread Pingfan Liu
In crash context, NMI should be suppressed before jump to a new kernel. Naturally as the source of NMI on some arches, PMU should be turned off at that time. Introduce perf_pmu_disable_all() to achieve the goal. Signed-off-by: Pingfan Liu Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo