提交 4e30afaf 编写于 作者: H Han Han 提交者: Peter Krempa

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.htmlSigned-off-by: NHan Han <hhan@redhat.com>
Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
上级 cbdd6c4d
......@@ -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 &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册