A hardware interrupt is a signal from a device that interrupts the CPU’s current work and invokes an operating-system handler. Devices use interrupts to request attention when events occur, such as a network packet arriving, an I/O operation completing, or a timer firing. section 7.5.2 section 2.3.4
The operating system may handle the hardware interrupt quickly and defer further work to kernel processing, sometimes called a software interrupt. In Linux network processing, software interrupt handling performs protocol processing before the application processes the message. section 7.5.2 section 3.3.1
Figure 3.3 Packets traversing the network stack
Trace a packet from the NIC receive queue through protocol processing to the application. section 3.3.1
Interrupt handling can delay an application at unpredictable times. The CPU stops application code, saves its state, and enters the handler; this interrupt latency can take several microseconds. Further processing can also interfere with application work, and high interrupt rates can cause latency spikes. section 2.3.4 section 7.5.2
Low-latency systems can manage this interference in several ways:
- Poll for events instead of waiting for notification. Linux network drivers can switch between polling and interrupt-driven operation, but repeated polling can do more work when events are infrequent. section 3.3.1 section 7.5.2
- Consider CPU placement: isolate interrupt processing on dedicated CPUs, or colocate it with application threads. Protocol processing and the application may otherwise run on different CPUs. section 3.3.1
- Consider interrupt affinity and interrupt coalescing as techniques for mitigating interrupt overhead. section 2.3.4



