Re: [PATCH 1/2] irq_flags_t: intro and core annotations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 22 Oct 2007 12:56:29 -0700 (PDT)
Linus Torvalds <[email protected]> wrote:

> 
> 
> On Mon, 22 Oct 2007, Matthew Wilcox wrote:
> > 
> > We certainly don't want to encourage people to blindly make those
> > conversions ... and I've seen the results of encouraging kernel janitors
> > to do things a certain way.
> 
> There's another issue: the "irqsave/irqrestore" versions are much safer 
> than the plain "irq" versions, in case the caller already has interrupts 
> disabled. 
> 
> So anybody making the change not only would need to make the performance 
> argument, he'd better not be a janitor that blindly does the change 
> without thinking about all call-sites etc..
> 

It's almost always a bug to do spin_lock_irq() when local interrupts are
disabled.  However iirc when we've tried to add runtime debugging to catch
that, it triggered false-positives which made the idea unworkable.  I forget
where.

However what we could do is to add a new
spin_lock_irq_tell_me_if_i_goofed() which would perform that runtime check.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux