hardirq
also: hardware interrupt, IRQ, interrupt request
A hardware interrupt (hardirq) is an asynchronous signal from a hardware device to the CPU that forces it to stop executing the current code and immediately handle the interrupt. Hardirqs are the fastest and most critical type of interrupt in the Linux kernel.
When a hardware device (like a network card, disk controller, or keyboard) needs immediate attention, it sends an electrical signal to the CPU via an interrupt request (IRQ) line. The kernel suspends normal execution and jumps to an interrupt handler routine to service the device.
Hardirqs run with strict time constraints because the device is actively waiting for a response. They execute in a special CPU context that masks (disables) other interrupts to prevent nested handling and maintain data consistency. You can view active hardirqs on your system using cat /proc/interrupts or watch -d cat /proc/interrupts.
To minimize latency and complexity, hardirq handlers do only essential work (like reading data from the device or acknowledging the interrupt), then defer less-critical work to softirqs or tasklets for later execution when the CPU is less busy.