From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: John Garry <john.garry@huawei.com>,
jejb@linux.ibm.com, martin.petersen@oracle.com,
bvanassche@acm.org, ming.lei@redhat.com, hch@lst.de,
hare@suse.de
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org, martin.wilck@suse.com
Subject: Re: [PATCH 0/2] scsi/libata: A potential tagging fix and improvement
Date: Wed, 16 Mar 2022 12:25:26 +0900 [thread overview]
Message-ID: <b77e681d-d180-7434-1675-1fcb10ef4abf@opensource.wdc.com> (raw)
In-Reply-To: <1647340746-17600-1-git-send-email-john.garry@huawei.com>
On 3/15/22 19:39, John Garry wrote:
> Two loosely related patches are included:
>
> - Fix for scsi_realloc_sdev_budget_map(). I noticed that the budget token
> for scsi commands was way in excess of the device queue depth, so I
> think we need to fix the sbitmap depth. I need to test this more.
>
> - libata change to use scsi command budget token for qc tag for SAS host.
> I marked this as RFC as for SAS hosts I don't see anything which
> guarantees that the budget size is <= 32 always.
> For libsas hosts we resize the device depth to 32 in the slave configure
> callback, but this seems an unreliable approach since not all hosts may
> call this.
> In addition, I am worried that even if we resize the device depth
> properly in the slave config callback, we may still try to alloc qc tag
> prior to this - in lun scan, for example.
> So we need a way to guarantee that the device queue depth is <= 32
> always, which I would be open to suggestions for.
>
> John Garry (2):
> scsi: core: Fix sbitmap depth in scsi_realloc_sdev_budget_map()
> libata: Use scsi cmnd budget token for qc tag for SAS host
>
> drivers/ata/libata-core.c | 5 +++--
> drivers/ata/libata-sata.c | 21 ++++-----------------
> drivers/ata/libata-scsi.c | 2 +-
> drivers/ata/libata.h | 4 ++--
> drivers/scsi/scsi_scan.c | 5 +++++
> include/linux/libata.h | 1 -
> 6 files changed, 15 insertions(+), 23 deletions(-)
>
I tested this and it is working fine for me. This actually solves the QD
not changing problem I had detected with the pm80xx driver.
Now, doing this:
# cat /sys/block/sde/device/queue_depth
32
# echo 16 > /sys/block/sde/device/queue_depth
# cat /sys/block/sde/device/queue_depth
16
is working as expected.
See my comments on patch 2 for getting final ack and tested tags :)
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2022-03-16 3:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-15 10:39 [PATCH 0/2] scsi/libata: A potential tagging fix and improvement John Garry
2022-03-15 10:39 ` [PATCH 1/2] scsi: core: Fix sbitmap depth in scsi_realloc_sdev_budget_map() John Garry
2022-03-15 14:33 ` Bart Van Assche
2022-03-15 15:11 ` John Garry
2022-03-15 14:38 ` Ming Lei
2022-03-15 10:39 ` [PATCH RFC 2/2] libata: Use scsi cmnd budget token for qc tag for SAS host John Garry
2022-03-16 3:21 ` Damien Le Moal
2022-03-16 8:23 ` John Garry
2022-03-16 8:34 ` Christoph Hellwig
2022-03-16 10:46 ` John Garry
2022-03-16 23:23 ` Damien Le Moal
2022-03-16 3:25 ` Damien Le Moal [this message]
2022-03-16 8:15 ` [PATCH 0/2] scsi/libata: A potential tagging fix and improvement 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=b77e681d-d180-7434-1675-1fcb10ef4abf@opensource.wdc.com \
--to=damien.lemoal@opensource.wdc.com \
--cc=bvanassche@acm.org \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jejb@linux.ibm.com \
--cc=john.garry@huawei.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=martin.wilck@suse.com \
--cc=ming.lei@redhat.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).