lkml.org 
[lkml]   [2020]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/2] events/core: introduce perf_pmu_disable_all() to turn off all PMU
On Mon, Nov 23, 2020 at 10:05 PM Peter Zijlstra <peterz@infradead.org> 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)
> > +{
> > + struct pmu *pmu;
> > +
> > + list_for_each_entry(pmu, &pmus, entry)
> > + if (pmu->pmu_disable)
> > + pmu->pmu_disable(pmu);
> > +}
>
> This violates both locking rules and coding style.
Oops. I will re-work on it to see how to run it safely on crashed context.

Thanks,
Pingfan

\
 
 \ /
  Last update: 2020-11-24 09:54    [W:0.541 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site