All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: linux-fsdevel@vger.kernel.org, linux-aio@kvack.org,
	linux-block@vger.kernel.org, linux-arch@vger.kernel.org
Cc: hch@lst.de, jmoyer@redhat.com, avi@scylladb.com
Subject: [PATCHSET v2] io_uring IO interface
Date: Wed,  9 Jan 2019 19:43:49 -0700	[thread overview]
Message-ID: <20190110024404.25372-1-axboe@kernel.dk> (raw)

Here's v2 of the io_uring interface. See the v1 posting for some more info:

https://lore.kernel.org/linux-block/20190108165645.19311-1-axboe@kernel.dk/

The data structures changed, to improve the symmetry of the submission
and completion side. The io_uring_iocb is now io_uring_sqe, but it
otherwise remains the same as before. Ditto on the completion side,
where io_uring_event is now io_uring_cqe.

I've updated the fio io_uring test app, and the io_uring engine. The
liburing git repo has also been adapted to the various changes since the
v1 posting. As a reminder, the liburing git repo contains some helpers
for doing IO without having to muck with the ring directly, setting up
an io_uring context, etc. Clone that here:

git://git.kernel.dk/liburing

In terms of usage, there's also a small test app here:

http://git.kernel.dk/cgit/fio/plain/t/io_uring.c

and the liburing repo has a few test apps in test/ as well.

Patches are aginst 5.0-rc1, but can also be found here:

git://git.kernel.dk/linux-block io_uring

Changes since v1:

- Fail IORING_OP_{READ,WRITE}_FIXED if not configured
- Fix ctx drop ref issue on failure to close ring_fd when sq thread/wq
  are in use
- Move to separate Kconfig entry (CONFIG_IO_URING)
- Add SPDX headers
- Drop gcc ism of zero sized arrays
- Rename io_uring_iocb -> io_uring_sqe
- Rename io_uring_event -> io_uring_cqe
- Drop needless io_event_ring and io_iocb_ring structures
- Drop ctx->max_reqs, use ->sq_entries
- Drop unused ->ring_lock
- Drop io_ring_ctx slab cache
- Fix state batched kiocb alloc failure to put ctx
- Fix missing write ordering barrier when filling in the cqe
- Drop io_req_init()
- Various renames
- Fix a few lines that were too long
- Address other minor review comments
- Fix IORING_SETUP_SQPOLL being set without IORING_SETUP_SQTHREAD
- Drop IORING_SETUP_FIXEDBUFS, iovecs being non-NULL is enough
- Fix error handling free of ctx in setup path
- Change standard read/write commands to be iov based READV/WRITEV
- Pass in struct sqe_submit instead of separate sqe/index everywhere
- Fix reap of polled events on fops->release()
- Lock uring for sq thread polling
- Don't grab ->completion_lock for polled IO cqe filling
- Fix ev_flags vs flags typo
- Consolidate parts of the io_ring_ctx alignment

 Documentation/filesystems/vfs.txt      |    3 +
 arch/x86/entry/syscalls/syscall_64.tbl |    2 +
 block/bio.c                            |   59 +-
 fs/Makefile                            |    1 +
 fs/block_dev.c                         |   19 +-
 fs/file.c                              |   15 +-
 fs/file_table.c                        |    9 +-
 fs/gfs2/file.c                         |    2 +
 fs/io_uring.c                          | 1890 ++++++++++++++++++++++++
 fs/iomap.c                             |   48 +-
 fs/xfs/xfs_file.c                      |    1 +
 include/linux/bio.h                    |   14 +
 include/linux/blk_types.h              |    1 +
 include/linux/file.h                   |    2 +
 include/linux/fs.h                     |    6 +-
 include/linux/iomap.h                  |    1 +
 include/linux/syscalls.h               |    5 +
 include/uapi/linux/io_uring.h          |  114 ++
 init/Kconfig                           |    8 +
 kernel/sys_ni.c                        |    2 +
 20 files changed, 2163 insertions(+), 39 deletions(-)

-- 
Jens Axboe



WARNING: multiple messages have this Message-ID (diff)
From: Jens Axboe <axboe@kernel.dk>
To: linux-fsdevel@vger.kernel.org, linux-aio@kvack.org,
	linux-block@vger.kernel.org, linux-arch@vger.kernel.org
Cc: hch@lst.de, jmoyer@redhat.com, avi@scylladb.com
Subject: [PATCHSET v2] io_uring IO interface
Date: Wed,  9 Jan 2019 19:43:49 -0700	[thread overview]
Message-ID: <20190110024404.25372-1-axboe@kernel.dk> (raw)

Here's v2 of the io_uring interface. See the v1 posting for some more info:

https://lore.kernel.org/linux-block/20190108165645.19311-1-axboe@kernel.dk/

The data structures changed, to improve the symmetry of the submission
and completion side. The io_uring_iocb is now io_uring_sqe, but it
otherwise remains the same as before. Ditto on the completion side,
where io_uring_event is now io_uring_cqe.

I've updated the fio io_uring test app, and the io_uring engine. The
liburing git repo has also been adapted to the various changes since the
v1 posting. As a reminder, the liburing git repo contains some helpers
for doing IO without having to muck with the ring directly, setting up
an io_uring context, etc. Clone that here:

git://git.kernel.dk/liburing

In terms of usage, there's also a small test app here:

http://git.kernel.dk/cgit/fio/plain/t/io_uring.c

and the liburing repo has a few test apps in test/ as well.

Patches are aginst 5.0-rc1, but can also be found here:

git://git.kernel.dk/linux-block io_uring

Changes since v1:

- Fail IORING_OP_{READ,WRITE}_FIXED if not configured
- Fix ctx drop ref issue on failure to close ring_fd when sq thread/wq
  are in use
- Move to separate Kconfig entry (CONFIG_IO_URING)
- Add SPDX headers
- Drop gcc ism of zero sized arrays
- Rename io_uring_iocb -> io_uring_sqe
- Rename io_uring_event -> io_uring_cqe
- Drop needless io_event_ring and io_iocb_ring structures
- Drop ctx->max_reqs, use ->sq_entries
- Drop unused ->ring_lock
- Drop io_ring_ctx slab cache
- Fix state batched kiocb alloc failure to put ctx
- Fix missing write ordering barrier when filling in the cqe
- Drop io_req_init()
- Various renames
- Fix a few lines that were too long
- Address other minor review comments
- Fix IORING_SETUP_SQPOLL being set without IORING_SETUP_SQTHREAD
- Drop IORING_SETUP_FIXEDBUFS, iovecs being non-NULL is enough
- Fix error handling free of ctx in setup path
- Change standard read/write commands to be iov based READV/WRITEV
- Pass in struct sqe_submit instead of separate sqe/index everywhere
- Fix reap of polled events on fops->release()
- Lock uring for sq thread polling
- Don't grab ->completion_lock for polled IO cqe filling
- Fix ev_flags vs flags typo
- Consolidate parts of the io_ring_ctx alignment

 Documentation/filesystems/vfs.txt      |    3 +
 arch/x86/entry/syscalls/syscall_64.tbl |    2 +
 block/bio.c                            |   59 +-
 fs/Makefile                            |    1 +
 fs/block_dev.c                         |   19 +-
 fs/file.c                              |   15 +-
 fs/file_table.c                        |    9 +-
 fs/gfs2/file.c                         |    2 +
 fs/io_uring.c                          | 1890 ++++++++++++++++++++++++
 fs/iomap.c                             |   48 +-
 fs/xfs/xfs_file.c                      |    1 +
 include/linux/bio.h                    |   14 +
 include/linux/blk_types.h              |    1 +
 include/linux/file.h                   |    2 +
 include/linux/fs.h                     |    6 +-
 include/linux/iomap.h                  |    1 +
 include/linux/syscalls.h               |    5 +
 include/uapi/linux/io_uring.h          |  114 ++
 init/Kconfig                           |    8 +
 kernel/sys_ni.c                        |    2 +
 20 files changed, 2163 insertions(+), 39 deletions(-)

-- 
Jens Axboe


--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>

             reply	other threads:[~2019-01-10  2:44 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10  2:43 Jens Axboe [this message]
2019-01-10  2:43 ` [PATCHSET v2] io_uring IO interface Jens Axboe
2019-01-10  2:43 ` [PATCH 01/15] fs: add an iopoll method to struct file_operations Jens Axboe
2019-01-10  2:43   ` Jens Axboe
2019-01-10  2:43 ` [PATCH 02/15] block: wire up block device iopoll method Jens Axboe
2019-01-10  2:43   ` Jens Axboe
2019-01-10  2:43 ` [PATCH 03/15] block: add bio_set_polled() helper Jens Axboe
2019-01-10  2:43   ` Jens Axboe
2019-01-10  2:43 ` [PATCH 04/15] iomap: wire up the iopoll method Jens Axboe
2019-01-10  2:43   ` Jens Axboe
2019-01-10  2:43 ` [PATCH 05/15] Add io_uring IO interface Jens Axboe
2019-01-10  2:43   ` Jens Axboe
2019-01-11 18:19   ` Martin K. Petersen
2019-01-11 18:19     ` Martin K. Petersen
2019-01-11 18:34     ` Jens Axboe
2019-01-11 18:34       ` Jens Axboe
2019-01-13 16:22       ` Jens Axboe
2019-01-13 16:22         ` Jens Axboe
2019-01-15 17:31         ` Martin K. Petersen
2019-01-15 17:31           ` Martin K. Petersen
2019-01-10  2:43 ` [PATCH 06/15] io_uring: support for IO polling Jens Axboe
2019-01-10  2:43   ` Jens Axboe
2019-01-10  2:43 ` [PATCH 07/15] io_uring: add submission side request cache Jens Axboe
2019-01-10  2:43   ` Jens Axboe
2019-01-10  2:43 ` [PATCH 08/15] fs: add fget_many() and fput_many() Jens Axboe
2019-01-10  2:43   ` Jens Axboe
2019-01-10  2:43 ` [PATCH 09/15] io_uring: use fget/fput_many() for file references Jens Axboe
2019-01-10  2:43   ` Jens Axboe
2019-01-10  2:43 ` [PATCH 10/15] io_uring: batch io_kiocb allocation Jens Axboe
2019-01-10  2:43   ` Jens Axboe
2019-01-10  2:44 ` [PATCH 11/15] block: implement bio helper to add iter bvec pages to bio Jens Axboe
2019-01-10  2:44   ` Jens Axboe
2019-01-10  2:44 ` [PATCH 12/15] io_uring: add support for pre-mapped user IO buffers Jens Axboe
2019-01-10  2:44   ` Jens Axboe
2019-01-10  2:44 ` [PATCH 13/15] io_uring: support kernel side submission Jens Axboe
2019-01-10  2:44   ` Jens Axboe
2019-01-10  2:44 ` [PATCH 14/15] io_uring: add submission polling Jens Axboe
2019-01-10  2:44   ` Jens Axboe
2019-01-10  2:44 ` [PATCH 15/15] io_uring: add io_uring_event cache hit information Jens Axboe
2019-01-10  2:44   ` Jens Axboe
2019-01-10 23:12   ` Jeff Moyer
2019-01-10 23:12     ` Jeff Moyer
2019-01-10 23:12     ` Jeff Moyer
2019-01-10 23:47     ` Jens Axboe
2019-01-10 23:47       ` Jens Axboe
2019-01-11  9:46 ` [PATCHSET v2] io_uring IO interface Roman Penyaev
2019-01-11  9:46   ` Roman Penyaev
2019-01-11 16:11   ` Ilya Dryomov
2019-01-11 16:11     ` Ilya Dryomov
2019-01-11 16:21     ` Christoph Hellwig
2019-01-11 16:21       ` Christoph Hellwig
2019-01-11 16:39     ` Roman Penyaev
2019-01-11 16:39       ` Roman Penyaev
2019-01-11 18:05   ` Jens Axboe
2019-01-11 18:05     ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190110024404.25372-1-axboe@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=avi@scylladb.com \
    --cc=hch@lst.de \
    --cc=jmoyer@redhat.com \
    --cc=linux-aio@kvack.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.