Re: [RFC 2/2] rcu: Remove ->dynticks_nmi_nesting from struct rcu_dynticks

From: Paul E. McKenney
Date: Thu Jun 21 2018 - 11:03:59 EST


On Thu, Jun 21, 2018 at 07:08:30PM +0900, Byungchul Park wrote:
> On Thu, Jun 21, 2018 at 03:39:49PM +0900, Byungchul Park wrote:
>
> [...]
>
> > I applied what you suggested and re-named rcu_nmi_{enter,exit} to
> ^
> rcu_nmi_{enter,exit}_common(bool irq)
>
> > rcu_irq_{enter,exit} and applied the same re-naming to
> ^
> rcu_irq_{enter,exit}_common(bool nmi)
>
> > ->dynticks_nmi_nesting as well, since those are not things to do with
> ^
> dynticks_nmi_nesting -> dynticks_irq_nesting
>
> > nmi anymore but both irq and nmi.
> >
> > I think "irq" is better to represent both irq and nmi than "nmi".
> > Please let me know if you don't think so. I can get rid of the re-
> > naming from the patch.

Again, we need to keep "nmi". There is a lot of irq-safe code in the
Linux kernel, but not so much nmi-safe code, so we need to give the
reader as many hints as we can that this code is unusual.

Thanx, Paul