Reference:
Soft interrupts for the next half of Linux processing
Linux interrupts the bottom half of the mechanism
Deep understanding of the Linux kernel Soft interrupt/tasklet/Task Force column
To improve the responsiveness and concurrency of the system, Linux breaks the interrupt processing in the top and bottom halves. When an interrupt is generated, the interrupt corresponding handler (top half) is called, then the corresponding second half can be executed, the interrupt handler returns immediately, and the lower half is called by the operating system at the appropriate time. This greatly reduces the time required to interrupt processing.
The interrupt upper half handler function is a function of the irq_handler_t type registered in the REQUEST_IRQ described in the Linux interrupt architecture.
int int Long Const Char void *dev_id)
in general, tasks with the following characteristics are placed in the top half:1, the time is very sensitive 2, hardware-related 3, can not be interrupted by other interruptions of the work above three points, consider placing in the lower half.
The mechanism for interrupting the bottom half of the implementation is:1.tasklet2. Working queue work queue3. Soft interrupt Softirq where Tasklet is implemented by a soft interrupt.
Linux interrupts the bottom half of the mechanism