[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFyHXW5smbkWdpz-v3n6=9u1+m68YH4rB8Kb99AWaz50Kw@mail.gmail.com>
Date: Sun, 24 Sep 2017 12:42:32 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
stable <stable@...r.kernel.org>
Subject: Re: [PATCH 1/4] rcu: Allow for page faults in NMI handlers
On Sat, Sep 23, 2017 at 1:56 PM, Steven Rostedt <rostedt@...dmis.org> wrote:
> +
> + /* Page faults can happen in NMI handlers, so check... */
> + if (READ_ONCE(rdtp->dynticks_nmi_nesting))
> + return;
> +
What is the reason for the READ_ONCE() here (and in the other case)?
It doesn't seem to have any actual reason. It's a "stable" per-cpu
value in that even if an NMI were to happen, it gets incremented and
then decremented, so there is nothing really volatile about it
anywhere that I can see.
So the READ_ONCE() seems to be just pure confusion.
What am I missing?
Linus
Powered by blists - more mailing lists