Skip to content

blk-mq/scsi-mq: support global tags & introduce force_blk_mq

Ming Lei linux-block linux-scsi 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 23 repliesIn review
  2. v15 patches 31 repliesSuperseded

Changes in v2 from the cover letter

- fix restart code for global tags
- fixes HPSA's IO hang issue
- add 'scsi: Add template flag 'host_tagset''
- reorder patch

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8blk-mq: tags: define several fields of tags as pointerblock/bfq-iosched.c block/blk-mq-debugfs.c block/blk-mq-tag.c +3 more+42 -341 reply
2/8blk-mq: introduce BLK_MQ_F_GLOBAL_TAGSblock/blk-mq-debugfs.c block/blk-mq-sched.c block/blk-mq-tag.c +4 more+63 -137 replies
3/8scsi: Add template flag 'host_tagset'drivers/scsi/scsi_lib.c include/scsi/scsi_host.h+5 -00 replies
4/8block: null_blk: introduce module parameter of 'g_global_tags'drivers/block/null_blk.c+6 -02 replies
5/8scsi: introduce force_blk_mqdrivers/scsi/hosts.c include/scsi/scsi_host.h+4 -02 replies
6/8scsi: virtio_scsi: fix IO hang by irq vector automatic affinitydrivers/scsi/virtio_scsi.c+3 -561 reply
7/8scsi: hpsa: call hpsa_hba_inquiry() after adding hostdrivers/scsi/hpsa.c+2 -32 replies
8/8scsi: hpsa: use blk_mq to solve irq affinity issuedrivers/scsi/hpsa.c+34 -177 replies

Reviews trailers per patch

5 of 8 patches have a Reviewed-by or Acked-by.

PatchLaurence ObermanHannes ReineckePaolo BonziniDon BraceOmar Sandoval
1/8T-b R-b R-b
2/8T-b
3/8T-b
4/8T-b R-b T-b R-b
5/8T-b R-b
6/8T-b R-b A-b
7/8T-b R-b T-b A-b
8/8T-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 5 reviewers.

Read the v2 thread

Cover letter [PATCH V2 0/8] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

Hi All,

This patchset supports global tags which was started by Hannes originally:

	https://marc.info/?l=linux-block&m=149132580511346&w=2

Also inroduce 'force_blk_mq' and 'host_tagset' to 'struct scsi_host_template', so that driver can avoid to support two IO paths(legacy and blk-mq), especially recent discusion mentioned that SCSI_MQ will be enabled at default soon.

	https://marc.info/?l=linux-scsi&m=151727684915589&w=2

With the above changes, it should be easier to convert SCSI drivers' reply queue into blk-mq's hctx, then the automatic irq affinity issue can be solved easily, please see detailed descrption in commit log and the 8th patch for converting HPSA.

Also drivers may require to complete request on the submission CPU for avoiding hard/soft deadlock, which can be done easily with blk_mq too.

	https://marc.info/?t=151601851400001&r=1&w=2

The 6th patch uses the introduced 'force_blk_mq' to fix virtio_scsi so that IO hang issue can be avoided inside legacy IO path, this issue is a bit generic, at least HPSA/virtio-scsi are found broken with v4.15+.

The 7th & 8th patch fixes HPSA's IO issue which is caused by the reply queue selection algorithem.

Laurence has verified that this patch makes HPSA working with the linus tree with this patchset.

The V2 can be found in the following tree/branch:

	https://github.com/ming1/linux/commits/v4.15-for-next-global-tags-v2

V2:
- fix restart code for global tags
- fixes HPSA's IO hang issue
- add 'scsi: Add template flag 'host_tagset''
- reorder patch

Thanks
Ming

Hannes Reinecke (1):
scsi: Add template flag 'host_tagset'

Ming Lei (7):
blk-mq: tags: define several fields of tags as pointer
blk-mq: introduce BLK_MQ_F_GLOBAL_TAGS
block: null_blk: introduce module parameter of 'g_global_tags'
scsi: introduce force_blk_mq
scsi: virtio_scsi: fix IO hang by irq vector automatic affinity
scsi: hpsa: call hpsa_hba_inquiry() after adding host
scsi: hpsa: use blk_mq to solve irq affinity issue

 block/bfq-iosched.c        |  4 +--
 block/blk-mq-debugfs.c     | 11 ++++----
 block/blk-mq-sched.c       | 13 ++++++++-
 block/blk-mq-tag.c         | 67 +++++++++++++++++++++++++++++-----------------
 block/blk-mq-tag.h         | 15 ++++++++---
 block/blk-mq.c             | 31 ++++++++++++++++-----
 block/blk-mq.h             |  3 ++-
 block/kyber-iosched.c      |  2 +-
 drivers/block/null_blk.c   |  6 +++++
 drivers/scsi/hosts.c       |  1 +
 drivers/scsi/hpsa.c        | 56 ++++++++++++++++++++++++--------------
 drivers/scsi/scsi_lib.c    |  2 ++
 drivers/scsi/virtio_scsi.c | 59 +++-------------------------------------
 include/linux/blk-mq.h     |  2 ++
 include/scsi/scsi_host.h   |  6 +++++
 15 files changed, 157 insertions(+), 121 deletions(-)
Signature · 1 line
2.9.5