Linux block layer
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Keith Busch <kbusch@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Ming Lei <ming.lei@redhat.com>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	Ed Tsai <ed.tsai@mediatek.com>
Subject: Re: [PATCH v2] block: Improve shared tag set performance
Date: Thu, 19 Jan 2023 09:48:13 -0800	[thread overview]
Message-ID: <f530442e-4010-2829-8c73-fe5138b17531@acm.org> (raw)
In-Reply-To: <4be69fc0-af32-b552-6a36-f75eb798ca95@acm.org>

On 1/18/23 14:46, Bart Van Assche wrote:
> On 1/18/23 14:14, Keith Busch wrote:
>> On Tue, Jan 03, 2023 at 11:53:37AM -0800, Bart Van Assche wrote:
>>> This algorithm hurts performance for UFS devices because UFS devices
>>> have multiple logical units. One of these logical units (WLUN) is used
>>> to submit control commands, e.g. START STOP UNIT. If any request is
>>> submitted to the WLUN, the queue depth is reduced from 31 to 15 or
>>> lower for data LUNs.
>>
>> Can you give the WLUN it's own tagset instead?
> 
> Hi Keith,
> 
> Does that mean creating an additional tagset for the WLUN and statically 
> allocating all tags from the WLUN tagset that are used by other LUNs? 
> That approach would have the following disadvantages:
> - The maximum queue depth for other LUNs would be reduced from 31 to 30.
>    This would have a small but noticeable negative performance impact.
> - The code removed by this patch negatively impacts performance of all
>    SCSI hosts with two or more data LUNs and also of all NVMe controllers
>    that export two or more namespaces if there are significant
>    differences in the number of I/O operations per second for different
>    LUNs/namespaces. This is why I think that this should be solved in the
>    block layer instead of modifying each block driver individually.

(replying to my own e-mail)

Hi Keith,

An additional concern about the approach of using multiple tag sets per 
SCSI host: this approach is not compatible with any code that iterates 
over tag sets. Examples of functions that iterate over tag sets are 
blk_mq_tagset_busy_iter(), scsi_host_busy(), 
scsi_host_complete_all_commands() and scsi_host_busy_iter(). 
scsi_host_busy() is used by e.g. scsi_host_queue_ready() and 
scsi_eh_wakeup(). So I think this approach would break the SCSI core in 
a subtle way.

Bart.


  reply	other threads:[~2023-01-19 17:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 19:53 [PATCH v2] block: Improve shared tag set performance Bart Van Assche
2023-01-18 21:20 ` Bart Van Assche
2023-01-18 22:14 ` Keith Busch
2023-01-18 22:46   ` Bart Van Assche
2023-01-19 17:48     ` Bart Van Assche [this message]
2023-01-19 18:47     ` Keith Busch
2023-01-19 19:28       ` Bart Van Assche

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=f530442e-4010-2829-8c73-fe5138b17531@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@kernel.dk \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=ed.tsai@mediatek.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=martin.petersen@oracle.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