This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
realtime:documentation:threadirq [2016/06/23 08:22] anna-maria created |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Threaded interrupt handler ====== | ||
- | |||
- | In mainline Linux the interrupt service routine is processed in hard | ||
- | interrupt context with hardware interrupts disabled. Hardware | ||
- | interrupts disabled implies that preemption and soft interrupts are | ||
- | also disabled. Interrupt handlers are processed in context of the | ||
- | interrupt service routine with hard interrupts disabled as well. The | ||
- | kernel command line option `threadirqs` changes the the interrupt | ||
- | handlers to run in a threaded context. The scheduler policy of the | ||
- | thread is set to SCHED_FIFO with a default priority of 50. | ||
- | |||
- | All interrupt handlers marked with the IRQF_NO_THREAD flag will not be | ||
- | threaded and run with hard interrupts disabled. This flag is used for | ||
- | example by Inter-Processor Interrupts (IPIs). Interrupt handlers set | ||
- | up with the IRQF_TIMER or IRQF_PER_CPU flag are marked as | ||
- | IRQF_NO_THREAD implicitly. | ||
- | |||
- | The PREEMPT_RT patch forces the `threadirqs` command line option. | ||
- | There is a small difference between the behavior of threaded | ||
- | interrupts in the mainline and PREEMPT_RT implementations, illustrated | ||
- | in the following table: | ||
- | |||
- | <WRAP center 400px> | ||
- | | ^ Mainline ^ PREEMPT_RT | | ||
- | ^hard interrupts disabled | | | | ||
- | ^soft interrupts disabled | โ | โ | | ||
- | ^preemption disabled | โ | | | ||
- | </WRAP> | ||