Re: [PATCH V2] perf/x86: Consider pinned events for group validation

From: Thomas Gleixner
Date: Thu Aug 22 2019 - 22:05:27 EST


On Thu, 22 Aug 2019, Andi Kleen wrote:
> On Thu, Aug 22, 2019 at 08:29:46PM +0200, Thomas Gleixner wrote:
> > On Thu, 22 Aug 2019, Andi Kleen wrote:
> >
> > > > + /*
> > > > + * Disable interrupts to prevent the events in this CPU's cpuc
> > > > + * going away and getting freed.
> > > > + */
> > > > + local_irq_save(flags);
> > >
> > > I believe it's also needed to disable preemption. Probably should
> > > add a comment, or better an explicit preempt_disable() too.
> >
> > Preemption is implicit disabled by disabling interrupts.
>
> Yes it is, this is more for documentation.

Comment, yes. An explicit preempt_disable() surely not.

Thanks,

tglx