Skip to content

blk-mq/nvme-loop: use nvme-loop's lock class for addressing lockdep false positive warning

Ming Lei linux-block lkml 2 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 5 repliesApplied
  2. v13 patches 13 repliesSuperseded

Changes in v2 from the cover letter

- add reviewed-by
- adjust commit log of patch 3

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3blk-mq: add new API of blk_mq_hctx_set_fq_lock_classblock/blk-flush.c include/linux/blk-mq.h+28 -01 reply
2/3nvme-loop: use blk_mq_hctx_set_fq_lock_class to set loop's lock classdrivers/nvme/target/loop.c+10 -01 reply
3/3Revert "block: Fix a lockdep complaint triggered by request queue flushing"block/blk-flush.c block/blk.h+0 -61 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchKashyap DesaiChristoph HellwigHannes Reinecke
1/3T-b R-b
2/3T-b R-b R-b
3/3T-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH V2 0/3] blk-mq/nvme-loop: use nvme-loop's lock class for addressing lockdep false positive warning

Hi,

Qian reported there is hang during booting when shared host tagset is introduced on megaraid sas. Sumit reported the whole SCSI probe takes about ~45min in his test.

Turns out it is caused by nr_hw_queues increased, especially commit b3c6a5997541("block: Fix a lockdep complaint triggered by request queue flushing") adds synchronize_rcu() for each hctx's release handler.

Address the original lockdep false positive warning by simpler way, then long scsi probe can be avoided with lockdep enabled.

V2:
- add reviewed-by
- adjust commit log of patch 3

Ming Lei (3):
blk-mq: add new API of blk_mq_hctx_set_fq_lock_class
nvme-loop: use blk_mq_hctx_set_fq_lock_class to set loop's lock class Revert "block: Fix a lockdep complaint triggered by request queue
flushing"

 block/blk-flush.c          | 30 +++++++++++++++++++++++++-----
 block/blk.h                |  1 -
 drivers/nvme/target/loop.c | 10 ++++++++++
 include/linux/blk-mq.h     |  3 +++
 4 files changed, 38 insertions(+), 6 deletions(-)
Cc Christoph Hellwig <[email protected]>
Cc Qian Cai <[email protected]>
Cc Sumit Saxena <[email protected]>
Cc John Garry <[email protected]>
Cc Kashyap Desai <[email protected]>
Cc Bart Van Assche <[email protected]>
Cc Hannes Reinecke <[email protected]>
Signature · 1 line
2.28.0