Andrea> On 20 Sep 1999, Jes Sorensen wrote:
>> enable_irq/disable_irq are quite expensive and should not be used
Andrea> disable_irq is expensive but disable_irq_nosync is quite fast
Andrea> as it complete even if there are other irq running at the same
Andrea> time.
It is relatively cheap on the PC, that doesn't mean it is cheap on all
architectures.
>> are better off disabling interrupts directly on the device (most
>> sane hardware has a bit to disable it) or using spin locks.
Andrea> If you need to grab the spinlock for a rasonable time then the
Andrea> best is to disable_irq_nosync and then grab the spinlock as
Andrea> 3c509 does, so you won't harm irq latency and you'll scale
Andrea> equally well as a local cli on SMP.
3c509 is ISA which doesn't support shared interrupts. disable_irq
stinks on shared interrupt devices.
As a rule of thumb it is much better to disable the interrupt at the
real source, ie. the device, if possible.
Jes
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/