[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211130120511.GB599355@lothringen>
Date: Tue, 30 Nov 2021 13:05:11 +0100
From: Frederic Weisbecker <frederic@...nel.org>
To: Nicolas Saenz Julienne <nsaenzju@...hat.com>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
rcu@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Mark Rutland <mark.rutland@....com>,
Steven Rostedt <rostedt@...dmis.org>, paulmck@...nel.org,
mtosatti <mtosatti@...hat.com>
Subject: Re: Question WRT early IRQ/NMI entry code
On Tue, Nov 30, 2021 at 12:28:41PM +0100, Nicolas Saenz Julienne wrote:
> Hi All,
> while going over the IRQ/NMI entry code I've found a small 'inconsistency':
> while in the IRQ entry path, we inform RCU of the context change *before*
> incrementing the preempt counter, the opposite happens for the NMI entry
> path. This applies to both arm64 and x86[1].
>
> Actually, rcu_nmi_enter() — which is also the main RCU context switch function
> for the IRQ entry path — uses the preempt counter to verify it's not in NMI
> context. So it would make sense to assume all callers have the same updated
> view of the preempt count, which isn't true ATM.
>
> I'm sure there an obscure/non-obvious reason for this, right?
At least I can't find an immediate reason for it either :-)
Thanks!
Powered by blists - more mailing lists