All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-next 0/7] CQ locking optimisation
@ 2022-12-05  2:44 Pavel Begunkov
  2022-12-05  2:44 ` [PATCH for-next 1/7] io_uring: skip overflow CQE posting for dying ring Pavel Begunkov
                   ` (8 more replies)
  0 siblings, 9 replies; 17+ messages in thread
From: Pavel Begunkov @ 2022-12-05  2:44 UTC (permalink / raw)
  To: io-uring; +Cc: Jens Axboe, asml.silence

Optimise CQ locking for event posting depending on a number of ring setup flags.
QD1 nop benchmark showed 12.067 -> 12.565 MIOPS increase, which more than 8.5%
of the io_uring kernel overhead (taking into account that the syscall overhead
is over 50%) or 4.12% of the total performance. Naturally, it's not only about
QD1, applications can submit a bunch of requests but their completions will may
arrive randomly hurting batching and so performance (or latency).

The downside is that we have to punt all io-wq completions to the
original task. The performance win should diminish with better
completion batching, but it should be worth it for as it also helps tw,
which in reality often don't complete too many requests.

The feature depends on DEFER_TASKRUN but can be relaxed to SINGLE_ISSUER

Pavel Begunkov (7):
  io_uring: skip overflow CQE posting for dying ring
  io_uring: don't check overflow flush failures
  io_uring: complete all requests in task context
  io_uring: force multishot CQEs into task context
  io_uring: post msg_ring CQE in task context
  io_uring: use tw for putting rsrc
  io_uring: skip spinlocking for ->task_complete

 include/linux/io_uring.h       |   2 +
 include/linux/io_uring_types.h |   3 +
 io_uring/io_uring.c            | 163 ++++++++++++++++++++++-----------
 io_uring/io_uring.h            |  14 ++-
 io_uring/msg_ring.c            |  14 ++-
 io_uring/net.c                 |  21 +++++
 io_uring/rsrc.c                |  19 +++-
 io_uring/rsrc.h                |   1 +
 8 files changed, 179 insertions(+), 58 deletions(-)

-- 
2.38.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-12-07 15:42 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-05  2:44 [PATCH for-next 0/7] CQ locking optimisation Pavel Begunkov
2022-12-05  2:44 ` [PATCH for-next 1/7] io_uring: skip overflow CQE posting for dying ring Pavel Begunkov
2022-12-05  2:44 ` [PATCH for-next 2/7] io_uring: don't check overflow flush failures Pavel Begunkov
2022-12-05  2:44 ` [PATCH for-next 3/7] io_uring: complete all requests in task context Pavel Begunkov
2022-12-05  2:44 ` [PATCH for-next 4/7] io_uring: force multishot CQEs into " Pavel Begunkov
2022-12-05  2:44 ` [PATCH for-next 5/7] io_uring: post msg_ring CQE in " Pavel Begunkov
2022-12-05 11:53   ` Jens Axboe
2022-12-05 15:12     ` Dylan Yudaken
2022-12-05 15:18       ` Jens Axboe
2022-12-06 10:42         ` Pavel Begunkov
2022-12-06 16:06           ` Jens Axboe
2022-12-07  3:59             ` Pavel Begunkov
2022-12-07 15:42               ` Jens Axboe
2022-12-05  2:44 ` [PATCH for-next 6/7] io_uring: use tw for putting rsrc Pavel Begunkov
2022-12-05  2:44 ` [PATCH for-next 7/7] io_uring: skip spinlocking for ->task_complete Pavel Begunkov
2022-12-06 16:53 ` [PATCH for-next 0/7] CQ locking optimisation Jens Axboe
2022-12-06 17:17 ` Jens Axboe

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.