[PATCH v3 0/4] io_uring/uring_cmd: avoid double indirect call in task work dispatch
Caleb Sander Mateos
csander at purestorage.com
Sun Oct 26 19:02:58 PDT 2025
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.
v3:
- Hide io_kiocb from uring_cmd implementations
- Label the 8 reserved bytes in struct io_uring_cmd (Ming)
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 (4):
io_uring: expose io_should_terminate_tw()
io_uring/uring_cmd: call io_should_terminate_tw() when needed
io_uring: add wrapper type for io_req_tw_func_t arg
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 | 29 +++++++++++++++++++----------
include/linux/io_uring_types.h | 7 +++++--
io_uring/futex.c | 16 +++++++++-------
io_uring/io_uring.c | 21 ++++++++++++---------
io_uring/io_uring.h | 17 ++---------------
io_uring/msg_ring.c | 3 ++-
io_uring/notif.c | 5 +++--
io_uring/poll.c | 11 ++++++-----
io_uring/poll.h | 2 +-
io_uring/rw.c | 5 +++--
io_uring/rw.h | 2 +-
io_uring/timeout.c | 18 +++++++++++-------
io_uring/uring_cmd.c | 17 ++---------------
io_uring/waitid.c | 7 ++++---
20 files changed, 116 insertions(+), 93 deletions(-)
--
2.45.2
More information about the Linux-nvme
mailing list