linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] scsi: libsas: Use request tag in more drivers
@ 2022-09-28 12:27 John Garry
  2022-09-28 12:27 ` [PATCH 1/6] scsi: libsas: Add sas_task_find_rq() John Garry
                   ` (5 more replies)
  0 siblings, 6 replies; 25+ messages in thread
From: John Garry @ 2022-09-28 12:27 UTC (permalink / raw)
  To: jejb, martin.petersen, jinpu.wang, damien.lemoal
  Cc: hare, linux-scsi, linux-kernel, linuxarm, ipylypiv, changyuanl,
	hch, John Garry

Currently hisi_sas is the only libsas driver which uses the request tag
for per-HW IO tag.

All other libsas drivers manage the tags internally. Tag management in
pm8001 and mvsas is currently using a simple bitmap, so use the request
tag when available there. With this change we still need to manage tags
for libsas "internal" commands, like SMP commands, and any other
private commands so reserve some tags for this:
- For pm8001 I went with pre-existing and unused PM8001_RESERVE_SLOT size.
  The value is 8, which should be enough. It is greater than mvsas, below,
  but this driver sends a lot of other private commands to HW.
- For mvsas I went with 4, which still should be enough.

isci and aic9xx have elaborate tag alloc schemes, so I'm not going to
bother changing them, especially since I have no HW to test with.

Helper sas_task_find_rq() is added to get the request and associated tag
per sas_task when it is available.

This series looks not to conflict with
https://lore.kernel.org/linux-scsi/20220928070130.3657183-1-yanaijie@huawei.com/T/#mefdcb7b63b4e6ebc8b77a689b3923571ab3d33ab

Based on https://lore.kernel.org/linux-scsi/1664262298-239952-1-git-send-email-john.garry@huawei.com/T/#t

Igor Pylypiv (1):
  scsi: pm8001: Remove pm8001_tag_init()

John Garry (5):
  scsi: libsas: Add sas_task_find_rq()
  scsi: hisi_sas: Use sas_task_find_rq()
  scsi: pm8001: Use sas_task_find_rq() for tagging
  scsi: mvsas: Delete mvs_tag_init()
  scsi: mvsas: Use sas_task_find_rq() for tagging

 drivers/scsi/hisi_sas/hisi_sas_main.c | 26 ++++++++----------------
 drivers/scsi/mvsas/mv_defs.h          |  1 +
 drivers/scsi/mvsas/mv_init.c          |  6 ++----
 drivers/scsi/mvsas/mv_sas.c           | 29 ++++++++++++++++-----------
 drivers/scsi/mvsas/mv_sas.h           |  2 --
 drivers/scsi/pm8001/pm8001_init.c     | 12 ++++-------
 drivers/scsi/pm8001/pm8001_sas.c      | 15 +++++++-------
 drivers/scsi/pm8001/pm8001_sas.h      |  7 +++++--
 include/scsi/libsas.h                 | 22 ++++++++++++++++++++
 9 files changed, 67 insertions(+), 53 deletions(-)

-- 
2.35.3


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2022-09-29  8:03 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28 12:27 [PATCH 0/6] scsi: libsas: Use request tag in more drivers John Garry
2022-09-28 12:27 ` [PATCH 1/6] scsi: libsas: Add sas_task_find_rq() John Garry
2022-09-28 13:13   ` Jason Yan
2022-09-28 13:50     ` John Garry
2022-09-28 14:38       ` Jason Yan
2022-09-28 13:17   ` Johannes Thumshirn
2022-09-28 13:56     ` John Garry
2022-09-28 14:28       ` Johannes Thumshirn
2022-09-29  2:09   ` Damien Le Moal
2022-09-29  7:33     ` John Garry
2022-09-29  7:56       ` Damien Le Moal
2022-09-28 12:27 ` [PATCH 2/6] scsi: hisi_sas: Use sas_task_find_rq() John Garry
2022-09-29  2:11   ` Damien Le Moal
2022-09-29  7:38     ` John Garry
2022-09-28 12:27 ` [PATCH 3/6] scsi: pm8001: Remove pm8001_tag_init() John Garry
2022-09-29  2:13   ` Damien Le Moal
2022-09-28 12:27 ` [PATCH 4/6] scsi: pm8001: Use sas_task_find_rq() for tagging John Garry
2022-09-29  2:17   ` Damien Le Moal
2022-09-29  7:41     ` John Garry
2022-09-28 12:27 ` [PATCH 5/6] scsi: mvsas: Delete mvs_tag_init() John Garry
2022-09-29  2:18   ` Damien Le Moal
2022-09-28 12:27 ` [PATCH 6/6] scsi: mvsas: Use sas_task_find_rq() for tagging John Garry
2022-09-29  2:22   ` Damien Le Moal
2022-09-29  7:49     ` John Garry
2022-09-29  8:02       ` Damien Le Moal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).