public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: [email protected]
Subject: [PATCHSET v4 next 0/5] Add support for non-IPI task_work
Date: Mon, 25 Apr 2022 19:48:58 -0600	[thread overview]
Message-ID: <[email protected]> (raw)

Hi,

Unless we're using SQPOLL, any task_work queue will result in an IPI
to the target task unless it's running in the kernel already. This isn't
always needed, particularly not for the common case of not sharing the
ring. In certain workloads, this can provide a 5-10% improvement. Some
of this is due the cost of the IPI, and some from needlessly
interrupting the target task when the work could just get run when
completions are being waited for.

Patches 1..4 are prep patches, patch 5 is the actual change, and patch 6
adds support for IORING_SQ_TASKRUN so that applications may use this
feature and still rely on io_uring_peek_cqe().

v4:
- Make SQPOLL incompatible with the IPI flags. It makes no sense for
  SQPOLL as no IPIs are ever used there anyway, so make that explicit
  and fail a request to setup a ring like that.



             reply	other threads:[~2022-04-26  1:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26  1:48 Jens Axboe [this message]
2022-04-26  1:48 ` [PATCH 1/6] task_work: allow TWA_SIGNAL without a rescheduling IPI Jens Axboe
2022-04-26 14:39   ` Jens Axboe
2022-04-26  1:49 ` [PATCH 2/6] io_uring: serialize ctx->rings->sq_flags with atomic_or/and Jens Axboe
2022-04-26 15:03   ` Almog Khaikin
2022-04-26 15:32     ` Jens Axboe
2022-04-26  1:49 ` [PATCH 3/6] io-wq: use __set_notify_signal() to wake workers Jens Axboe
2022-04-26  1:49 ` [PATCH 4/6] io_uring: set task_work notify method at init time Jens Axboe
2022-04-26  1:49 ` [PATCH 5/6] io_uring: use TWA_SIGNAL_NO_IPI if IORING_SETUP_COOP_TASKRUN is used Jens Axboe
2022-04-26  1:49 ` [PATCH 6/6] io_uring: add IORING_SETUP_TASKRUN_FLAG Jens Axboe
2022-04-26 14:02 ` [PATCHSET v4 next 0/5] Add support for non-IPI task_work 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] \
    /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