Skip to content

Avoid that scsi-mq and dm-mq queue processing stalls sporadically

Bart Van Assche dm-devel linux-block linux-scsi 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 26 repliesIn review
  2. v35 patches 11 repliesSuperseded
  3. v25 patches 11 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches4 repliesSuperseded

Changes in v4 from the cover letter

- Addressed the review comments on version three of this series about the patch that makes it safe to use RCU to iterate over .tag_list and also about the runtime performance and use of short variable names in patch 2/5.
- Clarified the description of the patch that fixes the scsi-mq stall.
- Added a patch to fix a dm-mq queue stall.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6blk-mq: Make it safe to use RCU to iterate over blk_mq_tag_set.tag_listblock/blk-mq.c+9 -21 reply
2/6blk-mq: Restart a single queue if tag sets are sharedblock/blk-mq-sched.c block/blk-mq-sched.h block/blk-mq.c +1 more+55 -271 reply
3/6blk-mq: Clarify comments in blk_mq_dispatch_rq_list()block/blk-mq.c+18 -101 reply
4/6blk-mq: Introduce blk_mq_delay_run_hw_queue()block/blk-mq.c include/linux/blk-mq.h+32 -22 replies
5/6scsi: Avoid that SCSI queues get stuckdrivers/scsi/scsi_lib.c+3 -31 reply
6/6dm rq: Avoid that request processing stalls sporadicallydrivers/md/dm-rq.c+1 -013 replies

Reviews trailers per patch

4 of 6 patches have a Reviewed-by or Acked-by.

PatchChristoph Hellwig
1/6R-b
2/6R-b
3/6R-b
4/6
5/6R-b
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/6] Avoid that scsi-mq and dm-mq queue processing stalls sporadically

Hello Jens,

The six patches in this patch series fix the queue lockup I reported recently on the linux-block mailing list. Please consider these patches for inclusion in the upstream kernel.

Thanks,

Bart.

Changes between v3 and v4:
- Addressed the review comments on version three of this series about the patch that makes it safe to use RCU to iterate over .tag_list and also about the runtime performance and use of short variable names in patch 2/5.
- Clarified the description of the patch that fixes the scsi-mq stall.
- Added a patch to fix a dm-mq queue stall.

Changes between v2 and v3:
- Removed the blk_mq_ops.restart_hctx function pointer again.
- Modified blk_mq_sched_restart_queues() such that only a single hardware queue is restarted instead of multiple if hardware queues are shared.
- Introduced a new function in the block layer, namely blk_mq_delay_run_hw_queue().

Changes between v1 and v2:
- Reworked scsi_restart_queues() such that it no longer takes the SCSI host lock.
- Added two patches - one for exporting blk_mq_sched_restart_hctx() and another one to make iterating with RCU over blk_mq_tag_set.tag_list safe.

Bart Van Assche (6):
blk-mq: Make it safe to use RCU to iterate over
blk_mq_tag_set.tag_list
blk-mq: Restart a single queue if tag sets are shared
blk-mq: Clarify comments in blk_mq_dispatch_rq_list()
blk-mq: Introduce blk_mq_delay_run_hw_queue()
scsi: Avoid that SCSI queues get stuck
dm rq: Avoid that request processing stalls sporadically

 block/blk-mq-sched.c    | 63 +++++++++++++++++++++++++++++++++++-------
 block/blk-mq-sched.h    | 16 +----------
 block/blk-mq.c          | 73 +++++++++++++++++++++++++++++++++++++++----------
 drivers/md/dm-rq.c      |  1 +
 drivers/scsi/scsi_lib.c |  6 ++--
 include/linux/blk-mq.h  |  2 ++
 include/linux/blkdev.h  |  1 -
 7 files changed, 118 insertions(+), 44 deletions(-)
Signature · 1 line
2.12.0