Skip to content

Commit

Permalink
buf_ring: Remove an unneeded barrier
Browse files Browse the repository at this point in the history
This was left over from before using atomic(9) consistently. It is
unneeded as these loads are already ordered correctly.

Reviewed by:	alc, kib
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D48002
  • Loading branch information
zxombie committed Dec 11, 2024
1 parent 56758bb commit fcdce73
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion sys/sys/buf_ring.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ buf_ring_enqueue(struct buf_ring *br, void *buf)
cons_tail = atomic_load_acq_32(&br->br_cons_tail);

if ((int32_t)(cons_tail + br->br_prod_size - prod_next) < 1) {
rmb();
if (prod_head == atomic_load_32(&br->br_prod_head) &&
cons_tail == atomic_load_32(&br->br_cons_tail)) {
br->br_drops++;
Expand Down

0 comments on commit fcdce73

Please sign in to comment.