On Wed, May 28, 2025 at 03:09:14PM -0400, Stefan Hajnoczi wrote: > Introduce the aio_add_sqe() API for submitting io_uring requests in the > current AioContext. This allows other components in QEMU, like the block > layer, to take advantage of io_uring features without creating their own > io_uring context.
Interesting that 8/11 refers to the function that we are just adding now; but since the mention is only in the comments, I'm okay with introducing the comment early and avoiding churn. > > This API supports nested event loops just like file descriptor > monitoring and BHs do. This comes at a complexity cost: a BH is required > to dispatch CQE callbacks and they are placed on a list so that a nested > event loop can invoke its parent's pending CQE callbacks. If you're > wondering why CqeHandler exists instead of just a callback function > pointer, this is why. > > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> > --- > include/block/aio.h | 82 ++++++++++++++++++++++++ > util/aio-posix.h | 1 + > util/aio-posix.c | 9 +++ > util/fdmon-io_uring.c | 145 +++++++++++++++++++++++++++++++----------- > 4 files changed, 200 insertions(+), 37 deletions(-) I'll have to resume my review tomorrow. (I'm having fun learning about io_uring while reviewing this) -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org