Linux block layer
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] nbd: allow parallel genetlink operations
@ 2026-11-07  6:46 Yang Erkun
  2026-11-07  6:46 ` [RFC PATCH 1/5] nbd: validate the backend identifier under config_lock Yang Erkun
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Yang Erkun @ 2026-11-07  6:46 UTC (permalink / raw)
  To: axboe, josef, xiubli, prasanna.kalever, ming.lei, yukuai, nilay
  Cc: linux-block, nbd, yangerkun, wangkefeng.wang, leijitang, yi.zhang,
	chengzhihao1, houtao1, wozizhi

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(-)

-- 
2.52.0


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

end of thread, other threads:[~2026-11-17  4:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-07  6:46 [RFC PATCH 0/5] nbd: allow parallel genetlink operations Yang Erkun
2026-11-07  6:46 ` [RFC PATCH 1/5] nbd: validate the backend identifier under config_lock Yang Erkun
2026-11-07  6:46 ` [RFC PATCH 2/5] nbd: decrement nbd_total_devices when a device is removed Yang Erkun
2026-11-07  6:46 ` [RFC PATCH 3/5] nbd: publish devices atomically Yang Erkun
2026-11-07  6:46 ` [RFC PATCH 4/5] nbd: hold config_lock while updating nr_hw_queues Yang Erkun
2026-11-07  6:46 ` [RFC PATCH 5/5] nbd: allow genetlink operations to run in parallel Yang Erkun
2026-11-17  4:36 ` [RFC PATCH 0/5] nbd: allow parallel genetlink operations yangerkun

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