Work deferring mechanism
Deferring is a method by which you schedule a piece of work to be executed in the future. It's a way to report an action later. Obviously, the kernel provides facilities to implement such a mechanism; it allows you to defer functions, whatever their type, to be called and executed later. There are three of them in the kernel:
- SoftIRQs: Executed in an atomic context
- Tasklets: Executed in an atomic context
- Workqueues: Executed in a process context
Softirqs and ksoftirqd
A software IRQ (softirq), or software interrupt is a deferring mechanism used only for very fast processing, since it runs with a disabled scheduler (in an interrupt context). You'll rarely (almost never) want to deal with softirq directly. There are only networks and block device subsystems using softirq. Tasklets are an instantiation of softirqs, and will be sufficient in almost every case when you feel the need to use softirqs.
ksoftirqd
In most cases, softirqs are scheduled in hardware interrupts, which...