Re: [PATCH v13 01/17] preempt: Track NMI nesting to separate per-CPU counter
From: Peter Zijlstra
Date: Tue Oct 14 2025 - 15:37:32 EST
On Tue, Oct 14, 2025 at 01:59:00PM -0400, Joel Fernandes wrote:
> Would that break 32-bit x86? I have to research this more. This was what I
> initially thought of doing but ISTR some challenges. I'd like to think that was
> my imagination, but I will revisit it and see what it takes.
You can do a 64bit addition with 2 instructions on most 32 bit arch,
i386 in specific has: ADD+ADC. Same for many of the other simple ops.
Its multiplication and division where things get tricky, but luckily we
don't do much of those on __preempt_count.