Re: [PATCH 06/21] qla2xxx: Simplify interrupt handler locking.

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

 



On Thu, 2008-04-03 at 13:13 -0700, Andrew Vasquez wrote:
> There's no need to use the heavier (albiet safer)
> *_irq[save|restore]() locking primitives within the driver's
> interrupt handlers, interrupts are guaranteed to be
> non-reentrant.  Use lightweight spin_lock() and spin_unlock()
> primitives while acquiring the hardware_lock.

The above statement isn't entirely true: interrupts are not guaranteed
to be non re-entrant.  They are guaranteed not to be re-entered from the
*same* interrupt, but if you've got more than one card, the interrupt
routine can be executing simultaneously on an SMP system which is in
contravention of the classical definition of re-entrancy.

So, the rules for locks in interrupt is that as long as the lock is
unique per interrupting instance (which it looks like yours are) you can
get away with not requiring interrupt disables within critical sections
but if you have a more global lock which could be taken by different
interrupting entities then you must do interrupt disables still.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux