isolcpus leaves CPUs idle, but IRQs still land there

Even the simplest CPU isolation trick can be misleading. Setting isolcpus=0,1 in GRUB and rebooting makes top show those cores sitting empty, but hardware interrupts do not respect the hint. Interrupt requests (IRQs) keep landing on the isolated CPUs, keeping them from ever being truly idle. If your goal is cycle-accurate polling, a userspace NIC driver, or DPDK-style packet processing, scheduler isolation alone is not enough.
The half-visible wall between cores and interrupts
After rebooting with isolcpus=0,1, many administrators check /proc/cmdline and run taskset -cp 1 on a known process PID to confirm isolation. The trap is watching top or htop instead of /proc/interrupts. A quick watch -n1 'grep "^ *[0-9]" /proc/interrupts | head' reveals the hidden traffic: IRQ counts still increment on CPU0 and CPU1. That traffic can preempt your pinned thread, wreck determinism, or skew benchmark numbers.
Modern kernels, older habits
Newer kernels offer alternatives—isolcpus=domain, cgroups cpuset, or managed_irq—but the IRQ caveat remains. The long-deprecated isolcpus= flag still appears in GRUB snippets and quick how-tos. Even when it is replaced by cpusets or nohz_full=, the need to manage IRQ affinity persists. Administrators must explicitly shift IRQs away from the isolated cores by writing to /proc/irq/IRQNUM/smp_affinity or setting irqaffinity=2-7 in the same GRUB line. Some devices ignore these changes, requiring driver-level tricks like binding NICs to vfio-pci and pinning polling threads.
Confirm with interrupts, not with top
A datapath box tuned for low latency usually combines IOMMU on (intel_iommu=on iommu=pt), SR-IOV virtual functions, and pinned userspace threads. The final check is /proc/interrupts, not top. If IRQ counts still tick on the supposedly isolated CPUs, isolation is incomplete—and the workload will not hit the expected cycle budget.
Why it matters
For real-time or packet-processing workloads, scheduler isolation is only the first step. Hardware interrupts can silently reclaim the CPU, breaking determinism and inflating latency. Administrators who rely on isolcpus without verifying IRQ placement risk deploying systems that appear idle but are actually handling hidden interrupts. The takeaway: treat isolcpus as a starting point, not a complete solution, and always confirm with /proc/interrupts before trusting a core’s availability.
Source: DEV Community. AI-assisted editorial synthesis — TechnoExpress.

