Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Feb 2015 00:13:58 +0000
From:      "kmacy (Kip Macy)" <phabric-noreply@FreeBSD.org>
To:        freebsd-arm@freebsd.org
Subject:   [Differential] [Commented On] D1833: Add memory barriers to buf_ring
Message-ID:  <86f2bf07aa933a7a1898696286dd8a5c@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
kmacy added a comment.

Reading this again, cons_head is used only by dequeue and is thus protected by the lock or an atomic update. Hence the atomic_load_acq_32 isn't needed for it. On the other hand, there are other places where prod_tail needs to be read with a memory barrier.

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?86f2bf07aa933a7a1898696286dd8a5c>