Linux block layer
 help / color / mirror / Atom feed
* [PATCH 0/2] ublk: complete requests via blk_mq_complete_request() so rq_affinity applies
@ 2026-10-06  8:55 Yoav Cohen
  2026-10-06  8:55 ` [PATCH 1/2] " Yoav Cohen
  2026-10-06  8:55 ` [PATCH 2/2] selftests: ublk: add test for rq_affinity completion redirection Yoav Cohen
  0 siblings, 2 replies; 4+ messages in thread
From: Yoav Cohen @ 2026-10-06  8:55 UTC (permalink / raw)
  To: Ming Lei, Jens Axboe, linux-block, csander; +Cc: jholzman, omril

ublk ends successfully completed requests inline on the server thread,
so rq_affinity never redirects completion work back to the submitting
CPU the way it does for NVMe, SCSI, virtio-blk, loop, nbd and rnbd.
Patch 1 fixes that and adds a feature flag so servers can detect
support. Patch 2 adds a selftest for it.

With an SPDK-style polling user-space block server at queue depth 96,
rq_affinity=2 gives 7-8% higher IOPS than today's always-inline
completion by offloading a saturated server CPU; rq_affinity=0 keeps
the old behavior for anyone who wants to opt out.

Yoav Cohen (2):
  ublk: complete requests via blk_mq_complete_request() so rq_affinity
    applies
  selftests: ublk: add test for rq_affinity completion redirection

 drivers/block/ublk_drv.c                        | 72 +++++++++++++++++--------
 include/uapi/linux/ublk_cmd.h                   |  8 +++
 tools/testing/selftests/ublk/Makefile           |  1 +
 tools/testing/selftests/ublk/kublk.c            |  1 +
 tools/testing/selftests/ublk/test_generic_18.sh | 42 +++++++++++++++
 5 files changed, 103 insertions(+), 21 deletions(-)
 create mode 100755 tools/testing/selftests/ublk/test_generic_18.sh

--
2.50.1 (Apple Git-155)

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

end of thread, other threads:[~2026-10-06 14:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06  8:55 [PATCH 0/2] ublk: complete requests via blk_mq_complete_request() so rq_affinity applies Yoav Cohen
2026-10-06  8:55 ` [PATCH 1/2] " Yoav Cohen
2026-10-06 14:56   ` Ming Lei
2026-10-06  8:55 ` [PATCH 2/2] selftests: ublk: add test for rq_affinity completion redirection Yoav Cohen

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