nbd: eliminate queue freeze/unfreeze overhead in connection setup
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v8 Latest8 patches 7 repliesApplied
- v78 patches 5 repliesSuperseded
- v68 patches 1 replySuperseded
Earlier versions · 4
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v5 | 8 patches | 11 replies | Superseded | |
| v4 | 7 patches | 1 reply | Superseded | |
| v3 | 6 patches | 13 replies | Superseded | |
| v2 | 5 patches | 3 replies | Superseded |
Changes in v8 from the cover letter
1. clean some code for patch 7
2. reject invalid pre_defined_connections for patch 8
Patches in v8 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | nbd: simplify find_fallback() by removing redundant logicdrivers/ | +14 | 0 replies | |
| 2/8 | nbd: disallow NBD_SET_SOCK on an active devicedrivers/ | +7 | 0 replies | |
| 3/8 | nbd: clear queue limits on disconnectdrivers/ | +26 | 0 replies | |
| 4/8 | nbd: remove queue freeze in nbd_add_socketdrivers/ | +0 | 0 replies | |
| 5/8 | nbd: skip queue freeze when setting size at device startupdrivers/ | +5 | 0 replies | |
| 6/8 | nbd: factor out a nbd_genl_foreach_sockdrivers/ | +62 | 0 replies | |
| 7/8 | nbd: remove queue freeze for newly created nbd from netlink pathdrivers/ | +9 | 0 replies | |
| 8/8 | nbd: add pre_defined_connections module parameter for pre-created devicesdrivers/ | +15 | 4 replies |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by.
| Patch | Yu Kuai |
|---|---|
| 1/8 | R-b |
| 2/8 | R-b |
| 3/8 | R-b |
| 4/8 | R-b |
| 5/8 | R-b |
| 6/8 | R-b |
| 7/8 | R-b |
| 8/8 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v8 0/8] nbd: eliminate queue freeze/unfreeze overhead in connection setup
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
v7->v8:
1. clean some code for patch 7
2. reject invalid pre_defined_connections for patch 8
v6->v7:
1. fix patch 3(sorry again for mistake in v6)
v5->v6:
1. patch 3, reset stale FEAT*, not only write cache
2. patch 5, using the way Kuai advise to skip freeze
3. patch 6, adopt kuai's suggestion
4. patch 8, rename nr_hw_queues and add some comments
v4->v5:
1. add patch 3 to reset write cache on disconnect
2. fix ("nbd: factor out a nbd_genl_foreach_sock")
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 (7):
nbd: disallow NBD_SET_SOCK on an active device
nbd: clear queue limits on disconnect
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 pre_defined_connections module parameter for pre-created
devices
drivers/block/nbd.c | 257 +++++++++++++++++++++++--------------------- 1 file changed, 137 insertions(+), 120 deletions(-)
Signature · 1 line
2.52.0