Page MenuHomeFreeBSD

buf_ring: Use atomic operations with br_prod_tail
ClosedPublic

Authored by andrew on Jul 26 2024, 8:56 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 14, 1:01 PM
Unknown Object (File)
Sun, Oct 13, 12:15 PM
Unknown Object (File)
Oct 1 2024, 1:40 PM
Unknown Object (File)
Sep 28 2024, 6:08 AM
Unknown Object (File)
Sep 28 2024, 6:08 AM
Unknown Object (File)
Sep 28 2024, 6:08 AM
Unknown Object (File)
Sep 28 2024, 5:54 AM
Unknown Object (File)
Sep 24 2024, 4:02 PM
Subscribers

Details

Summary

As with br_cons_tail use an atomic load acquire to read br_prod_tail
in buf_ring_dequeue_mc and buf_ring_peek*.

On dequeue we need to ensure we don't read the entry from the buf_ring
until it is available and prod_tail has updated. There is already an
appropriate store in the enqueue path and an appropriate load in the
single consumer dequeue, we just need one in the other functions that
read from the buf_ring.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jul 27 2024, 4:11 AM
sys/sys/buf_ring.h
148

I think the same question holds about this acq