lkml.org 
[lkml]   [1999]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: kernel-hacking-HOWTO: An lk primer seeks feedback
From
Date
>>>>> "Andrea" == Andrea Arcangeli <andrea@suse.de> writes:

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/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.037 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site