[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
>>>>> "Werner" == Werner Almesberger <> writes:

Werner> Paul Rusty Russell wrote:
>> `This document describes the common routines, locking systems and
>> general requirements for kernel code: its goal is to serve as a
>> primer for Linux kernel development.'

Werner> 5.2: you may want to
Werner> discuss disable_irq, disable_irq_nosync, and enable_irq. On
Werner> most (all?) architectures, they are reasonably inexpensive
Werner> ways to block specific interrupts. (BTW, why don't we actually
Werner> have some kind of interrupt blocking that doesn't go down to
Werner> the interrupt controller hardware ? Is the PIC part considered
Werner> to be cheap enough in all possible cases ?)

Actually I think the discussion of disable_irq/enable_irq should say
something along the lines of "don't use these, if you think you need
them, think again, if you still think you need them, think again real

enable_irq/disable_irq are quite expensive and should not be used
except for very special cases. I'd claim that 99.9% of the time people
are better off disabling interrupts directly on the device (most sane
hardware has a bit to disable it) or using spin locks.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:54    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean