io_uring_buf_ring_cq_advance(3)
β¨ io_uring_buf_ring_cq_advance β¨
okay bestie, welcome to liburing manual page io_uring_buf_ring_cq_advance π it's giving "advance index of provided buffer and CQ ring" and honestly? iconic behaviour.
πΈ SYNOPSIS πΈ
#include <liburing.h>
void io_uring_buf_ring_cq_advance(struct io_uring *ring,
struct io_uring_buf_ring *br,
int count);
void __io_uring_buf_ring_cq_advance(struct io_uring *ring,
struct io_uring_buf_ring *br,
int cq_count,
int buf_count);
π¦ DESCRIPTION π¦
so. io_uring_buf_ring_cq_advance(3) is the moment where you finally commit β it takes count buffers that you already added and commits them into the shared buffer ring br, which makes them visible to the kernel and therefore consumable. the way this works is that it literally passes ownership of the buffer over to the ring, no takebacks π«Ά
and while it's doing all that, it also advances the CQ ring of ring by count amount. so yeah, it's basically bundling a whole io_uring_buf_ring_advance(3) call and a io_uring_cq_advance(3) call into one single operation. two birds, one slay β¨
why does that matter? because updating either ring index entails a store memory barrier, so doing both of them at the same time is just more efficient. it's giving efficiency queen π
now, __io_uring_buf_ring_cq_advance(3) does the exact same thing, except it lets you split the counts into two separate values instead of one. so it advances the CQ ring by cq_count entries and the buffer ring by buf_count entries, rather than incrementing both by the same number. lowkey more flexible, highkey still the same vibe π
π RETURN VALUE π
None. that's it. it returns nothing. no cap π«
π SEE ALSO π
and that's the whole page bestie!! this lil slice of wisdom came to you from liburing-2.2, dated May 18, 2022 β go forth and advance those rings, you absolute main character π§π
π¦ where this page comes from
- alpine 3.22: liburing-doc 2.9-r0 Β· LGPL-2.1-or-later OR MIT
- alpine 3.23: liburing-doc 2.12-r0 Β· LGPL-2.1-or-later OR MIT
- alpine 3.24: liburing-doc 2.14-r0 Β· LGPL-2.1-or-later OR MIT
- arch rolling: liburing 2.15-1 Β· GPL-2.0-only WITH Linux-syscall-note OR MIT AND LGPL-2.0-or-later AND MIT
- centos-stream 10: liburing-devel 2.12-1.el10 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- centos-stream 9: liburing-devel 2.12-1.el9 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- centos-stream 9: liburing-devel 2.12-1.el9 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- debian trixie: liburing-dev 2.9-1
- fedora 43: liburing-devel 2.9-2.fc43 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 43: liburing-devel 2.9-2.fc43 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 44: liburing-devel 2.13-2.fc44 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 44: liburing-devel 2.13-2.fc44 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- nixpkgs unstable: liburing 2.14
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- ubuntu noble: liburing-dev 2.5-1build1
- ubuntu questing: liburing-dev 2.11-1
- ubuntu resolute: liburing-dev 2.14-1
- ubuntu stonking: liburing-dev 2.15-1
- π the page's license: LGPL-2.0-or-later
- Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms