ublk: simplify & improve IO canceling
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest8 patches 7 repliesApplied
- v19 patches 22 repliesSuperseded
Changes in v2 from the cover letter
- drop 1st patch in V1, which isn't necessary
- update "ublk: properly serialize all FETCH_REQs", which puts FETCH handling into single function, add comment on NONBLOCK
- comment & commit log improvement
- small cleanup from 5/8, 6/8
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | ublk: properly serialize all FETCH_REQsdrivers/ | +49 | 0 replies | |
| 2/8 | ublk: add ublk_force_abort_dev()drivers/ | +8 | 0 replies | |
| 3/8 | ublk: rely on ->canceling for dealing with ublk_nosrv_dev_should_queue_iodrivers/ | +17 | 1 reply | |
| 4/8 | ublk: move device reset into ublk_ch_release()drivers/ | +72 | 2 replies | |
| 5/8 | ublk: improve detection and handling of ublk server exitdrivers/ | +123 | 1 reply | |
| 6/8 | ublk: remove __ublk_quiesce_dev()drivers/ | +2 | 0 replies | |
| 7/8 | ublk: simplify aborting ublk requestdrivers/ | +20 | 0 replies | |
| 8/8 | selftests: ublk: add generic_06 for covering fault injecttools/ tools/ tools/ +2 more | +155 | 0 replies |
Reviews trailers per patch
4 of 8 patches have a Reviewed-by or Acked-by.
| Patch | Uday Shankar |
|---|---|
| 1/8 | |
| 2/8 | R-b |
| 3/8 | R-b |
| 4/8 | |
| 5/8 | |
| 6/8 | R-b |
| 7/8 | R-b |
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH V2 0/8] ublk: simplify & improve IO canceling
Hello,
Patch 1st ~ 7th simplifies & improves IO canceling when ublk server daemon is exiting by taking two stage canceling:
- canceling active uring_cmd from its cancel function
- move inflight requests aborting into ublk char device release handler
With this way, implementation is simplified a lot, meantime ub->mutex is not required before queue becomes quiesced, so forward progress is guaranteed.
This approach & main implementation is from Uday's patch of "improve detection and handling of ublk server exit".
The last patch is selftest code for showing the improvement ublk server exit, 30sec timeout is avoided, which depends on patchset of "[PATCH V2 00/13] selftests: ublk: test cleanup & add more tests"[1].
[1] https://lore.kernel.org/linux-block/[email protected]/T/#medbf7024e57beaf1c53e4cef6e076421463839d0
Pass both ublk kernel selftests and ublksrv 'make test T=generic'.
Thanks,
V2:
- drop 1st patch in V1, which isn't necessary
- update "ublk: properly serialize all FETCH_REQs", which puts FETCH handling into single function, add comment on NONBLOCK
- comment & commit log improvement
- small cleanup from 5/8, 6/8
Ming Lei (5):
ublk: add ublk_force_abort_dev()
ublk: rely on ->canceling for dealing with
ublk_nosrv_dev_should_queue_io
ublk: move device reset into ublk_ch_release()
ublk: remove __ublk_quiesce_dev()
ublk: simplify aborting ublk request
Uday Shankar (3):
ublk: properly serialize all FETCH_REQs
ublk: improve detection and handling of ublk server exit
selftests: ublk: add generic_06 for covering fault inject
drivers/block/ublk_drv.c | 532 +++++++++--------- tools/testing/selftests/ublk/Makefile | 4 +- tools/testing/selftests/ublk/fault_inject.c | 98 ++++ tools/testing/selftests/ublk/kublk.c | 3 +- tools/testing/selftests/ublk/kublk.h | 12 +- .../testing/selftests/ublk/test_generic_06.sh | 41 ++ 6 files changed, 425 insertions(+), 265 deletions(-) create mode 100644 tools/testing/selftests/ublk/fault_inject.c create mode 100755 tools/testing/selftests/ublk/test_generic_06.sh
Signature · 1 line
2.47.0