mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
qemu: Implement the aio mode io_uring
This aio mode was added since Linux 5.1[1], QEMU 5.0.0[2], which will deliever faster and more efficient I/O operations for the file, host_device, host_cdrom backends. Reference: [1]: https://lwn.net/Articles/810414/ [2]: https://lists.gnu.org/archive/html/qemu-devel/2020-01/msg07686.html Signed-off-by: Han Han <hhan@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
cbdd6c4df4
commit
4e30afafa7
@ -375,6 +375,7 @@ VIR_ENUM_IMPL(virDomainDiskIo,
|
||||
"default",
|
||||
"native",
|
||||
"threads",
|
||||
"io_uring",
|
||||
);
|
||||
|
||||
VIR_ENUM_IMPL(virDomainDeviceSGIO,
|
||||
|
@ -421,6 +421,7 @@ typedef enum {
|
||||
VIR_DOMAIN_DISK_IO_DEFAULT = 0,
|
||||
VIR_DOMAIN_DISK_IO_NATIVE,
|
||||
VIR_DOMAIN_DISK_IO_THREADS,
|
||||
VIR_DOMAIN_DISK_IO_URING,
|
||||
|
||||
VIR_DOMAIN_DISK_IO_LAST
|
||||
} virDomainDiskIo;
|
||||
|
@ -1435,6 +1435,14 @@ qemuCheckDiskConfig(virDomainDiskDefPtr disk,
|
||||
_("detect_zeroes is not supported by this QEMU binary"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (disk->iomode == VIR_DOMAIN_DISK_IO_URING) {
|
||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_AIO_IO_URING)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("io uring is not supported by this QEMU binary"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (disk->serial &&
|
||||
|
Loading…
Reference in New Issue
Block a user