public inbox for [email protected]
 help / color / mirror / Atom feed
* [RFC v2 00/13] CQ waiting and wake up optimisations
@ 2023-01-03  3:03 Pavel Begunkov
  2023-01-03  3:03 ` [RFC v2 01/13] io_uring: rearrange defer list checks Pavel Begunkov
                   ` (14 more replies)
  0 siblings, 15 replies; 22+ messages in thread
From: Pavel Begunkov @ 2023-01-03  3:03 UTC (permalink / raw)
  To: io-uring; +Cc: Jens Axboe, asml.silence

The series replaces waitqueues for CQ waiting with a custom waiting
loop and adds a couple more perf tweak around it. Benchmarking is done
for QD1 with simulated tw arrival right after we start waiting, it
gets us from 7.5 MIOPS to 9.2, which is +22%, or double the number for
the in-kernel io_uring overhead (i.e. without syscall and userspace).
That matches profiles, wake_up() _without_ wake_up_state() was taking
12-14% and prepare_to_wait_exclusive() was around 4-6%.

Another 15% reported in the v1 are not there as it got optimised in the
meanwhile by 52ea806ad9834 ("io_uring: finish waiting before flushing
overflow entries"). So, comparing to a couple of weeks ago the perf
of this test case should've jumped more than 30% end-to-end. (Again,
spend only half of cycles in io_uring kernel code).

1-8 are preparation patches, they might be taken right away. The rest
needs more comments and maybe a little brushing.

Pavel Begunkov (13):
  io_uring: rearrange defer list checks
  io_uring: don't iterate cq wait fast path
  io_uring: kill io_run_task_work_ctx
  io_uring: move defer tw task checks
  io_uring: parse check_cq out of wq waiting
  io_uring: mimimise io_cqring_wait_schedule
  io_uring: simplify io_has_work
  io_uring: set TASK_RUNNING right after schedule
  io_uring: separate wq for ring polling
  io_uring: add lazy poll_wq activation
  io_uring: wake up optimisations
  io_uring: waitqueue-less cq waiting
  io_uring: add io_req_local_work_add wake fast path

 include/linux/io_uring_types.h |   4 +
 io_uring/io_uring.c            | 194 +++++++++++++++++++++++----------
 io_uring/io_uring.h            |  35 +++---
 3 files changed, 155 insertions(+), 78 deletions(-)

-- 
2.38.1


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

end of thread, other threads:[~2023-01-04 20:53 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-03  3:03 [RFC v2 00/13] CQ waiting and wake up optimisations Pavel Begunkov
2023-01-03  3:03 ` [RFC v2 01/13] io_uring: rearrange defer list checks Pavel Begunkov
2023-01-03  3:03 ` [RFC v2 02/13] io_uring: don't iterate cq wait fast path Pavel Begunkov
2023-01-03  3:03 ` [RFC v2 03/13] io_uring: kill io_run_task_work_ctx Pavel Begunkov
2023-01-03  3:03 ` [RFC v2 04/13] io_uring: move defer tw task checks Pavel Begunkov
2023-01-03  3:03 ` [RFC v2 05/13] io_uring: parse check_cq out of wq waiting Pavel Begunkov
2023-01-03  3:03 ` [RFC v2 06/13] io_uring: mimimise io_cqring_wait_schedule Pavel Begunkov
2023-01-03  3:03 ` [RFC v2 07/13] io_uring: simplify io_has_work Pavel Begunkov
2023-01-03  3:03 ` [RFC v2 08/13] io_uring: set TASK_RUNNING right after schedule Pavel Begunkov
2023-01-03  3:04 ` [RFC v2 09/13] io_uring: separate wq for ring polling Pavel Begunkov
2023-01-04 18:08   ` Jens Axboe
2023-01-04 20:28     ` Pavel Begunkov
2023-01-04 20:34       ` Jens Axboe
2023-01-04 20:45         ` Pavel Begunkov
2023-01-04 20:53           ` Jens Axboe
2023-01-04 20:52         ` Jens Axboe
2023-01-03  3:04 ` [RFC v2 10/13] io_uring: add lazy poll_wq activation Pavel Begunkov
2023-01-03  3:04 ` [RFC v2 11/13] io_uring: wake up optimisations Pavel Begunkov
2023-01-03  3:04 ` [RFC v2 12/13] io_uring: waitqueue-less cq waiting Pavel Begunkov
2023-01-03  3:04 ` [RFC v2 13/13] io_uring: add io_req_local_work_add wake fast path Pavel Begunkov
2023-01-04 18:05 ` (subset) [RFC v2 00/13] CQ waiting and wake up optimisations Jens Axboe
2023-01-04 20:25 ` Pavel Begunkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox