Eliminating Hardware Interrupts With Dispersed Interrupt Polling

Kirill Nagaitsev, Northwestern University

Photo of Kirill Nagaitsev

Each CPU on a modern architecture can receive thousands of hardware interrupts/second due to networking, I/O, and other events. In operating systems like Linux, interrupts cause expensive, hardware-driven context switches to the kernel and unexpected disruptions to caches and other hardware state. In HPC and database applications, for example, this results in significant performance impacts and unnecessary nondeterminism. Is it time to reconsider the alternative to interrupts, namely polling? We show that polling is a viable alternative to hardware interrupts on modern architectures. Traditional polling is inefficient as polls are concentrated in specific locations, blocking other code from execution. Our proposed alternative, Dispersed Interrupt Polling (DIP), deterministically distributes polls throughout the kernel and application. Our first prototype system, BEANDIP NK, demonstrates the application of DIP to an entire kernel on RISC-V. Our second system, BEANDIP Linux, demonstrates the application of DIP to unmodified user space code on x64. We evaluate our prototypes using the Nautilus kernel (401K lines of code), Postgres (1.5M lines of code), and various benchmarks, often achieving <10% overhead, without load, relative to nondeterministic hardware interrupts. When interrupt load is applied, our system has virtually no overhead relative to hardware interrupts.