Skip to content

Replace io_uring workqueues with io-wq

Jens Axboe linux-block 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesIn review
  2. v12 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Fix dependent work hash
- Turn wqe->state into wqe->flags
- Fix issue with unusing mm/files if worker got busy at exit timo
- Fix issue with hashed work bit mangling (Colin)
- Fix issue with dependent work
- Rebase

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2io-wq: small threadpool implementation for io_uringfs/Kconfig fs/Makefile fs/io-wq.c +3 more+877 -42 replies
2/2io_uring: replace workqueue usage with io-wqfs/io_uring.c include/trace/events/io_uring.h init/Kconfig+104 -3230 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchPeter Zijlstra (Intel)
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCHSET v2 0/2] Replace io_uring workqueues with io-wq

Hopefully the sched core changes are palatable. io-wq uses the same sched in/out hooks as workqueue, and if the task isn't either a workqueue or io-wq worker, there should be no extra overhead there.

Patches are on top of my for-5.5/io_uring branch, and can also be found here:

http://git.kernel.dk/cgit/linux-block/log/?h=for-5.5/io_uring-wq

This passes io_uring IO testing and repeated runs of the liburing regressions suite, and passes tests that would previously deadlock.

Also see LWN article here:

https://lwn.net/Articles/803070/

Changes since v1:

- Fix dependent work hash
- Turn wqe->state into wqe->flags
- Fix issue with unusing mm/files if worker got busy at exit timo
- Fix issue with hashed work bit mangling (Colin)
- Fix issue with dependent work
- Rebase

 fs/Kconfig                      |   3 +
 fs/Makefile                     |   1 +
 fs/io-wq.c                      | 805 ++++++++++++++++++++++++++++++++
 fs/io-wq.h                      |  55 +++
 fs/io_uring.c                   | 414 ++++------------
 include/linux/sched.h           |   1 +
 include/trace/events/io_uring.h |  12 +-
 init/Kconfig                    |   1 +
 kernel/sched/core.c             |  16 +-
 9 files changed, 981 insertions(+), 327 deletions(-)
Signature · 1 line
Jens Axboe