RFC nbd: allow parallel genetlink operations
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest5 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | nbd: validate the backend identifier under config_lockdrivers/ | +16 | 0 replies | |
| 2/5 | nbd: decrement nbd_total_devices when a device is removeddrivers/ | +1 | 0 replies | |
| 3/5 | nbd: publish devices atomicallydrivers/ | +16 | 0 replies | |
| 4/5 | nbd: hold config_lock while updating nr_hw_queuesdrivers/ | +31 | 0 replies | |
| 5/5 | nbd: allow genetlink operations to run in paralleldrivers/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/5] nbd: allow parallel genetlink operations
Each nbd doit only touches the state of one device; the only global state is nbd_index_idr, accessed briefly under nbd_index_mutex. genl_mutex nevertheless serializes the whole genetlink doit path, and nbd_disconnect_and_put() sleeps in flush_workqueue() while holding it, so one device's teardown blocks every other device. This series enables parallel_ops for nbd.
Patches 1, 2 and 4 fix bugs that are reachable without parallel_ops; patch 3 makes device publication and the status walk consistent for concurrent genl handlers. Patch 5 enables parallel_ops.
A minimal netlink client on an 8-vCPU KVM guest, 32 devices x 10 connect/disconnect cycles, median of 3 runs: 390 ms -> 25 ms. Connect-only and status do not change.
Yang Erkun (5):
nbd: validate the backend identifier under config_lock
nbd: decrement nbd_total_devices when a device is removed
nbd: publish devices atomically
nbd: hold config_lock while updating nr_hw_queues
nbd: allow genetlink operations to run in parallel
drivers/block/nbd.c | 95 +++++++++++++++++++++++++++++++-------------- 1 file changed, 65 insertions(+), 30 deletions(-)
Signature · 1 line
2.52.0