NAPI updates…

Software interrupts (softirq) or bottom halves are a kernel concept which helps decrease interrupt service latency. Because normal interrupts don’t nest in Linux, the system can’t service any new interrupt while it’s already processing one. Therefore doing a lot of work directly in an IRQ handler is a bad idea. softirqs are a form of processing which allows the IRQ handler to schedule a function to run as soon as IRQ handler exits. This adds a tier of “low latency processing” which does not block hardware interrupts. If software interrupts start consuming a lot of cycles, however, kernel will wake up a ksoftirq thread to take over the I/O portion of the processing. This helps back-pressure the I/O, and makes sure random threads don’t get their scheduler slice depleted by softirq work.

https://people.kernel.org/kuba/napi-updates

Linux used to support nested interrupts but this was removed some time ago in order to avoid increasingly complex solutions to stack overflows issues – allow just one level of nesting, allow multiple levels of nesting up to a certain kernel stack depth, etc.

https://linux-kernel-labs.github.io/refs/heads/master/lectures/interrupts.html

Leave a comment