Disabling interrupts and masking interrupts
Kevin Wilson
wkevils at gmail.com
Sat Mar 9 16:30:10 EST 2013
Hi,
Are you sure about that Edge-triggered interrupts are gone and that
most hardware doesn't use edge triggers ?
For example, on my x86_64, I get 9 edge interrupts:
0: 127 0 IO-APIC-edge timer
1: 3 0 IO-APIC-edge i8042
4: 1 1 IO-APIC-edge
8: 0 1 IO-APIC-edge rtc0
12: 1 3 IO-APIC-edge i8042
14: 0 0 IO-APIC-edge ata_piix
15: 0 0 IO-APIC-edge ata_piix
43: 30897 7 PCI-MSI-edge em1
44: 306 308 PCI-MSI-edge snd_hda_intel
Also I remember I saw in a book about Kernel that edge interrupts are
more common than level interrupts.
rgs
Kevin
On Thu, Mar 7, 2013 at 6:53 PM, <Valdis.Kletnieks at vt.edu> wrote:
> On Thu, 07 Mar 2013 17:17:19 +0200, Kevin Wilson said:
>
>> Does this mean that once you are disabling
>> interrupts, these interrupts are lost ? even later, when we will
>> enable interrupts, the interrupts from the past that should have been
>> created (but interrupts were disabled at that time interval) are in
>> fact lost?
>
> Level-triggered interruots will go off once interrupts are re-enabled,
> assuming that the device has kept the level set and not given up and timed
> out.
>
> Edge-trittered interrupts are gone. That's part of why most hardware
> doesn't use edge triggers - it's just too hard to guarantee proper device
> driver operation.
>
> Also, in common usage, "disabled interrupts" means that you're not listening
> to *any* interrupts, while "masked" means "we're not listening to *this*
> interrupt source, even if we *are* accepting interrupts from other sources".
>
> The difference is that sometimes the CPU is doing stuff that it would be
> potentially screwed if *any* interrupt happened, so we disable them. Other
> times we're busy inside a device driver, and we're in a critical section
> for that device - but it's safe for other devices to interrupt. So to improve
> latency we mask off just the one interrupt not all of them.
More information about the Kernelnewbies
mailing list