From: John Garry <john.garry@huawei.com>
To: Ming Lei <ming.lei@redhat.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
James Bottomley <James.Bottomley@hansenpartnership.com>,
Jens Axboe <axboe@kernel.dk>,
"Ewan D . Milne" <emilne@redhat.com>,
Omar Sandoval <osandov@fb.com>, "Christoph Hellwig" <hch@lst.de>,
Kashyap Desai <kashyap.desai@broadcom.com>,
"Hannes Reinecke" <hare@suse.de>,
Laurence Oberman <loberman@redhat.com>,
"Bart Van Assche" <bart.vanassche@wdc.com>
Subject: Re: [PATCH V4 1/2] scsi: core: avoid host-wide host_busy counter for scsi_mq
Date: Fri, 25 Oct 2019 09:58:16 +0100 [thread overview]
Message-ID: <fb0d3475-b9b9-bac2-ec44-5c4cff67a104@huawei.com> (raw)
In-Reply-To: <20191024212427.GA26168@ming.t460p>
>> In scsi_host.h, we have for scsi_host_template.can_queue: "It is set to the
>> maximum number of simultaneous commands a given host adapter will accept.",
>> so that should be honoured.
>
Hi Ming,
> That words should have been changed to:
>
> "It is set to the maximum number of simultaneous commands a given host adapter's
> hw queue will accept."
I find this definition misleading. As you know, some MQ SAS HBAs can
accept .can_queue commands on a given hw queue, but can still only
accept .can_queue commands over all hw queues.
>
>>
>> And Scsi_host.nr_hw_queues: "it is assumed that each hardware queue has a
>> queue depth of can_queue. In other words, the total queue depth per host is
>> nr_hw_queues * can_queue."
>
> The above is correct.
>
>>
>> I don't read "total queue depth per host" same as "maximum number of
>> simultaneous commands a given host adapter will accept". If anything, the
>> nr_hw_queues comment is ambiguous.
>>
>>>
>>> The point is simple, because each hw queue has its own independent tags,
>>> that is why I mentioned your Hisilicon SAS can't be converted to MQ
>>> easily cause this hardware has only single shared tags.
>>
>> Please be aware that HiSilicon SAS HW would not be unique for SCSI HBAs in
>> this regard, in that the unique hostwide tag is not just for HBA HW IO
>> management, but also is used as the tag for SCSI TMFs.
>
> Right.
>
>>
>> Just checking mpt3sas seems similar:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/scsi/mpt3sas/mpt3sas_scsih.c#n2918
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/scsi/mpt3sas/mpt3sas_base.c#n3546
>
> Not only mpt3sas, there are also HPSA and more. And these drivers have to
> support single hw queue of blk-mq, instead of real MQ. And the reason is that
> these HBA has single tags.
We should be able to do better than that.
For a start, at least doesn't the check you remove in
scsi_host_is_busy() limit commands the HBA accepts to .can_queue?
And if you make the change in this patch, then the changes to improve
blk-mq for CPU hotplug are pointless, as we can't change the SAS HBAs to
expose multiple queues.
Thanks,
John
>
> Thanks,
> Ming
>
> .
>
next prev parent reply other threads:[~2019-10-25 8:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-09 9:32 [PATCH V4 0/2] scsi: avoid atomic operations in IO path Ming Lei
2019-10-09 9:32 ` [PATCH V4 1/2] scsi: core: avoid host-wide host_busy counter for scsi_mq Ming Lei
2019-10-09 16:14 ` Bart Van Assche
2019-10-23 8:52 ` John Garry
2019-10-24 0:58 ` Ming Lei
2019-10-24 9:19 ` John Garry
2019-10-24 21:24 ` Ming Lei
2019-10-25 8:58 ` John Garry [this message]
2019-10-25 9:43 ` Ming Lei
2019-10-25 10:13 ` John Garry
2019-10-25 21:53 ` Ming Lei
2019-10-28 9:42 ` John Garry
2019-10-09 9:32 ` [RFC PATCH V4 2/2] scsi: core: don't limit per-LUN queue depth for SSD Ming Lei
2019-10-09 16:05 ` Bart Van Assche
2019-10-10 0:43 ` Ming Lei
2019-10-17 18:30 ` Kashyap Desai
2019-10-23 1:28 ` Ming Lei
2019-10-23 7:46 ` Kashyap Desai
2019-10-24 1:09 ` Ming Lei
2019-10-25 10:04 ` Kashyap Desai
2019-10-25 21:58 ` Ming Lei
2019-11-04 9:30 ` Kashyap Desai
2019-11-05 0:23 ` Ming Lei
2019-10-23 0:30 ` [scsi] cc2f854c79: suspend_stress.fail kernel test robot
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=fb0d3475-b9b9-bac2-ec44-5c4cff67a104@huawei.com \
--to=john.garry@huawei.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=axboe@kernel.dk \
--cc=bart.vanassche@wdc.com \
--cc=emilne@redhat.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=kashyap.desai@broadcom.com \
--cc=linux-scsi@vger.kernel.org \
--cc=loberman@redhat.com \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@redhat.com \
--cc=osandov@fb.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).