Index: sys/buf_ring.h =================================================================== --- sys/buf_ring.h (revision 244738) +++ sys/buf_ring.h (working copy) @@ -47,25 +47,14 @@ struct buf_ring { int br_prod_size; int br_prod_mask; uint64_t br_drops; - uint64_t br_prod_bufs; - /* - * Pad out to next L2 cache line - */ - uint64_t _pad0[11]; - - volatile uint32_t br_cons_head; + volatile uint32_t br_cons_head __aligned(CACHE_LINE_SIZE); volatile uint32_t br_cons_tail; int br_cons_size; int br_cons_mask; - - /* - * Pad out to next L2 cache line - */ - uint64_t _pad1[14]; #ifdef DEBUG_BUFRING struct mtx *br_lock; #endif - void *br_ring[0]; + void *br_ring[0] __aligned(CACHE_LINE_SIZE); }; /* @@ -112,7 +101,6 @@ buf_ring_enqueue(struct buf_ring *br, void *buf) */ while (atomic_load_acq_32(&br->br_prod_tail) != prod_head) cpu_spinwait(); - br->br_prod_bufs++; atomic_store_rel_32(&br->br_prod_tail, prod_next); critical_exit(); return (0);