Skip to content

bdev/rbd: integrate SpdkContextWQ for reactor thread execution#17

Open
baum wants to merge 2 commits into
ceph:ceph-nvmeof-v26.01from
baum:librbd_asio_spdk
Open

bdev/rbd: integrate SpdkContextWQ for reactor thread execution#17
baum wants to merge 2 commits into
ceph:ceph-nvmeof-v26.01from
baum:librbd_asio_spdk

Conversation

@baum

@baum baum commented Jan 25, 2026

Copy link
Copy Markdown

Summary

Schedule librbd async completions on SPDK reactor threads instead of the librados ASIO pool when the NVMe-oF gateway enables rbd_with_spdk_wq.

Problem: With default AsioContextWQ, librbd completions contend on the io_context pool; at scale (64 namespaces, high iodepth) throughput collapses. Delivering work only via spdk_thread_send_msg() also bottlenecks on SPDK's shared message mempool.

Solution: SpdkContextWQ implements the Ceph ContextWQ abstract base class and binds each RBD bdev to a reactor (round-robin). Hot-path work uses a per-reactor MP/SC ring drained by an SPDK poller; spdk_thread_send_msg() remains as fallback when the ring is full. Supporting changes in lib/thread/thread.c simplify the per-thread spdk_msg cache.

Changes

  • SpdkContextWQpost/dispatch/post_serial/dispatch_serial/drain; inherits default queue()
  • Round-robin reactor assignment per new RBD bdev
  • Per-reactor dispatch ring (bdev_rbd_spdk_context_wq.cpp)
  • RPC: bdev_rbd_set_with_spdk_wq, bdev_rbd_get_with_spdk_wq
  • Integration: rbd_open_with_context_wq() from bdev_rbd.c

Related PRs

@baum baum marked this pull request as ready for review January 25, 2026 14:17
@baum baum changed the base branch from librbd_asio_spdk to ceph-nvmeof-v25.09 January 25, 2026 14:18
@baum baum force-pushed the librbd_asio_spdk branch 2 times, most recently from 08f907b to 8ad5a1a Compare January 25, 2026 14:25
@gbregman gbregman force-pushed the ceph-nvmeof-v25.09 branch 2 times, most recently from 7c7026c to 289d473 Compare January 26, 2026 08:53
@baum baum force-pushed the librbd_asio_spdk branch from 040222b to b532f5f Compare January 27, 2026 20:39
@gbregman gbregman force-pushed the ceph-nvmeof-v25.09 branch 3 times, most recently from c3ea327 to 912f5f1 Compare January 29, 2026 08:53
@baum baum requested review from bill-scales and idryomov February 2, 2026 07:17
@baum baum force-pushed the librbd_asio_spdk branch 4 times, most recently from 0b88e4c to 3ad6e64 Compare February 4, 2026 13:57
@gbregman gbregman force-pushed the ceph-nvmeof-v25.09 branch 3 times, most recently from 60b5c24 to cf59213 Compare February 11, 2026 17:39
Signed-off-by: Gil Bregman <gbregman@il.ibm.com>
(cherry picked from commit cf59213)
Signed-off-by: Gil Bregman <gbregman@il.ibm.com>
@baum baum force-pushed the librbd_asio_spdk branch 2 times, most recently from f5fa24a to d64385e Compare May 1, 2026 12:35
@baum baum force-pushed the librbd_asio_spdk branch from bc5a685 to 930a42d Compare May 14, 2026 11:52
@baum baum changed the base branch from ceph-nvmeof-v25.09 to ceph-nvmeof-v26.01 May 14, 2026 12:03
@baum baum force-pushed the librbd_asio_spdk branch 4 times, most recently from 61de874 to 7944465 Compare May 18, 2026 10:28
Add SpdkContextWQ implementation to schedule RBD I/O operations on
SPDK reactor threads instead of ASIO thread pool. This includes:

Signed-off-by: Alexander Indenbaum <aindenba@redhat.com>
@baum baum force-pushed the librbd_asio_spdk branch from c7049dc to de57ba9 Compare June 15, 2026 06:19
@gbregman gbregman force-pushed the ceph-nvmeof-v26.01 branch 3 times, most recently from fb9ebd9 to f373386 Compare June 21, 2026 08:46
@gbregman gbregman force-pushed the ceph-nvmeof-v26.01 branch from e287537 to a98c167 Compare June 25, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants