Re: [PATCH v17 02/16] preempt: Track NMI nesting to separate per-CPU counter

From: Peter Zijlstra

Date: Tue Feb 03 2026 - 06:45:21 EST


On Wed, Jan 21, 2026 at 05:39:05PM -0500, Lyude Paul wrote:

> diff --git a/kernel/softirq.c b/kernel/softirq.c
> index 77198911b8dd4..af47ea23aba3b 100644
> --- a/kernel/softirq.c
> +++ b/kernel/softirq.c
> @@ -88,6 +88,8 @@ EXPORT_PER_CPU_SYMBOL_GPL(hardirqs_enabled);
> EXPORT_PER_CPU_SYMBOL_GPL(hardirq_context);
> #endif
>
> +DEFINE_PER_CPU(unsigned int, nmi_nesting);

What happened with putting this in the same line as preempt_count?