Re: [PATCH v4 10/17] preempt: Introduce HAS_SEPARATE_PREEMPT_RESCHED_BITS
Boqun Feng <[email protected]> Wed, 5 Aug 2026 00:27:01 -0700
| Newsgroups | org.kernel.vger.rust-for-linux,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Aug 05, 2026 at 12:45:04PM +0530, Shrikanth Hegde wrote: > > Hi Boqun. > > > > nit: This limit is because to have the same behavior as other case when > > > NMI_BITS=4 right? > > > It is not easy to infer that from comment. > > > > > > > It's sort of design by implementation IIUC, previously because of > > NMI_BITS=4, we could only support nesting level being 15. And here we > > just want to keep the same behavior here. > > That I understood. > > > > > If your question is why 15 was a good number before this change, I guess > > would be it's just a number that is neither too big or too small. > > Its more about below comment. Something like below is better? > > /* NMI nesting is represented in 4 bits. */ > Sounds good, I will apply this, thank you! Regards, Boqun > > > > > > + /* Maximum NMI nesting is 15. */ \ > > > > + BUG_ON(__this_cpu_read(nmi_nesting) >= 15); \ > > > > + __this_cpu_inc(nmi_nesting); \ > > > > + preempt_count_set(preempt_count() | NMI_MASK); \