Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Feb 2015 17:16:41 +0000
From:      "ian (Ian Lepore)" <phabric-noreply@FreeBSD.org>
To:        freebsd-arm@freebsd.org
Subject:   [Differential] [Commented On] D1833: Add memory barriers to buf_ring
Message-ID:  <7e6ad0fc0cfe2e877f3a5d611b370eda@localhost.localdomain>
In-Reply-To: <differential-rev-PHID-DREV-ntnotl4wj5wcj2eoukly-req@FreeBSD.org>
References:  <differential-rev-PHID-DREV-ntnotl4wj5wcj2eoukly-req@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
ian added a comment.

>>! In D1833#26, @meloun-miracle-cz wrote:
> ...
> On ARM, all stores to variable referenced by atomic_cmpset() must be done by atomic_store (or by other
> atomic_* functions), normal store doesn’t clear exclusive monitor. 
> Thus, for ARM we **!!MUST!!** use atomic_store() for each store to variable referenced by atomic_cmpset() !
> 
> Ohh, and note – current atomic_store() implementation on ARM is broken too, but fix is easy (see atomic store_*_64().  

I'm commenting on just this aspect of Michal's comment, not the overall change.  I'm not sure I agree that a normal store fails to clear the exclusive monitor, but even more importantly in this context... the discussion of that and any possible fixes for it shouldn't hold up this change right now.

I'm specifically not commenting on (or formally reviewing) the overall behavior of the ring buffer code.  I'm not qualified to do that without a lot more studying of the code and just don't have time right now.

REVISION DETAIL
  https://reviews.freebsd.org/D1833

To: zbb, kmacy, rpaulo, imp
Cc: meloun-miracle-cz, onwahe-gmail-com, andrew, ian, adrian, freebsd-arm



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7e6ad0fc0cfe2e877f3a5d611b370eda>