Linux NAPI Shutdown Wait Analysis for Dedicated Threads Under PREEMPT_RT
The author examines whether the shutdown synchronization used for ordinary softirq NAPI polling still holds when NAPI runs in a dedicated thread in Linux 7.3. On non-RT kernels the BH-disabled poll region is covered by RCU, while under PREEMPT_RT the __local_bh_disable_ip() implementation calls rcu_read_lock() on outermost entry from a preemptible context. For RT receive processing via ksoftirqd, the enclosing ksoftirqd_run_begin() and ksoftirqd_run_end() provide the corresponding protection, though this does not cover every entry path such as userspace-driven busy polling. The author notes the NAPI guide does not specify how interrupt unmasking should synchronize with shutdown, leaving a gap for driver authors. The piece concludes by turning to Intel's igb driver, where a flag check against interrupts being re-enabled during shutdown raises a possible race.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in