Re: [PATCH v4 0/7] nbd: eliminate queue freeze/unfreeze overhead in connection setup
yangerkun <[email protected]> Tue, 28 Jul 2026 14:32:52 +0800
| Newsgroups | org.kernel.vger.linux-block |
|---|---|
| Message-ID | <[email protected]> |
Hi, https://sashiko.dev/#/patchset/20260727074718.414868-1-yangerkun%40huawei.com Sashiko has identified some problems in this series. I will address them in the next version. Please disregard this version. Thank you! Thanks, Erkun. 在 2026/7/27 15:47, Yang Erkun 写道: > This series eliminates the blk_mq_freeze_queue()/unfreeze_queue() > overhead that currently occurs during nbd connection setup(nbd provide > ondemand and was using in AI sandbox e2b[1] to mount and attach rootfs). > Each freeze cycle will introduce a RCU grace which was significant > with multi-core system. > > time nbd-client --name myexport --connections 96 127.0.0.1 1234 > > After this patchset: > real 0m0.090s > user 0m0.004s > sys 0m0.018s > > Without this patchset: > real 0m2.195s > user 0m0.005s > sys 0m0.022s > > v3->v4: > > 1. factor out nbd_genl_foreach_sock to cleanup duplicated code > 2. rewrite some commit message to make what's going more clearly > > v2->v3: > 1. Stop using xarray, and protect it by rejecting late NBD_SET_SOCKS > 2. Eliminate freeze in nbd_set_size when device setup > 3. Add module parameter to eliminate freeze for pre-created device > > v1->v2: > 1. Rewrite cover letter > 2. Eliminate freeze call from blk_mq_update_nr_hw_queues in > nbd_start_device for netlink path > > > Long Li (1): > nbd: simplify find_fallback() by removing redundant logic > > Yang Erkun (6): > nbd: disallow NBD_SET_SOCK on an active device > nbd: remove queue freeze in nbd_add_socket > nbd: skip queue freeze when setting size at device startup > nbd: factor out a nbd_genl_foreach_sock > nbd: remove queue freeze for newly created nbd from netlink path > nbd: add nr_hw_queues module parameter for pre-created devices > > drivers/block/nbd.c | 228 +++++++++++++++++++++++--------------------- > 1 file changed, 121 insertions(+), 107 deletions(-) >