public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCHSET v2 next 0/5] Add support for non-IPI task_work
@ 2022-04-23 17:39 Jens Axboe
  2022-04-23 17:39 ` [PATCH 1/5] task_work: allow TWA_SIGNAL without a rescheduling IPI Jens Axboe
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Jens Axboe @ 2022-04-23 17:39 UTC (permalink / raw)
  To: io-uring

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.

v2:
- Switch sq_flags to atomic_t and use atomic bitop helpers rather than
  add helpers using try_cmpxchg() for setting/clearing of flags.
  Suggested by Pavel.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCHSET next 0/5] Add support for non-IPI task_work
@ 2022-04-22 21:42 Jens Axboe
  2022-04-22 21:42 ` [PATCH 5/5] io_uring: use TWA_SIGNAL_NO_IPI if IORING_SETUP_NO_RESCHED is used Jens Axboe
  0 siblings, 1 reply; 7+ messages in thread
From: Jens Axboe @ 2022-04-22 21:42 UTC (permalink / raw)
  To: io-uring

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.

-- 
Jens Axboe



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

end of thread, other threads:[~2022-04-23 17:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-23 17:39 [PATCHSET v2 next 0/5] Add support for non-IPI task_work Jens Axboe
2022-04-23 17:39 ` [PATCH 1/5] task_work: allow TWA_SIGNAL without a rescheduling IPI Jens Axboe
2022-04-23 17:39 ` [PATCH 2/5] io_uring: serialize ctx->rings->sq_flags with atomic_or/and Jens Axboe
2022-04-23 17:39 ` [PATCH 3/5] io-wq: use __set_notify_signal() to wake workers Jens Axboe
2022-04-23 17:39 ` [PATCH 4/5] io_uring: set task_work notify method at init time Jens Axboe
2022-04-23 17:39 ` [PATCH 5/5] io_uring: use TWA_SIGNAL_NO_IPI if IORING_SETUP_NO_RESCHED is used Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2022-04-22 21:42 [PATCHSET next 0/5] Add support for non-IPI task_work Jens Axboe
2022-04-22 21:42 ` [PATCH 5/5] io_uring: use TWA_SIGNAL_NO_IPI if IORING_SETUP_NO_RESCHED is used Jens Axboe

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