public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>
Subject: Re: [RFC 00/11] io_uring specific task_work infra
Date: Thu, 21 Apr 2022 15:50:18 +0100	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 4/21/22 14:44, Pavel Begunkov wrote:
> For experiments only. If proves to be useful would need to make it
> nicer on the non-io_uring side.
> 
> 0-10 save 1 spinlock/unlock_irq pair and 2 cmpxchg per batch. 11/11 in
> general trades 1 per tw add spin_lock/unlock_irq and 2 per batch spinlocking
> with 2 cmpxchg to 1 per tw add cmpxchg and 1 per batch cmpxchg.

null_blk irqmode=1 completion_nsec=0 submit_queues=32 poll_queues=32
echo -n 0 > /sys/block/nullb0/queue/iostats
echo -n 2 > /sys/block/nullb0/queue/nomerges
io_uring -d<QD> -s<QD> -c<QD> -p0 -B1 -F1 -b512 /dev/nullb0


      | base | 1-10         | 1-11
___________________________________________
QD1  | 1.88 | 2.15 (+14%)  | 2.19 (+16.4%)
QD4  | 2.8  | 3.06 (+9.2%) | 3.11 (+11%)
QD32 | 3.61 | 3.81 (+5.5%) | 3.96 (+9.6%)

The numbers are in MIOPS, (%) is relative diff with the baseline.
It gives more than I expected, but the testing is not super
consistent, so a part of it might be due to variance.


> Pavel Begunkov (11):
>    io_uring: optimise io_req_task_work_add
>    io_uringg: add io_should_fail_tw() helper
>    io_uring: ban tw queue for exiting processes
>    io_uring: don't take ctx refs in tctx_task_work()
>    io_uring: add dummy io_uring_task_work_run()
>    task_work: add helper for signalling a task
>    io_uring: run io_uring task_works on TIF_NOTIFY_SIGNAL
>    io_uring: wire io_uring specific task work
>    io_uring: refactor io_run_task_work()
>    io_uring: remove priority tw list
>    io_uring: lock-free task_work stack
> 
>   fs/io-wq.c                |   1 +
>   fs/io_uring.c             | 213 +++++++++++++++-----------------------
>   include/linux/io_uring.h  |   4 +
>   include/linux/task_work.h |   4 +
>   kernel/entry/kvm.c        |   1 +
>   kernel/signal.c           |   2 +
>   kernel/task_work.c        |  33 +++---
>   7 files changed, 115 insertions(+), 143 deletions(-)
> 

-- 
Pavel Begunkov

  parent reply	other threads:[~2022-04-21 14:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 13:44 [RFC 00/11] io_uring specific task_work infra Pavel Begunkov
2022-04-21 13:44 ` [RFC 01/11] io_uring: optimise io_req_task_work_add Pavel Begunkov
2022-04-21 13:44 ` [RFC 02/11] io_uringg: add io_should_fail_tw() helper Pavel Begunkov
2022-04-21 13:44 ` [RFC 03/11] io_uring: ban tw queue for exiting processes Pavel Begunkov
2022-04-21 13:44 ` [RFC 04/11] io_uring: don't take ctx refs in tctx_task_work() Pavel Begunkov
2022-04-21 13:44 ` [RFC 05/11] io_uring: add dummy io_uring_task_work_run() Pavel Begunkov
2022-04-21 13:44 ` [RFC 06/11] task_work: add helper for signalling a task Pavel Begunkov
2022-04-21 13:44 ` [RFC 07/11] io_uring: run io_uring task_works on TIF_NOTIFY_SIGNAL Pavel Begunkov
2022-04-21 13:44 ` [RFC 08/11] io_uring: wire io_uring specific task work Pavel Begunkov
2022-04-21 13:44 ` [RFC 09/11] io_uring: refactor io_run_task_work() Pavel Begunkov
2022-04-21 13:44 ` [RFC 10/11] io_uring: remove priority tw list Pavel Begunkov
2022-04-21 13:44 ` [RFC 11/11] io_uring: lock-free task_work stack Pavel Begunkov
2022-04-21 14:50 ` Pavel Begunkov [this message]
2022-04-22  8:45   ` [RFC 00/11] io_uring specific task_work infra Hao Xu
2022-04-22 11:54     ` Pavel Begunkov

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox