linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Yufen Yu <yuyufen@huawei.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	john.garry@huawei.com, "axboe@kernel.dk" <axboe@kernel.dk>,
	hare@suse.de, Bart Van Assche <bvanassche@acm.org>
Subject: Re: [Question] abort shared tags for SCSI drivers
Date: Thu, 16 Jan 2020 17:03:47 +0800	[thread overview]
Message-ID: <20200116090347.GA7438@ming.t460p> (raw)
In-Reply-To: <bd959b9f-78dd-e0e7-0421-8d7e3cd2f41b@huawei.com>

On Thu, Jan 16, 2020 at 12:06:02PM +0800, Yufen Yu wrote:
> Hi, all
> 
> Shared tags is introduced to maintains a notion of fairness between
> active users. This may be good for nvme with multiple namespace to
> avoid starving some users. Right?

Actually nvme namespace is LUN of scsi world.

Shared tags isn't for maintaining fairness, it is just natural sw
implementation of scsi host's tags, since every scsi host shares
tags among all LUNs. If the SCSI host supports real MQ, the tags
is hw-queue wide, otherwise it is host wide.

> 
> However, I don't understand why we introduce the shared tag for SCSI.
> IMO, there are two concerns for scsi shared tag:
> 
> 1) For now, 'shost->can_queue' is used as queue depth in block layer.
> And all target drivers share tags on one host. Then, the max tags for
> each target can get:
> 
> 	depth = max((bt->sb.depth + users - 1) / users, 4U);
> 
> But, each target driver may have their own capacity of tags and queue depth.
> Does shared tag limit target device bandwidth?

No, if the 'target driver' means LUN, each LUN hasn't its independent
tags, maybe it has its own queue depth, which is often for maintaining
fairness among all active LUNs, not real queue depth. 

You may see the patches[1] which try to bypass per-LUN queue depth for SSD.

[1] https://lore.kernel.org/linux-block/20191118103117.978-1-ming.lei@redhat.com/

> 
> 2) When add new target or remove device, it may need to freeze other device
> to update hctx->flags of BLK_MQ_F_TAG_SHARED. That may hurt performance.

Add/removing device isn't a frequent event, so it shouldn't be a real
issue, or you have seen effect on real use case?

> 
> Recently we discuss abort hostwide shared tags for SCSI[0] and sharing tags
> across hardware queues[1]. These discussion are abort shared tag. But, I
> confuse whether shared tag across hardware queues can solve my concerns as mentioned.

Both [1] and [0] are for converting some single queue SCSI host into MQ
because these HBAs support multiple reply queue for completing request,
meantime they only have single tags(so they are SQ driver now). So far
not many such kind of hardwares(HPSA, hisi sas, megaraid_sas, ...).


Thanks, 
Ming


  reply	other threads:[~2020-01-16  9:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16  4:06 [Question] abort shared tags for SCSI drivers Yufen Yu
2020-01-16  9:03 ` Ming Lei [this message]
2020-01-16 12:17   ` [Question] about " John Garry
2020-01-16 15:17   ` [Question] abort " James Bottomley
2020-01-17  7:19   ` [Question] about " Yufen Yu
2020-01-17 10:16     ` Ming Lei
2020-01-19 13:57       ` Yufen Yu

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=20200116090347.GA7438@ming.t460p \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=hare@suse.de \
    --cc=john.garry@huawei.com \
    --cc=linux-block@vger.kernel.org \
    --cc=yuyufen@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).