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


Groups > linux.kernel > #1693840

Re: [PATCH] documentation: Fix two-CPU control-dependency example

From "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] documentation: Fix two-CPU control-dependency example
Date 2017-07-21 18:40 +0200
Message-ID <u5J85-7bl-3@gated-at.bofh.it> (permalink)
References (5 earlier) <u5r1v-4gG-3@gated-at.bofh.it> <u5rux-4sb-3@gated-at.bofh.it> <u5sAj-59K-45@gated-at.bofh.it> <u5sJY-5s5-19@gated-at.bofh.it> <u5tZo-68f-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jul 21, 2017 at 08:24:40AM +0800, Boqun Feng wrote:
> On Thu, Jul 20, 2017 at 04:07:14PM -0700, Paul E. McKenney wrote:
> [...]
> > > 
> > > So if I respin the patch with the extern, would you still feel reluctant?
> > 
> > Yes, because I am not seeing how this change helps.  What is this telling
> > the reader that the original did not, and how does it help the reader
> > generate good concurrent code?
> 
> One thing I think we probably should do is to make READ_ONCE() semantics
> more clear, i.e. call it out that in our conceptual model for kernel
> programming we always rely on the compiler to be serious about the
> return value of READ_ONCE(). I didn't find the comment before
> READ_ONCE() or memory-barriers.txt talking about something similar.
> 
> Or am I the only one having this kinda semantics guarantee in mind?

That sounds like a good idea to me.  The C++ standards committee might
be reluctant to provide a good definition of "volatile", but we can at
least provide a definition of our own.  It should be possible to leverage
the need for "volatile" to support MMIO accesses, as there is general
agreement that this was and still is its main purpose.  Given those
guarantees, there is no reason we cannot apply them in other situations,
for example, interacting with irq handlers and preventing inappropriate
optimizations for concurrent code.

Even better, with tests to find compiler bugs in this area!

							Thanx, Paul

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


Thread

Re: [PATCH] documentation: Fix two-CPU control-dependency example "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-19 19:50 +0200
  Re: [PATCH] documentation: Fix two-CPU control-dependency example Akira Yokosawa <akiyks@gmail.com> - 2017-07-19 23:40 +0200
    Re: [PATCH] documentation: Fix two-CPU control-dependency example "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-20 00:00 +0200
      Re: [PATCH] documentation: Fix two-CPU control-dependency example Boqun Feng <boqun.feng@gmail.com> - 2017-07-20 03:40 +0200
        Re: [PATCH] documentation: Fix two-CPU control-dependency example "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-20 07:50 +0200
          Re: [PATCH] documentation: Fix two-CPU control-dependency example Boqun Feng <boqun.feng@gmail.com> - 2017-07-20 08:20 +0200
            Re: [PATCH] documentation: Fix two-CPU control-dependency example "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-20 15:00 +0200
          Re: [PATCH] documentation: Fix two-CPU control-dependency example Akira Yokosawa <akiyks@gmail.com> - 2017-07-20 15:00 +0200
            Re: [PATCH] documentation: Fix two-CPU control-dependency example "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-20 18:20 +0200
              Re: [PATCH] documentation: Fix two-CPU control-dependency example Akira Yokosawa <akiyks@gmail.com> - 2017-07-20 23:20 +0200
                Re: [PATCH] documentation: Fix two-CPU control-dependency example "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-20 23:50 +0200
                Re: [PATCH] documentation: Fix two-CPU control-dependency example Akira Yokosawa <akiyks@gmail.com> - 2017-07-21 01:00 +0200
                Re: [PATCH] documentation: Fix two-CPU control-dependency example "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-21 01:10 +0200
                Re: [PATCH] documentation: Fix two-CPU control-dependency example Boqun Feng <boqun.feng@gmail.com> - 2017-07-21 02:30 +0200
                Re: [PATCH] documentation: Fix two-CPU control-dependency example "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-21 18:40 +0200
                Re: [PATCH] documentation: Fix two-CPU control-dependency example Akira Yokosawa <akiyks@gmail.com> - 2017-07-22 01:40 +0200
                Re: [PATCH] documentation: Fix two-CPU control-dependency example "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-23 06:50 +0200
                Re: [PATCH] documentation: Fix two-CPU control-dependency example Boqun Feng <boqun.feng@gmail.com> - 2017-07-23 17:40 +0200
                Re: [PATCH] documentation: Fix two-CPU control-dependency example Akira Yokosawa <akiyks@gmail.com> - 2017-07-24 02:10 +0200
                Re: [PATCH] documentation: Fix two-CPU control-dependency example "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-24 06:40 +0200
                Re: [PATCH] documentation: Fix two-CPU control-dependency example Boqun Feng <boqun.feng@gmail.com> - 2017-07-24 08:40 +0200
                Re: [PATCH] documentation: Fix two-CPU control-dependency example Akira Yokosawa <akiyks@gmail.com> - 2017-07-24 12:50 +0200

csiph-web