Linux block layer
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Ming Lei <ming.lei@redhat.com>, Hannes Reinecke <hare@suse.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Christoph Hellwig <hch@lst.de>,
	James Bottomley <james.bottomley@hansenpartnership.com>,
	"Bart van Assche" <bvanassche@acm.org>,
	<linux-scsi@vger.kernel.org>, <linux-block@vger.kernel.org>,
	Kashyap Desai <kashyap.desai@broadcom.com>
Subject: Re: [PATCH 4/8] blk-mq: Facilitate a shared sbitmap per tagset
Date: Fri, 29 Nov 2019 09:21:43 +0000	[thread overview]
Message-ID: <83689a0b-59a8-5182-d2cf-57119cba758d@huawei.com> (raw)
In-Reply-To: <20191129002540.GA1829@ming.t460p>

On 29/11/2019 00:25, Ming Lei wrote:
> On Wed, Nov 27, 2019 at 06:02:54PM +0100, Hannes Reinecke wrote:
>> On 11/26/19 4:54 PM, Ming Lei wrote:
>>> On Tue, Nov 26, 2019 at 12:27:50PM +0100, Hannes Reinecke wrote:
>>>> On 11/26/19 12:05 PM, Ming Lei wrote:
>> [ .. ]
>>>>>   From performance viewpoint, all hctx belonging to this request queue should
>>>>> share one scheduler tagset in case of BLK_MQ_F_TAG_HCTX_SHARED, cause
>>>>> driver tag queue depth isn't changed.
>>>>>
>>>> Hmm. Now you get me confused.
>>>> In an earlier mail you said:
>>>>
>>>>> This kind of sharing is wrong, sched tags should be request
>>>>> queue wide instead of tagset wide, and each request queue has
>>>>> its own & independent scheduler queue.
>>>>
>>>> as in v2 we _had_ shared scheduler tags, too.
>>>> Did I misread your comment above?
>>>
>>> Yes, what I meant is that we can't share sched tags in tagset wide.
>>>
>>> Now I mean we should share sched tags among all hctxs in same request
>>> queue, and I believe I have described it clearly.
>>>
>> I wonder if this makes a big difference; in the end, scheduler tags are
>> primarily there to allow the scheduler to queue more requests, and
>> potentially merge them. These tags are later converted into 'real' ones via
>> blk_mq_get_driver_tag(), and only then the resource limitation takes hold.
>> Wouldn't it be sufficient to look at the number of outstanding commands per
>> queue when getting a scheduler tag, and not having to implement yet another
>> bitmap?
> 
> Firstly too much((nr_hw_queues - 1) times) memory is wasted. Secondly IO
> latency could be increased by too deep scheduler queue depth. Finally CPU
> could be wasted in the retrying of running busy hw queue.
> 
> Wrt. driver tags, this patch may be worse, given the average limit for
> each LUN is reduced by (nr_hw_queues) times, see hctx_may_queue().
> 
> Another change is bt_wait_ptr(). Before your patches, there is single
> .wait_index, now the number of .wait_index is changed to nr_hw_queues.
> 
> Also the run queue number is increased a lot in SCSI's IO completion, see
> scsi_end_request().
> 
> Kashyap Desai has performance benchmark on fast megaraid SSD, and you can
> ask him to provide performance data for this patches.

On v2 series (which is effectively same as this one [it would be nice if 
we had per-patch versioning]), for hisi_sas_v3_hw we get about same 
performance as when we use the reply_map, about 3.0M IOPS vs 3.1M IOPS, 
respectively.

Without this, we get 700/800K IOPS. I don't know why the performance is 
so poor without. Only CPU0 serves the completion interrupts, which could 
explain it, but v2 hw can get > 800K IOPS with only 6x SSDs.

Thanks,
John

  reply	other threads:[~2019-11-29  9:21 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26  9:14 [PATCH RFC v3 0/8] blk-mq/scsi: Provide hostwide shared tags for SCSI HBAs Hannes Reinecke
2019-11-26  9:14 ` [PATCH 1/8] blk-mq: Remove some unused function arguments Hannes Reinecke
2019-11-26  9:14 ` [PATCH 2/8] blk-mq: rename BLK_MQ_F_TAG_SHARED as BLK_MQ_F_TAG_QUEUE_SHARED Hannes Reinecke
2019-11-26  9:14 ` [PATCH 3/8] blk-mq: Use a pointer for sbitmap Hannes Reinecke
2019-11-26 15:14   ` Jens Axboe
2019-11-26 16:54     ` John Garry
2019-11-26 17:11       ` Jens Axboe
2019-11-26 17:23         ` John Garry
2019-11-26 17:25           ` Jens Axboe
2019-11-26 18:08             ` John Garry
2019-11-27  1:46               ` Jens Axboe
2019-11-27 13:05                 ` John Garry
2019-11-27 13:12                   ` Hannes Reinecke
2019-11-27 14:20                     ` Jens Axboe
2019-11-27 14:21                   ` Jens Axboe
2019-11-27 14:44                     ` John Garry
2019-11-27 16:52                       ` Hannes Reinecke
2019-11-27 18:02                         ` John Garry
2019-11-26  9:14 ` [PATCH 4/8] blk-mq: Facilitate a shared sbitmap per tagset Hannes Reinecke
2019-11-26 11:05   ` Ming Lei
2019-11-26 11:27     ` Hannes Reinecke
2019-11-26 11:50       ` John Garry
2019-11-26 15:54       ` Ming Lei
2019-11-27 17:02         ` Hannes Reinecke
2019-11-29  0:25           ` Ming Lei
2019-11-29  9:21             ` John Garry [this message]
2019-11-26  9:14 ` [PATCH 5/8] scsi: Add template flag 'host_tagset' Hannes Reinecke
2019-11-26  9:14 ` [PATCH 6/8] scsi: hisi_sas: Switch v3 hw to MQ Hannes Reinecke
2019-11-26  9:14 ` [PATCH 7/8] smartpqi: enable host tagset Hannes Reinecke
2019-11-26  9:14 ` [PATCH 8/8] hpsa: switch to using blk-mq Hannes Reinecke
2019-11-26 10:09 ` [PATCH RFC v3 0/8] blk-mq/scsi: Provide hostwide shared tags for SCSI HBAs John Garry
  -- strict thread matches above, loose matches on Subject: below --
2019-11-26 13:10 [PATCH RFC v4 " Hannes Reinecke
2019-11-26 13:10 ` [PATCH 4/8] blk-mq: Facilitate a shared sbitmap per tagset Hannes Reinecke
2019-11-26 13:59   ` John Garry
2019-11-26 14:10     ` Hannes Reinecke
2019-11-27 17:03   ` 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=83689a0b-59a8-5182-d2cf-57119cba758d@huawei.com \
    --to=john.garry@huawei.com \
    --cc=bvanassche@acm.org \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-scsi@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