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


Groups > linux.kernel > #1252550

Re: [PATCH v2] barriers: introduce smp_mb__release_acquire and update documentation

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] barriers: introduce smp_mb__release_acquire and update documentation
Date 2015-10-21 10:30 +0200
Message-ID <qlWWu-5OT-25@gated-at.bofh.it> (permalink)
References (5 earlier) <qhreB-7rq-87@gated-at.bofh.it> <qhBnz-5g1-1@gated-at.bofh.it> <qhCtk-6Ne-25@gated-at.bofh.it> <ql7hf-5TU-7@gated-at.bofh.it> <qlOFz-20f-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Oct 20, 2015 at 04:34:51PM -0700, Paul E. McKenney wrote:
> There is also the question of whether the barrier forces ordering
> of unrelated stores, everything initially zero and all accesses
> READ_ONCE() or WRITE_ONCE():
> 
> 	P0		P1		P2		P3
> 	X = 1;		Y = 1;		r1 = X;		r3 = Y;
> 					some_barrier();	some_barrier();
> 					r2 = Y;		r4 = X;
> 
> P2's and P3's ordering could be globally visible without requiring
> P0's and P1's independent stores to be ordered, for example, if you
> used smp_rmb() for some_barrier().  In contrast, if we used smp_mb()
> for barrier, everyone would agree on the order of P0's and P0's stores.

Oh!?

> There are actually a fair number of different combinations of
> aspects of memory ordering.  We will need to choose wisely.  ;-)
> 
> My hope is that the store-ordering gets folded into the globally
> visible transitive level.  Especially given that I have not (yet)
> seen any algorithms used in production that relied on the ordering of
> independent stores.

I would hope not, that's quite insane.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

Re: [PATCH v2] barriers: introduce smp_mb__release_acquire and  update documentation Boqun Feng <boqun.feng@gmail.com> - 2015-10-19 03:20 +0200
  Re: [PATCH v2] barriers: introduce smp_mb__release_acquire and  update documentation Peter Zijlstra <peterz@infradead.org> - 2015-10-19 12:30 +0200
    Re: [PATCH v2] barriers: introduce smp_mb__release_acquire and  update documentation Boqun Feng <boqun.feng@gmail.com> - 2015-10-20 09:40 +0200
  Re: [PATCH v2] barriers: introduce smp_mb__release_acquire and  update documentation "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-21 01:40 +0200
    Re: [PATCH v2] barriers: introduce smp_mb__release_acquire and  update documentation Peter Zijlstra <peterz@infradead.org> - 2015-10-21 10:30 +0200
      Re: [PATCH v2] barriers: introduce smp_mb__release_acquire and  update documentation "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-21 21:30 +0200
        Re: [PATCH v2] barriers: introduce smp_mb__release_acquire and  update documentation Peter Zijlstra <peterz@infradead.org> - 2015-10-21 21:40 +0200
          Re: [PATCH v2] barriers: introduce smp_mb__release_acquire and  update documentation "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-21 22:00 +0200
    RE: [PATCH v2] barriers: introduce smp_mb__release_acquire and  update documentation David Laight <David.Laight@ACULAB.COM> - 2015-10-21 18:10 +0200
      Re: [PATCH v2] barriers: introduce smp_mb__release_acquire and  update documentation "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-21 21:40 +0200

csiph-web