Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1738256

Re: [PATCH 1/4] rcu: Allow for page faults in NMI handlers

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/4] rcu: Allow for page faults in NMI handlers
Date 2017-09-24 21:50 +0200
Message-ID <utl4B-4jB-7@gated-at.bofh.it> (permalink)
References <usZGN-7Ze-7@gated-at.bofh.it> <usZGN-7Ze-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Sep 23, 2017 at 1:56 PM, Steven Rostedt <rostedt@goodmis.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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/4] rcu: Allow for page faults in NMI handlers Steven Rostedt <rostedt@goodmis.org> - 2017-09-23 23:00 +0200
  Re: [PATCH 1/4] rcu: Allow for page faults in NMI handlers Linus Torvalds <torvalds@linux-foundation.org> - 2017-09-24 21:50 +0200
    Re: [PATCH 1/4] rcu: Allow for page faults in NMI handlers "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-25 02:10 +0200
      Re: [PATCH 1/4] rcu: Allow for page faults in NMI handlers Linus Torvalds <torvalds@linux-foundation.org> - 2017-09-25 02:20 +0200
        Re: [PATCH 1/4] rcu: Allow for page faults in NMI handlers "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-25 02:30 +0200
          Re: [PATCH 1/4] rcu: Allow for page faults in NMI handlers "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-25 02:40 +0200
            Re: [PATCH 1/4] rcu: Allow for page faults in NMI handlers Steven Rostedt <rostedt@goodmis.org> - 2017-09-25 06:50 +0200
              Re: [PATCH 1/4] rcu: Allow for page faults in NMI handlers "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-25 07:00 +0200
                Re: [PATCH 1/4] rcu: Allow for page faults in NMI handlers "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-09-26 05:20 +0200

csiph-web