mbox series

[v3,0/8] Add support for io_uring

Message ID 20190527080327.10780-1-mehta.aaru20@gmail.com (mailing list archive)
Headers show
Series Add support for io_uring | expand

Message

Aarushi Mehta May 27, 2019, 8:03 a.m. UTC
This patch series adds support for the newly developed io_uring Linux AIO 
interface. Linux io_uring is faster than Linux's AIO asynchronous I/O code, 
offers efficient buffered asynchronous I/O support, the ability to do I/O 
without performing a system call via polled I/O, and other efficiency 
enhancements. Testing it requires a host kernel (5.1+) and the liburing 
library. Use the option -drive aio=io_uring to enable it.

v2:
- Fix Patchew errors
- Option now enumerates only for CONFIG_LINUX in qapi
- Removed redudant and broken code in io_uring
- io_uring now aborts on sqe leak

v3:
- Fix major errors in io_uring (sorry)
- Option now enumerates for CONFIG_LINUX_IO_URING
- pkg config support added

Aarushi Mehta (8):
  configure: permit use of io_uring
  qapi/block-core: add option for io_uring
  block/block: add BDRV flag for io_uring
  block/io_uring: implements interfaces for io_uring
  stubs: add stubs for io_uring interface
  util/async: add aio interfaces for io_uring
  blockdev: accept io_uring as option
  block/fileposix: extend to use io_uring

 MAINTAINERS             |   8 ++
 block/Makefile.objs     |   3 +
 block/file-posix.c      |  65 ++++++++-
 block/io_uring.c        | 301 ++++++++++++++++++++++++++++++++++++++++
 blockdev.c              |   4 +-
 configure               |  27 ++++
 include/block/aio.h     |  16 ++-
 include/block/block.h   |   1 +
 include/block/raw-aio.h |  15 ++
 qapi/block-core.json    |   6 +-
 stubs/Makefile.objs     |   1 +
 stubs/io_uring.c        |  32 +++++
 util/async.c            |  36 +++++
 13 files changed, 506 insertions(+), 9 deletions(-)
 create mode 100644 block/io_uring.c
 create mode 100644 stubs/io_uring.c

Comments

no-reply@patchew.org May 27, 2019, 8:25 a.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20190527080327.10780-1-mehta.aaru20@gmail.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [PATCH v3 0/8] Add support for io_uring
Type: series
Message-id: 20190527080327.10780-1-mehta.aaru20@gmail.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
75fc7f1 block/fileposix: extend to use io_uring
d03ae39 blockdev: accept io_uring as option
cae30ee util/async: add aio interfaces for io_uring
f3be807 stubs: add stubs for io_uring interface
85c03de block/io_uring: implements interfaces for io_uring
5c4a14a block/block: add BDRV flag for io_uring
9a6594d qapi/block-core: add option for io_uring
460c72d configure: permit use of io_uring

=== OUTPUT BEGIN ===
1/8 Checking commit 460c72d1a8df (configure: permit use of io_uring)
2/8 Checking commit 9a6594daa76c (qapi/block-core: add option for io_uring)
3/8 Checking commit 5c4a14a301f5 (block/block: add BDRV flag for io_uring)
4/8 Checking commit 85c03de16186 (block/io_uring: implements interfaces for io_uring)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#49: 
new file mode 100644

ERROR: space required before the open parenthesis '('
#196: FILE: block/io_uring.c:143:
+    while(!s->io_q.in_queue) {

ERROR: trailing whitespace
#209: FILE: block/io_uring.c:156:
+        if (ret <= 0) { $

total: 2 errors, 1 warnings, 387 lines checked

Patch 4/8 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

5/8 Checking commit f3be80708ad1 (stubs: add stubs for io_uring interface)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#35: 
new file mode 100644

total: 0 errors, 1 warnings, 46 lines checked

Patch 5/8 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
6/8 Checking commit cae30ee1388f (util/async: add aio interfaces for io_uring)
7/8 Checking commit d03ae39c331c (blockdev: accept io_uring as option)
8/8 Checking commit 75fc7f1d8a3e (block/fileposix: extend to use io_uring)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20190527080327.10780-1-mehta.aaru20@gmail.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
no-reply@patchew.org May 27, 2019, 8:43 a.m. UTC | #2
Patchew URL: https://patchew.org/QEMU/20190527080327.10780-1-mehta.aaru20@gmail.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20190527080327.10780-1-mehta.aaru20@gmail.com
Type: series
Subject: [Qemu-devel] [PATCH v3 0/8] Add support for io_uring

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Switched to a new branch 'test'
625697e block/fileposix: extend to use io_uring
33cf8a8 blockdev: accept io_uring as option
1b7e8c0 util/async: add aio interfaces for io_uring
5656038 stubs: add stubs for io_uring interface
74252d4 block/io_uring: implements interfaces for io_uring
209ccc1 block/block: add BDRV flag for io_uring
c577217 qapi/block-core: add option for io_uring
f4d0501 configure: permit use of io_uring

=== OUTPUT BEGIN ===
1/8 Checking commit f4d0501f0165 (configure: permit use of io_uring)
2/8 Checking commit c5772171ddad (qapi/block-core: add option for io_uring)
3/8 Checking commit 209ccc1aca54 (block/block: add BDRV flag for io_uring)
4/8 Checking commit 74252d4f4849 (block/io_uring: implements interfaces for io_uring)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#49: 
new file mode 100644

ERROR: space required before the open parenthesis '('
#196: FILE: block/io_uring.c:143:
+    while(!s->io_q.in_queue) {

ERROR: trailing whitespace
#209: FILE: block/io_uring.c:156:
+        if (ret <= 0) { $

total: 2 errors, 1 warnings, 387 lines checked

Patch 4/8 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

5/8 Checking commit 565603840362 (stubs: add stubs for io_uring interface)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#35: 
new file mode 100644

total: 0 errors, 1 warnings, 46 lines checked

Patch 5/8 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
6/8 Checking commit 1b7e8c0b9826 (util/async: add aio interfaces for io_uring)
7/8 Checking commit 33cf8a8d4a0d (blockdev: accept io_uring as option)
8/8 Checking commit 625697ed2891 (block/fileposix: extend to use io_uring)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20190527080327.10780-1-mehta.aaru20@gmail.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Stefan Hajnoczi May 27, 2019, 9:01 a.m. UTC | #3
On Mon, May 27, 2019 at 01:25:56AM -0700, no-reply@patchew.org wrote:
> Patchew URL: https://patchew.org/QEMU/20190527080327.10780-1-mehta.aaru20@gmail.com/
> 
> 
> 
> Hi,
> 
> This series seems to have some coding style problems. See output below for
> more information:
> 
> Subject: [Qemu-devel] [PATCH v3 0/8] Add support for io_uring
> Type: series
> Message-id: 20190527080327.10780-1-mehta.aaru20@gmail.com
> 
> === TEST SCRIPT BEGIN ===
> #!/bin/bash
> git rev-parse base > /dev/null || exit 0
> git config --local diff.renamelimit 0
> git config --local diff.renames True
> git config --local diff.algorithm histogram
> ./scripts/checkpatch.pl --mailback base..
> === TEST SCRIPT END ===
> 
> Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
> Switched to a new branch 'test'
> 75fc7f1 block/fileposix: extend to use io_uring
> d03ae39 blockdev: accept io_uring as option
> cae30ee util/async: add aio interfaces for io_uring
> f3be807 stubs: add stubs for io_uring interface
> 85c03de block/io_uring: implements interfaces for io_uring
> 5c4a14a block/block: add BDRV flag for io_uring
> 9a6594d qapi/block-core: add option for io_uring
> 460c72d configure: permit use of io_uring
> 
> === OUTPUT BEGIN ===
> 1/8 Checking commit 460c72d1a8df (configure: permit use of io_uring)
> 2/8 Checking commit 9a6594daa76c (qapi/block-core: add option for io_uring)
> 3/8 Checking commit 5c4a14a301f5 (block/block: add BDRV flag for io_uring)
> 4/8 Checking commit 85c03de16186 (block/io_uring: implements interfaces for io_uring)
> WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
> #49: 
> new file mode 100644
> 
> ERROR: space required before the open parenthesis '('
> #196: FILE: block/io_uring.c:143:
> +    while(!s->io_q.in_queue) {
> 
> ERROR: trailing whitespace
> #209: FILE: block/io_uring.c:156:
> +        if (ret <= 0) { $
> 
> total: 2 errors, 1 warnings, 387 lines checked
> 
> Patch 4/8 has style problems, please review.  If any of these errors
> are false positives report them to the maintainer, see
> CHECKPATCH in MAINTAINERS.
> 
> 5/8 Checking commit f3be80708ad1 (stubs: add stubs for io_uring interface)
> WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
> #35: 
> new file mode 100644
> 
> total: 0 errors, 1 warnings, 46 lines checked
> 
> Patch 5/8 has style problems, please review.  If any of these errors
> are false positives report them to the maintainer, see
> CHECKPATCH in MAINTAINERS.
> 6/8 Checking commit cae30ee1388f (util/async: add aio interfaces for io_uring)
> 7/8 Checking commit d03ae39c331c (blockdev: accept io_uring as option)
> 8/8 Checking commit 75fc7f1d8a3e (block/fileposix: extend to use io_uring)
> === OUTPUT END ===

Hi Aarushi,
I use this git hook to identify checkpatch.pl issues at git-commit(1)
time:
http://blog.vmsplice.net/2011/03/how-to-automatically-run-checkpatchpl.html

This way I don't need to resend patch series because the issues were
already taken care of earlier in the development process.

Stefan