mbox series

[for-next,0/7] cqe posting cleanups

Message ID cover.1655637157.git.asml.silence@gmail.com (mailing list archive)
Headers show
Series cqe posting cleanups | expand

Message

Pavel Begunkov June 19, 2022, 11:26 a.m. UTC
Apart from this patches removing some implicit assumptions, which we
had problems with before, and making code cleaner, they and especially
6-7 are also needed to push for synchronisation optimisations later, lile
[1] or removing spinlocking with SINGLE_ISSUER.

The downside is that we add additional lock/unlock into eventfd path,
but I don't think we care about it.

The series also exposes a minor issue with cancellations, which for some
reason calls io_kill_timeouts() and io_poll_remove_all() too many times on
task exit. That makes poll-cancel to timeout on sigalarm, though usually
is fine if given 3-5 sec instead of 1. We'll investigate it later.

[1] https://github.com/isilence/linux/commit/6224f58bf7b542e6aed1eed44ee6bd5b5f706437

Pavel Begunkov (7):
  io_uring: remove extra io_commit_cqring()
  io_uring: reshuffle io_uring/io_uring.h
  io_uring: move io_eventfd_signal()
  io_uring: hide eventfd assumptions in evenfd paths
  io_uring: remove ->flush_cqes optimisation
  io_uring: introduce locking helpers for CQE posting
  io_uring: add io_commit_cqring_flush()

 include/linux/io_uring_types.h |   2 +
 io_uring/io_uring.c            | 144 ++++++++++++++++-----------------
 io_uring/io_uring.h            | 108 ++++++++++++++-----------
 io_uring/rw.c                  |   5 +-
 io_uring/timeout.c             |   7 +-
 5 files changed, 133 insertions(+), 133 deletions(-)

Comments

Pavel Begunkov June 19, 2022, 12:36 p.m. UTC | #1
On 6/19/22 12:26, Pavel Begunkov wrote:
> Apart from this patches removing some implicit assumptions, which we
> had problems with before, and making code cleaner, they and especially
> 6-7 are also needed to push for synchronisation optimisations later, lile
> [1] or removing spinlocking with SINGLE_ISSUER.
> 
> The downside is that we add additional lock/unlock into eventfd path,
> but I don't think we care about it.

just in case there conflicts, it's based on top of

"[PATCH for-next 0/4] simple cleanups" from yesterday


> 
> The series also exposes a minor issue with cancellations, which for some
> reason calls io_kill_timeouts() and io_poll_remove_all() too many times on
> task exit. That makes poll-cancel to timeout on sigalarm, though usually
> is fine if given 3-5 sec instead of 1. We'll investigate it later.
> 
> [1] https://github.com/isilence/linux/commit/6224f58bf7b542e6aed1eed44ee6bd5b5f706437
> 
> Pavel Begunkov (7):
>    io_uring: remove extra io_commit_cqring()
>    io_uring: reshuffle io_uring/io_uring.h
>    io_uring: move io_eventfd_signal()
>    io_uring: hide eventfd assumptions in evenfd paths
>    io_uring: remove ->flush_cqes optimisation
>    io_uring: introduce locking helpers for CQE posting
>    io_uring: add io_commit_cqring_flush()
> 
>   include/linux/io_uring_types.h |   2 +
>   io_uring/io_uring.c            | 144 ++++++++++++++++-----------------
>   io_uring/io_uring.h            | 108 ++++++++++++++-----------
>   io_uring/rw.c                  |   5 +-
>   io_uring/timeout.c             |   7 +-
>   5 files changed, 133 insertions(+), 133 deletions(-)
>
Jens Axboe June 19, 2022, 4:01 p.m. UTC | #2
On Sun, 19 Jun 2022 12:26:03 +0100, Pavel Begunkov wrote:
> Apart from this patches removing some implicit assumptions, which we
> had problems with before, and making code cleaner, they and especially
> 6-7 are also needed to push for synchronisation optimisations later, lile
> [1] or removing spinlocking with SINGLE_ISSUER.
> 
> The downside is that we add additional lock/unlock into eventfd path,
> but I don't think we care about it.
> 
> [...]

Applied, thanks!

[1/7] io_uring: remove extra io_commit_cqring()
      commit: 7b303f5b95b660088f9cdb28f4ee601ccb68865b
[2/7] io_uring: reshuffle io_uring/io_uring.h
      commit: a41959b3fc45a02cb198567c1999b1840082e25a
[3/7] io_uring: move io_eventfd_signal()
      commit: 7687834cfe602a7cd71c702e91865745194e9111
[4/7] io_uring: hide eventfd assumptions in evenfd paths
      commit: 86baeb81befdfe85ee024ba57a376af5fb956678
[5/7] io_uring: remove ->flush_cqes optimisation
      commit: 812c7f7f73fdb2d5cb870e3bcf042a1c0ad03273
[6/7] io_uring: introduce locking helpers for CQE posting
      commit: d74ebb4263668909c697688604096c468b04cacd
[7/7] io_uring: add io_commit_cqring_flush()
      commit: 07ab94ca3e3123fa39e498794ff59cb07fecafad

Best regards,