http://blog.vmsplice.net/2022/06/comparing-virtio-nvme-and-iouring-queue.html
深度好文,强烈推荐!

Ring buffer basics

A ring buffer is a circular array where new elements are produced on one side and consumed on the other side. Often terms such as head and tail are used to describe the array indices at which the next element is accessed. When the end of the array is reached, one moves back to the start of the array. The empty and full conditions are special states that must be checked to avoid underflow and overflow.

VIRTIO, NVMe, and io_uring all use single producer, single consumer shared memory ring buffers. This allows a CPU and an I/O device or two CPUs to communicate across a region of memory to which both sides have access.

https://mp.weixin.qq.com/s/pjuHWagzhONS3eOmF6xkXQ