ublk: complete requests via blk_mq_complete_request() so rq_affinity applies
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ublk: complete requests via blk_mq_complete_request() so rq_affinity appliesdrivers/ include/ | +59 | 1 reply | |
| 2/2 | selftests: ublk: add test for rq_affinity completion redirectiontools/ tools/ tools/ | +44 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] ublk: complete requests via blk_mq_complete_request() so rq_affinity applies
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)