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> |
3 days ago | |
|---|---|---|
| .. | ||
| bdrv-next-monitor-owned.c | ||
| blk-commit-all.c | 11 months ago | |
| blk-exp-close-all.c | 1 year ago | |
| blockdev-close-all-bdrv-states.c | ||
| change-state-handler.c | 11 months ago | |
| cmos.c | ||
| cpu-destroy-address-spaces.c | 1 month ago | |
| cpu-get-clock.c | 11 months ago | |
| cpu-synchronize-state.c | 11 months ago | |
| cpus-virtual-clock.c | 11 months ago | |
| dump.c | 11 months ago | |
| error-printf.c | ||
| fdset.c | 1 year ago | |
| fw_cfg.c | ||
| gdbstub.c | 2 years ago | |
| get-vm-name.c | 11 months ago | |
| graph-lock.c | ||
| hotplug-stubs.c | 2 years ago | |
| icount.c | 7 months ago | |
| igvm.c | 2 weeks ago | |
| iothread-lock-block.c | ||
| iothread-lock.c | 2 weeks ago | |
| is-daemonized.c | ||
| linux-aio.c | ||
| meson.build | 3 days ago | |
| migr-blocker.c | 2 weeks ago | |
| monitor-arm-gic.c | 6 months ago | |
| monitor-core.c | 2 years ago | |
| monitor-cpu-s390x-kvm.c | 6 months ago | |
| monitor-cpu-s390x.c | 6 months ago | |
| monitor-cpu.c | 6 months ago | |
| monitor-i386-rtc.c | 6 months ago | |
| monitor-i386-sev.c | 6 months ago | |
| monitor-i386-sgx.c | 6 months ago | |
| monitor-i386-xen.c | 6 months ago | |
| monitor-internal.c | 2 years ago | |
| physmem.c | ||
| qdev.c | 2 years ago | |
| qemu-timer-notify-cb.c | 11 months ago | |
| qmp-command-available.c | 9 months ago | |
| qmp-quit.c | 9 months ago | |
| qtest.c | 11 months ago | |
| ram-block.c | 7 months ago | |
| replay-mode.c | 11 months ago | |
| replay-tools.c | 11 months ago | |
| replay.c | 2 years ago | |
| runstate-check.c | 11 months ago | |
| sysbus.c | ||
| target-get-monitor-def.c | ||
| target-monitor-defs.c | 2 years ago | |
| trace-control.c | 2 years ago | |
| uuid.c | ||
| vm-stop.c | 11 months ago | |
| vmstate.c | 10 months ago | |
| win32-kbd-hook.c | ||
| xen-hw-stub.c | 2 years ago | |