Skip to content

RFC blk-mq/scsi: Provide hostwide shared tags for SCSI HBAs

Hannes Reinecke linux-block linux-scsi 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 RFC Latest11 patches 25 repliesIn review
  2. v4 RFC8 patches 6 repliesSuperseded
  3. v3 RFC8 patches 22 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11blk-mq: Remove some unused function argumentsblock/blk-mq-tag.c block/blk-mq-tag.h block/blk-mq.c +1 more+9 -110 replies
2/11blk-mq: rename BLK_MQ_F_TAG_SHARED as BLK_MQ_F_TAG_QUEUE_SHAREDblock/blk-mq-debugfs.c block/blk-mq-tag.c block/blk-mq-tag.h +2 more+15 -150 replies
3/11blk-mq: rename blk_mq_update_tag_set_depth()block/blk-mq-tag.c block/blk-mq.c+14 -122 replies
4/11blk-mq: Facilitate a shared sbitmap per tagsetblock/bfq-iosched.c block/blk-mq-debugfs.c block/blk-mq-sched.c +6 more+204 -404 replies
5/11blk-mq: add WARN_ON in blk_mq_free_rqs()block/blk-mq.c+7 -30 replies
6/11blk-mq: move shared sbitmap into elevator queueblock/blk-mq-sched.c block/blk-mq-tag.c block/blk-mq-tag.h +4 more+57 -500 replies
7/11scsi: Add template flag 'host_tagset'drivers/scsi/scsi_lib.c include/scsi/scsi_host.h+5 -00 replies
8/11scsi: hisi_sas: Switch v3 hw to MQdrivers/scsi/hisi_sas/hisi_sas.h drivers/scsi/hisi_sas/hisi_sas_main.c drivers/scsi/hisi_sas/hisi_sas_v3_hw.c+56 -690 replies
9/11megaraid_sas: switch fusion adapters to MQdrivers/scsi/megaraid/megaraid_sas.h drivers/scsi/megaraid/megaraid_sas_base.c drivers/scsi/megaraid/megaraid_sas_fusion.c+28 -5218 replies
10/11smartpqi: enable host tagsetdrivers/scsi/smartpqi/smartpqi_init.c+28 -100 replies
11/11hpsa: enable host_tagset and switch to MQdrivers/scsi/hpsa.c drivers/scsi/hpsa.h+7 -380 replies

Reviews trailers per patch

2 of 11 patches have a Reviewed-by or Acked-by.

PatchHannes Reinecke
1/11R-b
2/11R-b
3/11
4/11
5/11
6/11
7/11
8/11
9/11
10/11
11/11

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

Read the v5 thread

Cover letter [PATCH RFC v5 00/11] blk-mq/scsi: Provide hostwide shared tags for SCSI HBAs

Hi all,

here now is an updated version of the v2 patchset from John Garry, including the suggestions and reviews from the mailing list. John, apologies for hijacking your work :-)

For this version I've only added some slight modifications to Johns original patch (renaming variables etc); the contentious separate sbitmap allocation has been dropped in favour of Johns original version with pointers to the embedded sbitmap.

But more importantly I've reworked the scheduler tag allocation after discussions with Ming Lei.

Point is, hostwide shared tags can't really be resized; they surely cannot be increased (as it's a hardware limitation), and even decreasing is questionable as any modification here would affect all devices served by this HBA.

Scheduler tags, OTOH, can be considered as per-queue, as the I/O scheduler might want to look at all requests on all queues. As such the queue depth is distinct from the actual queue depth of the tagset.
Seeing that it is distinct the depth can now be changed independently of the underlying tagset, and there's no need ever to change the tagset itself.

I've also modified megaraid_sas, smartpqi and hpsa to take advantage of host_tags.

Performance for megaraid_sas is on par with the original implementation, with the added benefit that with this we should be able to handle cpu hotplug properly.

Differences to v4:
- Rework scheduler tag allocations
- Revert back to the original implementation from John

Differences to v3:
- Include reviews from Ming Lei

Differences to v2:
- Drop embedded tag bitmaps
- Do not share scheduling tags
- Add patches for hpsa and smartpqi

Differences to v1:
- Use a shared sbitmap, and not a separate shared tags (a big change!)
- Drop request.shared_tag
- Add RB tags

Hannes Reinecke (7):
blk-mq: rename blk_mq_update_tag_set_depth()
blk-mq: add WARN_ON in blk_mq_free_rqs()
blk-mq: move shared sbitmap into elevator queue
scsi: Add template flag 'host_tagset'
megaraid_sas: switch fusion adapters to MQ
smartpqi: enable host tagset
hpsa: enable host_tagset and switch to MQ

John Garry (3):
blk-mq: Remove some unused function arguments
blk-mq: Facilitate a shared sbitmap per tagset
scsi: hisi_sas: Switch v3 hw to MQ

Ming Lei (1):
blk-mq: rename BLK_MQ_F_TAG_SHARED as BLK_MQ_F_TAG_QUEUE_SHARED

 block/bfq-iosched.c                         |   4 +-
 block/blk-mq-debugfs.c                      |  12 +--
 block/blk-mq-sched.c                        |  22 +++++
 block/blk-mq-tag.c                          | 140 +++++++++++++++++++++-------
 block/blk-mq-tag.h                          |  27 ++++--
 block/blk-mq.c                              | 104 +++++++++++++++------
 block/blk-mq.h                              |   7 +-
 block/blk-sysfs.c                           |   7 ++
 block/kyber-iosched.c                       |   4 +-
 drivers/scsi/hisi_sas/hisi_sas.h            |   3 +-
 drivers/scsi/hisi_sas/hisi_sas_main.c       |  36 +++----
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c      |  86 +++++++----------
 drivers/scsi/hpsa.c                         |  44 ++-------
 drivers/scsi/hpsa.h                         |   1 -
 drivers/scsi/megaraid/megaraid_sas.h        |   1 -
 drivers/scsi/megaraid/megaraid_sas_base.c   |  65 ++++---------
 drivers/scsi/megaraid/megaraid_sas_fusion.c |  14 ++-
 drivers/scsi/scsi_lib.c                     |   2 +
 drivers/scsi/smartpqi/smartpqi_init.c       |  38 ++++++--
 include/linux/blk-mq.h                      |   7 +-
 include/linux/elevator.h                    |   3 +
 include/scsi/scsi_host.h                    |   3 +
 22 files changed, 380 insertions(+), 250 deletions(-)
Signature · 1 line
2.16.4