Disabling interrupts and masking interrupts

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Thu Mar 7 11:53:05 EST 2013


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130307/33b2f7c7/attachment.bin 


More information about the Kernelnewbies mailing list