simple examples of how to

Monday, October 17, 2011

[Linux Device Driver] The difference between interrupt, softirq, and tasklet

All three are for handling interrupts. The difference is the speed. There is also a way to postpone the execution of interrupt: that is work_queue

interrupt: interrupt-context (top-half), most fast but should be very light. no sleep, no mutex-locking (only spin-lock)

softirq: interrupt-context (bottom-half), medium fast, no re-enterant, no preemption, not reasonably generally for device drivers.

tasklet: interrupt-context (bottom-half), not fast, no re-enterant, no preemption,

work_queue: process-context, slow, allow sleep and locking, re-enterant, preemption

No comments:

Post a Comment