Bug 1769598

Summary: Libvirt support for aio=io_uring in QEMU
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Ademar Reis <areis>
Component: libvirtAssignee: Pavel Mores <pmores>
Status: CLOSED DEFERRED QA Contact: Meina Li <meili>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 8.0CC: coli, jdenemar, knoel, lmen, mtessun, qinwang, xuzhang
Target Milestone: rcKeywords: FutureFeature
Target Release: ---Flags: knoel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-6.4.0-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1946935 1946936 (view as bug list) Environment:
Last Closed: 2021-02-03 16:16:58 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1769597, 1947230    
Bug Blocks: 1946935    

Description Ademar Reis 2019-11-06 22:52:05 UTC
This bug was initially created as a copy of Bug #1769597

Clone for libvirt tracking/testing. I'm not sure if code changes are actually needed for a new aio mode.

----

io_uring is a Linux API for asynchronous I/O. It is designed for higher performance than the older Linux AIO API that QEMU supports.

In QEMU, io_uring is an alternative AIO engine. Instead of specifying -drive aio=threads or -drive aio=native, use -drive aio=io_uring.

The kernel feature (io_uring itself) is described in this lwn.net article: https://lwn.net/Articles/776703/

The QEMU implementation was started as an Outreachy project and is expected to be merged in QEMU-4.2. The upstream page tracking progress is https://wiki.qemu.org/Features/IOUring

Comment 2 Han Han 2020-05-07 02:06:10 UTC
Patch series has been merged: https://www.redhat.com/archives/libvir-list/2020-April/msg00978.html

Comment 3 Jiri Denemark 2020-05-07 08:58:53 UTC
Implemented upstream by

commit cbdd6c4df47756b3f11b014a150b4c1d3e05280b
Refs: v6.2.0-241-gcbdd6c4df4
Author:     Han Han <hhan>
AuthorDate: Tue Apr 21 20:19:34 2020 +0800
Commit:     Peter Krempa <pkrempa>
CommitDate: Fri Apr 24 09:17:05 2020 +0200

    qemu_capabilities: Introduce QEMU_CAPS_AIO_IO_URING

    Add io_uring value to capability replies.

    The capability QEMU_CAPS_AIO_IO_URING will be used for io_uring aio mode,
    introduced from QEMU 5.0, linux 5.1.

    Signed-off-by: Han Han <hhan>
    Reviewed-by: Peter Krempa <pkrempa>

commit 4e30afafa76c03547213cff7d52ae36cc90b802a
Refs: v6.2.0-242-g4e30afafa7
Author:     Han Han <hhan>
AuthorDate: Tue Apr 21 20:19:35 2020 +0800
Commit:     Peter Krempa <pkrempa>
CommitDate: Fri Apr 24 09:17:05 2020 +0200

    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>
    Reviewed-by: Peter Krempa <pkrempa>

commit 9bb39a2a88b88eac70e1d1ccf05e4c4a16189cfe
Refs: v6.2.0-243-g9bb39a2a88
Author:     Han Han <hhan>
AuthorDate: Tue Apr 21 20:19:36 2020 +0800
Commit:     Peter Krempa <pkrempa>
CommitDate: Fri Apr 24 09:17:06 2020 +0200

    docs: Docs and rng schemas for io_uring

    Signed-off-by: Han Han <hhan>
    Reviewed-by: Peter Krempa <pkrempa>

commit 94eaba0aef4cd111db947cba438e1cdcfbb0a168
Refs: v6.2.0-244-g94eaba0aef
Author:     Han Han <hhan>
AuthorDate: Tue Apr 21 20:19:37 2020 +0800
Commit:     Peter Krempa <pkrempa>
CommitDate: Fri Apr 24 09:17:06 2020 +0200

    tests: Tests for io mode io_uring

    Signed-off-by: Han Han <hhan>
    Reviewed-by: Peter Krempa <pkrempa>

commit ce0ce320aad02adc9e972081be05615a7944af6b
Refs: v6.2.0-245-gce0ce320aa
Author:     Han Han <hhan>
AuthorDate: Tue Apr 21 20:19:38 2020 +0800
Commit:     Peter Krempa <pkrempa>
CommitDate: Fri Apr 24 09:17:06 2020 +0200

    news: qemu: support async IO mode 'io_uring'

    Signed-off-by: Han Han <hhan>
    Reviewed-by: Peter Krempa <pkrempa>

Comment 9 Meina Li 2020-12-15 02:24:34 UTC
Actually this bug can't be verified now because the depended bug 1769597 is still in ASSIGNED status. So also remove the ITM to align with the qemu bug.

Comment 10 Ademar Reis 2020-12-15 15:47:32 UTC
(In reply to Meina Li from comment #9)
> Actually this bug can't be verified now because the depended bug 1769597 is
> still in ASSIGNED status. So also remove the ITM to align with the qemu bug.

Ditto for ITR.