Take the 2-minute tour ×

as far as I know, Linux has 'fast interrupts', those that were requested with SA_INTERRUPT flag; fast interrupts are executed with all other interrupts disabled on the current CPU. But how does it differ from the normal interrupt handler behavior (where)?

share|improve this question

2 Answers 2

There is a good write up here:

Older versions of the Linux kernel took great pains to distinguish between "fast" and "slow" interrupts. Fast interrupts were those that could be handled very quickly, whereas handling slow interrupts took significantly longer. Slow interrupts could be sufficiently demanding of the processor, and it was worthwhile to reenable interrupts while they were being handled. Otherwise, tasks requiring quick attention could be delayed for too long.

In modern kernels, most of the differences between fast and slow interrupts have disappeared. There remains only one: fast interrupts (those that were requested with the SA_INTERRUPT flag) are executed with all other interrupts disabled on the current processor. Note that other processors can still handle interrupts, although you will never see two processors handling the same IRQ at the same time.

So, which type of interrupt should your driver use? On modern systems, SA_INTERRUPT is intended only for use in a few, specific situations such as timer interrupts. Unless you have a strong reason to run your interrupt handler with other interrupts disabled, you should not use SA_INTERRUPT.

So the only difference is the one that you mentioned; that fast interrupt handlers execute with all other interrupt handlers disabled, for faster performance.

share|improve this answer

As of today, you can mostly forget about the SA_INTERRUPT flag.
In between 2.6.18 and 2.6.24 it was just a migration helper for the new IRQF_DISABLED flag.
2.6.24 removed all SA_* flags and replaced them with IRQF_* flags.
2.6.35 marked this "new" flag as deprecated.

If you have a kernel before 2.6.18, you'll probably won't use it (see Justin's answer).

Today's usage of IRQF_DISABLE differs among the architectures. x86 still only uses it for time critical functions (time.c, hpet.c) and some xen stuff.

Concerning the difference; a normal interrupt can be interrupted by an other interrupt (preemption), a "fast" one on the other hand, can not.

share|improve this answer

Your Answer

