Re: [PATCH v4] softirq: Preserve interrupt context during IRQ exit

From: Karl Mehltretter

Date: Tue Sep 29 2026 - 17:29:11 EST


On Mon, Sep 28, 2026 at 10:24:02AM +0100, Sebastian Andrzej Siewior wrote:
> could you please do
> (in_nmi() | hardirq_count()) == HARDIRQ_OFFSET)
> instead? This will merge NMI check into the hardirq check, dropping one
> conditional jump away.
>

Hello Sebastian,

Good catch. With GCC it removes one conditional branch on x86-64, arm64
and arm32. On x86-64 it also uses three fewer instructions.

I will send this tweaked version soon.

Thanks for the review!

Karl