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

From: Joel Fernandes

Date: Thu Feb 05 2026 - 20:23:18 EST




On 2/3/2026 6:44 AM, Peter Zijlstra wrote:
> 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?

I can try to do that again if we still want to go with this patch. When I tried
that last, I ran into issues I can't remember now (the space being limited?).