[Differential] [Commented On] D1833: Add memory barriers to buf_ring

ian (Ian Lepore) phabric-noreply at FreeBSD.org
Sat Feb 21 17:16:42 UTC 2015


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


More information about the freebsd-arm mailing list