linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: <jinpu.wang@cloud.ionos.com>, <jejb@linux.ibm.com>,
	<martin.petersen@oracle.com>
Cc: <hare@suse.de>, <damien.lemoal@opensource.wdc.com>,
	<linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linuxarm@huawei.com>, <ipylypiv@google.com>,
	<changyuanl@google.com>, <yanaijie@huawei.com>,
	John Garry <john.garry@huawei.com>
Subject: [PATCH v3 0/7] scsi: libsas: Use request tag in more drivers
Date: Tue, 4 Oct 2022 19:27:06 +0800	[thread overview]
Message-ID: <1664882833-39804-1-git-send-email-john.garry@huawei.com> (raw)

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

Differences to v2:
- Put private tags at bottom of tagset for each driver (Hannes)
- Add RB tags from Jason, Jack, and Hannes (thanks!)

Differences to v1:
- Rework sas_task_find_rq()
- Rename tags->rsvd and remove tag size struct arg for both mvsas and
  pm8001
- Decrement can_queue for mvsas
- Use sas_task_find_rq() in pm80xx_chip_get_q_index()
- Add Damien's tags (thanks)

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

John Garry (6):
  scsi: libsas: Add sas_task_find_rq()
  scsi: hisi_sas: Use sas_task_find_rq()
  scsi: hisi_sas: Put reserved tags in lower region of tagset
  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 | 38 +++++++++---------------
 drivers/scsi/mvsas/mv_defs.h          |  1 +
 drivers/scsi/mvsas/mv_init.c          | 11 ++++---
 drivers/scsi/mvsas/mv_sas.c           | 42 ++++++++++++++-------------
 drivers/scsi/mvsas/mv_sas.h           |  8 +----
 drivers/scsi/pm8001/pm8001_init.c     | 14 +++------
 drivers/scsi/pm8001/pm8001_sas.c      | 20 ++++++-------
 drivers/scsi/pm8001/pm8001_sas.h      | 12 +++++---
 drivers/scsi/pm8001/pm80xx_hwi.c      | 17 ++---------
 include/scsi/libsas.h                 | 18 ++++++++++++
 10 files changed, 85 insertions(+), 96 deletions(-)

-- 
2.25.1


             reply	other threads:[~2022-10-04 10:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-04 11:27 John Garry [this message]
2022-10-04 11:27 ` [PATCH v3 1/7] scsi: libsas: Add sas_task_find_rq() John Garry
2022-10-04 11:27 ` [PATCH v3 2/7] scsi: hisi_sas: Use sas_task_find_rq() John Garry
2022-10-04 11:27 ` [PATCH v3 3/7] scsi: hisi_sas: Put reserved tags in lower region of tagset John Garry
2022-10-04 11:27 ` [PATCH v3 4/7] scsi: pm8001: Remove pm8001_tag_init() John Garry
2022-10-04 11:27 ` [PATCH v3 5/7] scsi: pm8001: Use sas_task_find_rq() for tagging John Garry
2022-10-04 22:44   ` Damien Le Moal
2022-10-04 11:27 ` [PATCH v3 6/7] scsi: mvsas: Delete mvs_tag_init() John Garry
2022-10-04 11:27 ` [PATCH v3 7/7] scsi: mvsas: Use sas_task_find_rq() for tagging John Garry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1664882833-39804-1-git-send-email-john.garry@huawei.com \
    --to=john.garry@huawei.com \
    --cc=changyuanl@google.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=hare@suse.de \
    --cc=ipylypiv@google.com \
    --cc=jejb@linux.ibm.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=martin.petersen@oracle.com \
    --cc=yanaijie@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).