Re: [PATCH 2/5] irqtime: Remove needless IRQs disablement on kcpustat update

From: Peter Zijlstra
Date: Fri Sep 02 2016 - 12:30:51 EST


On Fri, Sep 02, 2016 at 04:53:47PM +0200, Paolo Bonzini wrote:
>
>
> On 02/09/2016 16:03, Frederic Weisbecker wrote:
> > The callers of the functions performing irqtime kcpustat updates have
> > IRQS disabled, no need to disable them again.
>
> They do, but perhaps this should be annotated through some sparse magic.
> It's starting to be hairy, with the requirement spanning many separate
> files.

Sparse sucks for those things...

maybe just add something like lockdep_assert_irqsoff(). Such a call both
documents the requirement and validates at runtime when CONFIG_LOCKDEP.