public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] io_uring/uring_cmd: avoid double indirect call in task work dispatch
@ 2025-10-23 20:18 Caleb Sander Mateos
  2025-10-23 20:18 ` [PATCH v2 1/3] io_uring: expose io_should_terminate_tw() Caleb Sander Mateos
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Caleb Sander Mateos @ 2025-10-23 20:18 UTC (permalink / raw)
  To: Jens Axboe, Miklos Szeredi, Ming Lei, Keith Busch,
	Christoph Hellwig, Sagi Grimberg, Chris Mason, David Sterba
  Cc: io-uring, linux-fsdevel, linux-block, linux-nvme, linux-btrfs,
	linux-kernel, Caleb Sander Mateos

Define uring_cmd implementation callback functions to have the
io_req_tw_func_t signature to avoid the additional indirect call and
save 8 bytes in struct io_uring_cmd. Additionally avoid the 
io_should_terminate_tw() computation in callbacks that don't need it.

v2:
- Define the uring_cmd callbacks with the io_req_tw_func_t signature
  to avoid the macro defining a hidden wrapper function (Christoph)

Caleb Sander Mateos (3):
  io_uring: expose io_should_terminate_tw()
  io_uring/uring_cmd: call io_should_terminate_tw() when needed
  io_uring/uring_cmd: avoid double indirect call in task work dispatch

 block/ioctl.c                  |  4 +++-
 drivers/block/ublk_drv.c       | 15 +++++++++------
 drivers/nvme/host/ioctl.c      |  5 +++--
 fs/btrfs/ioctl.c               |  4 +++-
 fs/fuse/dev_uring.c            |  7 ++++---
 include/linux/io_uring.h       | 14 ++++++++++++++
 include/linux/io_uring/cmd.h   | 23 +++++++++++++----------
 include/linux/io_uring_types.h |  1 -
 io_uring/io_uring.h            | 13 -------------
 io_uring/uring_cmd.c           | 17 ++---------------
 10 files changed, 51 insertions(+), 52 deletions(-)

-- 
2.45.2


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

end of thread, other threads:[~2025-10-24  4:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-23 20:18 [PATCH v2 0/3] io_uring/uring_cmd: avoid double indirect call in task work dispatch Caleb Sander Mateos
2025-10-23 20:18 ` [PATCH v2 1/3] io_uring: expose io_should_terminate_tw() Caleb Sander Mateos
2025-10-24  3:26   ` Ming Lei
2025-10-23 20:18 ` [PATCH v2 2/3] io_uring/uring_cmd: call io_should_terminate_tw() when needed Caleb Sander Mateos
2025-10-24  3:27   ` Ming Lei
2025-10-23 20:18 ` [PATCH v2 3/3] io_uring/uring_cmd: avoid double indirect call in task work dispatch Caleb Sander Mateos
2025-10-24  3:42   ` Ming Lei
2025-10-24  3:49     ` Caleb Sander Mateos
2025-10-24  4:21       ` Ming Lei

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