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


Groups > linux.kernel > #1474551

Re: [PATCH 8/7] net/netfilter/nf_conntrack_core: Remove another memory barrier

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH 8/7] net/netfilter/nf_conntrack_core: Remove another memory barrier
Date 2016-09-01 18:50 +0200
Message-ID <scDlE-4lf-45@gated-at.bofh.it> (permalink)
References <scC6e-3Bv-23@gated-at.bofh.it> <scCfT-3EJ-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Sep 01, 2016 at 04:30:39PM +0100, Will Deacon wrote:
> On Thu, Sep 01, 2016 at 05:27:52PM +0200, Manfred Spraul wrote:
> > Since spin_unlock_wait() is defined as equivalent to spin_lock();
> > spin_unlock(), the memory barrier before spin_unlock_wait() is
> > also not required.

Note that ACQUIRE+RELEASE isn't a barrier.

Both are semi-permeable and things can cross in the middle, like:


	x = 1;
	LOCK
	UNLOCK
	r = y;

can (validly) get re-ordered like:

	LOCK
	r = y;
	x = 1;
	UNLOCK

So if you want things ordered, as I think you do, I think the smp_mb()
is still needed.

RELEASE + ACQUIRE otoh, that is a load-store barrier (but not
transitive).

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


Thread

[PATCH 8/7] net/netfilter/nf_conntrack_core: Remove another memory barrier Manfred Spraul <manfred@colorfullife.com> - 2016-09-01 17:30 +0200
  Re: [PATCH 8/7] net/netfilter/nf_conntrack_core: Remove another  memory barrier Will Deacon <will.deacon@arm.com> - 2016-09-01 17:40 +0200
    Re: [PATCH 8/7] net/netfilter/nf_conntrack_core: Remove another  memory barrier Peter Zijlstra <peterz@infradead.org> - 2016-09-01 18:50 +0200
      Re: [PATCH 8/7] net/netfilter/nf_conntrack_core: Remove another  memory barrier Boqun Feng <boqun.feng@gmail.com> - 2016-09-02 08:20 +0200
      Re: [PATCH 8/7] net/netfilter/nf_conntrack_core: Remove another  memory barrier Manfred Spraul <manfred@colorfullife.com> - 2016-09-02 08:50 +0200
        Re: [PATCH 8/7] net/netfilter/nf_conntrack_core: Remove another  memory barrier Peter Zijlstra <peterz@infradead.org> - 2016-09-02 21:30 +0200
          Re: [PATCH 8/7] net/netfilter/nf_conntrack_core: Remove another  memory barrier Manfred Spraul <manfred@colorfullife.com> - 2016-09-03 07:40 +0200
          Re: [PATCH 8/7] net/netfilter/nf_conntrack_core: Remove another  memory barrier Manfred Spraul <manfred@colorfullife.com> - 2016-09-05 21:00 +0200
            Re: [PATCH 8/7] net/netfilter/nf_conntrack_core: Remove another  memory barrier Will Deacon <will.deacon@arm.com> - 2016-09-06 20:00 +0200

csiph-web