mirror of https://gitlab.com/qemu-project/qemu
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AioContext has its own io_uring instance for file descriptor monitoring. The disk I/O io_uring code was developed separately. Originally I thought the characteristics of file descriptor monitoring and disk I/O were too different, requiring separate io_uring instances. Now it has become clear to me that it's feasible to share a single io_uring instance for file descriptor monitoring and disk I/O. We're not using io_uring's IOPOLL feature or anything else that would require a separate instance. Unify block/io_uring.c and util/fdmon-io_uring.c using the new aio_add_sqe() API that allows user-defined io_uring sqe submission. Now block/io_uring.c just needs to submit readv/writev/fsync and most of the io_uring-specific logic is handled by fdmon-io_uring.c. There are two immediate advantages: 1. Fewer system calls. There is no need to monitor the disk I/O io_uring ring fd from the file descriptor monitoring io_uring instance. Disk I/O completions are now picked up directly. Also, sqes are accumulated in the sq ring until the end of the event loop iteration and there are fewer io_uring_enter(2) syscalls. 2. Less code duplication. Note that error_setg() messages are not supposed to end with punctuation, so I removed a '.' for the non-io_uring build error message. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-ID: <20251104022933.618123-15-stefanha@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
4 days ago | |
|---|---|---|
| .. | ||
| aio-posix.c | 4 days ago | |
| aio-posix.h | 4 days ago | |
| aio-wait.c | 3 years ago | |
| aio-win32.c | 4 days ago | |
| aiocb.c | ||
| async.c | 4 days ago | |
| atomic64.c | 4 years ago | |
| base64.c | ||
| bitmap.c | 3 years ago | |
| bitops.c | 3 years ago | |
| block-helpers.c | 1 year ago | |
| block-helpers.h | 1 year ago | |
| buffer.c | ||
| bufferiszero.c | 1 year ago | |
| cacheflush.c | 1 month ago | |
| chardev_open.c | 2 years ago | |
| compatfd.c | 4 years ago | |
| coroutine-sigaltstack.c | 2 years ago | |
| coroutine-ucontext.c | 2 years ago | |
| coroutine-wasm.c | 6 months ago | |
| coroutine-windows.c | 3 years ago | |
| cpuinfo-aarch64.c | 1 year ago | |
| cpuinfo-i386.c | 2 months ago | |
| cpuinfo-loongarch.c | 1 year ago | |
| cpuinfo-ppc.c | 1 year ago | |
| cpuinfo-riscv.c | 10 months ago | |
| crc-ccitt.c | ||
| crc32c.c | 3 years ago | |
| cutils.c | 1 year ago | |
| dbus.c | ||
| defer-call.c | 2 years ago | |
| drm.c | ||
| envlist.c | 1 year ago | |
| error-report.c | 2 years ago | |
| error.c | 2 months ago | |
| event.c | 5 months ago | |
| event_notifier-posix.c | 2 months ago | |
| event_notifier-win32.c | 4 years ago | |
| fdmon-epoll.c | 4 days ago | |
| fdmon-io_uring.c | 4 days ago | |
| fdmon-poll.c | 4 days ago | |
| fifo8.c | 1 year ago | |
| filemonitor-inotify.c | 2 years ago | |
| filemonitor-stub.c | ||
| getauxval.c | 1 year ago | |
| guest-random.c | 2 years ago | |
| hbitmap.c | 1 year ago | |
| hexdump.c | 2 weeks ago | |
| host-utils.c | 3 years ago | |
| id.c | ||
| int128.c | 3 years ago | |
| interval-tree.c | 2 years ago | |
| iov.c | 8 months ago | |
| iova-tree.c | 9 months ago | |
| keyval.c | 9 months ago | |
| lockcnt.c | 5 months ago | |
| log.c | 2 months ago | |
| main-loop.c | 2 weeks ago | |
| memalign.c | 4 years ago | |
| memfd.c | 10 months ago | |
| meson.build | 5 months ago | |
| mmap-alloc.c | 3 years ago | |
| module.c | 9 months ago | |
| notify.c | 2 years ago | |
| nvdimm-utils.c | ||
| osdep.c | 1 year ago | |
| oslib-posix.c | 1 month ago | |
| oslib-win32.c | 1 month ago | |
| path.c | ||
| qdist.c | 2 years ago | |
| qemu-co-shared-resource.c | 1 year ago | |
| qemu-co-timeout.c | 3 years ago | |
| qemu-config.c | 9 months ago | |
| qemu-coroutine-io.c | 3 years ago | |
| qemu-coroutine-lock.c | 2 years ago | |
| qemu-coroutine-sleep.c | 3 years ago | |
| qemu-coroutine.c | 1 year ago | |
| qemu-option.c | 9 months ago | |
| qemu-print.c | ||
| qemu-progress.c | 4 years ago | |
| qemu-sockets.c | 6 months ago | |
| qemu-thread-common.h | 2 weeks ago | |
| qemu-thread-posix.c | 5 months ago | |
| qemu-thread-win32.c | 5 months ago | |
| qemu-timer-common.c | ||
| qemu-timer.c | 2 weeks ago | |
| qht.c | 7 months ago | |
| qsp.c | 2 years ago | |
| qtree.c | 3 years ago | |
| range.c | 2 years ago | |
| rcu.c | 3 weeks ago | |
| readline.c | 1 year ago | |
| reserved-region.c | 2 years ago | |
| s390x_pci_mmio.c | 6 months ago | |
| selfmap.c | 2 years ago | |
| stats64.c | 3 years ago | |
| sys_membarrier.c | ||
| systemd.c | 3 years ago | |
| thread-context.c | 7 months ago | |
| thread-pool.c | 8 months ago | |
| throttle.c | 2 years ago | |
| timed-average.c | 1 year ago | |
| trace-events | 4 days ago | |
| trace.h | ||
| transactions.c | 4 years ago | |
| unicode.c | ||
| userfaultfd.c | 1 year ago | |
| uuid.c | 2 years ago | |
| vfio-helpers.c | 7 months ago | |
| vhost-user-server.c | 2 months ago | |
| yank.c | 2 years ago | |