Skip to content

blk-mq: Replace tags->lock with SRCU for tag iterators

Ming Lei linux-block linux-rockchip 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 Latest5 patches 7 repliesApplied
  2. v15 patches 24 repliesSuperseded

Changes in v2 from the cover letter

- rebase on for-6.18/block
- add review tags

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5blk-mq: Move flush queue allocation into blk_mq_init_hctx()block/blk-mq-sysfs.c block/blk-mq.c+13 -80 replies
2/5blk-mq: Pass tag_set to blk_mq_free_rq_map/tagsblock/blk-mq-tag.c block/blk-mq.c block/blk-mq.h+8 -80 replies
3/5blk-mq: Defer freeing of tags page_list to SRCU callbackblock/blk-mq-tag.c block/blk-mq.c include/linux/blk-mq.h+38 -140 replies
4/5blk-mq: Defer freeing flush queue to SRCU callbackblock/blk-mq.c block/blk.h+11 -10 replies
5/5blk-mq: Replace tags->lock with SRCU for tag iteratorsblock/blk-mq-tag.c block/blk-mq.c+12 -244 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchHannes ReineckeYu KuaiMartin K. Petersen
SeriesR-b
1/5R-b R-b
2/5R-b R-b
3/5R-b R-b
4/5R-b R-b
5/5R-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/5] blk-mq: Replace tags->lock with SRCU for tag iterators

Hello Jens,

Replace the spinlock in blk_mq_find_and_get_req() with an SRCU read lock around the tag iterators.

Avoids scsi_host_busy() lockup during scsi host blocked in case of big cpu cores & deep queue depth.

Also the big tags lock isn't needed when reading disk sysfs attribute 'inflight' any more.

Take the following approach:

- clearing rq reference in tags->rqs[] and deferring freeing scheduler requests in SRCU callback

- replace tags->lock with srcu read lock in tags iterator.

V2:
- rebase on for-6.18/block
- add review tags

Thanks,
Ming

Ming Lei (5):
blk-mq: Move flush queue allocation into blk_mq_init_hctx()
blk-mq: Pass tag_set to blk_mq_free_rq_map/tags
blk-mq: Defer freeing of tags page_list to SRCU callback
blk-mq: Defer freeing flush queue to SRCU callback
blk-mq: Replace tags->lock with SRCU for tag iterators

 block/blk-mq-sysfs.c   |  1 -
 block/blk-mq-tag.c     | 38 +++++++++++++++---
 block/blk-mq.c         | 87 +++++++++++++++++++++---------------------
 block/blk-mq.h         |  4 +-
 block/blk.h            |  1 +
 include/linux/blk-mq.h |  2 +
 6 files changed, 80 insertions(+), 53 deletions(-)
Signature · 1 line
2.47.0