All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Kashyap Desai <kashyap.desai@broadcom.com>,
	Christoph Hellwig <hch@lst.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	James Bottomley <james.bottomley@hansenpartnership.com>,
	linux-scsi@vger.kernel.org,
	Sathya Prakash Veerichetty <sathya.prakash@broadcom.com>,
	PDL-MPT-FUSIONLINUX <mpt-fusionlinux.pdl@broadcom.com>,
	Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Subject: Re: [PATCH 00/10] mpt3sas: full mq support
Date: Wed, 1 Feb 2017 08:43:31 +0100	[thread overview]
Message-ID: <3e50cfdc-c330-4241-5ac3-a8f2ef5f77b4@suse.de> (raw)
In-Reply-To: <41a4fdd78121e86e13dc874127b0b956@mail.gmail.com>

On 02/01/2017 08:07 AM, Kashyap Desai wrote:
>> -----Original Message-----
>> From: Hannes Reinecke [mailto:hare@suse.de]
>> Sent: Wednesday, February 01, 2017 12:21 PM
>> To: Kashyap Desai; Christoph Hellwig
>> Cc: Martin K. Petersen; James Bottomley; linux-scsi@vger.kernel.org;
>> Sathya
>> Prakash Veerichetty; PDL-MPT-FUSIONLINUX; Sreekanth Reddy
>> Subject: Re: [PATCH 00/10] mpt3sas: full mq support
>>
>> On 01/31/2017 06:54 PM, Kashyap Desai wrote:
>>>> -----Original Message-----
>>>> From: Hannes Reinecke [mailto:hare@suse.de]
>>>> Sent: Tuesday, January 31, 2017 4:47 PM
>>>> To: Christoph Hellwig
>>>> Cc: Martin K. Petersen; James Bottomley; linux-scsi@vger.kernel.org;
>>> Sathya
>>>> Prakash; Kashyap Desai; mpt-fusionlinux.pdl@broadcom.com
>>>> Subject: Re: [PATCH 00/10] mpt3sas: full mq support
>>>>
>>>> On 01/31/2017 11:02 AM, Christoph Hellwig wrote:
>>>>> On Tue, Jan 31, 2017 at 10:25:50AM +0100, Hannes Reinecke wrote:
>>>>>> Hi all,
>>>>>>
>>>>>> this is a patchset to enable full multiqueue support for the
>>>>>> mpt3sas
>>>> driver.
>>>>>> While the HBA only has a single mailbox register for submitting
>>>>>> commands, it does have individual receive queues per MSI-X
>>>>>> interrupt and as such does benefit from converting it to full
>>>>>> multiqueue
>>> support.
>>>>>
>>>>> Explanation and numbers on why this would be beneficial, please.
>>>>> We should not need multiple submissions queues for a single register
>>>>> to benefit from multiple completion queues.
>>>>>
>>>> Well, the actual throughput very strongly depends on the blk-mq-sched
>>>> patches from Jens.
>>>> As this is barely finished I didn't post any numbers yet.
>>>>
>>>> However:
>>>> With multiqueue support:
>>>> 4k seq read : io=60573MB, bw=1009.2MB/s, iops=258353, runt=
>> 60021msec
>>>> With scsi-mq on 1 queue:
>>>> 4k seq read : io=17369MB, bw=296291KB/s, iops=74072, runt= 60028msec
>>>> So yes, there _is_ a benefit.
>>>>
>>>> (Which is actually quite cool, as these tests were done on a SAS3
>>>> HBA,
>>> so
>>>> we're getting close to the theoretical maximum of 1.2GB/s).
>>>> (Unlike the single-queue case :-)
>>>
>>> Hannes -
>>>
>>> Can you share detail about setup ? How many drives do you have and how
>>> is connection (enclosure -> drives. ??) ?
>>> To me it looks like current mpt3sas driver might be taking more hit in
>>> spinlock operation (penalty on NUMA arch is more compare to single
>>> core
>>> server) unlike we have in megaraid_sas driver use of shared blk tag.
>>>
>> The tests were done with a single LSI SAS3008 connected to a NetApp E-
>> series (2660), using 4 LUNs under MD-RAID0.
>>
>> Megaraid_sas is even worse here; due to the odd nature of the 'fusion'
>> implementation we're ending up having _two_ sets of tags, making it really
>> hard to use scsi-mq here.
>
> Current megaraid_sas as single submission queue exposed to the blk-mq will
> not encounter similar performance issue.
> We may not see significant improvement of performance if we attempt the same
> for megaraid_sas driver.
> We had similar discussion for megaraid_sas and hpsa.
> http://www.spinics.net/lists/linux-scsi/msg101838.html
>
> I am seeing this patch series is similar attempt for mpt3sas..Am I missing
> anything ?
>
No, you don't. That is precisely the case.

The different here is that mpt3sas is actually exposing hardware 
capabilities, whereas with megaraid_sas (and hpsa) we're limited by the 
hardware implementation to a single completion queue shared between HBA 
and OS.
With mpt3sas we're having per-interrupt completion queues (well, for 
newer firmware :-) so we can take advantage of scsi-mq.

(And if someone had done a _proper_ design of the megaraid_sas_fusion 
thing by exposing several submission and completion queues for 
megaraid_sas itself instead of bolting the existing megaraid_sas single 
queue approach ontop of the mpt3sas multiqueue design we could have done 
the same thing there ... sigh)

> Megaraid_sas driver just do indexing from blk_tag and fire IO quick enough
> unlike mpt3sas where we have  lock contention @driver level as bottleneck.
>
>> (Not that I didn't try; but lacking a proper backend it's really hard to
>> evaluate
>> the benefit of those ... spinning HDDs simply don't cut it here)
>>
>>> I mean " [PATCH 08/10] mpt3sas: lockless command submission for scsi-
>> mq"
>>> patch is improving performance removing spinlock overhead and
>>> attempting to get request using blk_tags.
>>> Are you seeing performance improvement  if you hard code nr_hw_queues
>>> = 1 in below code changes part of "[PATCH 10/10] mpt3sas: scsi-mq
>>> interrupt steering"
>>>
>> No. The numbers posted above are generated with exactly that patch; the
>> first line is running with nr_hw_queues=32 and the second line with
>> nr_hw_queues=1.
>
> Thanks Hannes. That clarifies.  Can you share <fio> script you have used ?
>
> If my  understanding correct, you will see theoretical maximum of 1.2GBp/s
> if you restrict your work load to single numa node. This is just for
> understanding if <mpt3sas> driver spinlocks are adding overhead. We have
> seen such overhead on multi-socket server and it is reasonable to reduce
> lock in mpt3sas driver, but only concern is exposing HBA for multiple
> submission queue to blk-mq is really not required and trying to figure out
> if we have any side effect of doing that.
>
Well, the HBA has per-MSIx completion queues, so I don't see any issues 
with exposing them.
blk-mq is designed to handle per-CPU queues, so exposing all hardware 
queues will be beneficial especially in a low-latency context; and as 
the experiments show, even when connected to an external storage there 
is a benefit to be had.

But exposing all queues might even reduce or even resolve your FW Fault 
status 0x2100 state; with that patch you now have each queue pulling 
request off the completion queue and updating the reply post host index 
in parallel, making the situation far more unlikely.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)

  reply	other threads:[~2017-02-01  7:43 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31  9:25 [PATCH 00/10] mpt3sas: full mq support Hannes Reinecke
2017-01-31  9:25 ` [PATCH 01/10] mpt3sas: switch to pci_alloc_irq_vectors Hannes Reinecke
2017-02-07 13:15   ` Christoph Hellwig
2017-02-16  9:32   ` Sreekanth Reddy
2017-02-16 10:01     ` Hannes Reinecke
2017-01-31  9:25 ` [PATCH 02/10] mpt3sas: set default value for cb_idx Hannes Reinecke
2017-02-07 13:15   ` Christoph Hellwig
2017-01-31  9:25 ` [PATCH 03/10] mpt3sas: implement _dechain_st() Hannes Reinecke
2017-02-07 13:15   ` Christoph Hellwig
2017-02-07 13:18     ` Hannes Reinecke
2017-01-31  9:25 ` [PATCH 04/10] mpt3sas: separate out _base_recovery_check() Hannes Reinecke
2017-02-07 13:16   ` Christoph Hellwig
2017-02-16  9:53   ` Sreekanth Reddy
2017-02-16 10:03     ` Hannes Reinecke
2017-01-31  9:25 ` [PATCH 05/10] mpt3sas: open-code _scsih_scsi_lookup_get() Hannes Reinecke
2017-02-07 13:16   ` Christoph Hellwig
2017-02-16  9:59   ` Sreekanth Reddy
2017-02-16 10:04     ` Hannes Reinecke
2017-01-31  9:25 ` [PATCH 06/10] mpt3sas: Introduce mpt3sas_get_st_from_smid() Hannes Reinecke
2017-02-07 13:17   ` Christoph Hellwig
2017-01-31  9:25 ` [PATCH 07/10] mpt3sas: use hi-priority queue for TMFs Hannes Reinecke
2017-02-07 13:19   ` Christoph Hellwig
2017-02-16 10:09   ` Sreekanth Reddy
2017-02-16 10:14     ` Hannes Reinecke
2017-02-16 10:23       ` Sreekanth Reddy
2017-02-16 10:26         ` Hannes Reinecke
2017-01-31  9:25 ` [PATCH 08/10] mpt3sas: lockless command submission for scsi-mq Hannes Reinecke
2017-01-31 13:22   ` Christoph Hellwig
2017-01-31 13:46     ` Hannes Reinecke
2017-01-31 14:24       ` Christoph Hellwig
2017-01-31  9:25 ` [PATCH 09/10] mpt3sas: Use 'msix_index' as argument for put_smid functions Hannes Reinecke
2017-01-31  9:26 ` [PATCH 10/10] mpt3sas: scsi-mq interrupt steering Hannes Reinecke
2017-01-31 10:05   ` Christoph Hellwig
2017-01-31 10:02 ` [PATCH 00/10] mpt3sas: full mq support Christoph Hellwig
2017-01-31 11:16   ` Hannes Reinecke
2017-01-31 17:54     ` Kashyap Desai
2017-02-01  6:51       ` Hannes Reinecke
2017-02-01  7:07         ` Kashyap Desai
2017-02-01  7:43           ` Hannes Reinecke [this message]
2017-02-09 13:03             ` Sreekanth Reddy
2017-02-09 13:12               ` Hannes Reinecke
2017-02-10  4:43                 ` Sreekanth Reddy
2017-02-10  6:59                   ` Hannes Reinecke
2017-02-13  6:15                     ` Sreekanth Reddy
2017-02-13 13:11                       ` Hannes Reinecke
2017-02-15  8:27                         ` Sreekanth Reddy
2017-02-15  9:18                           ` Kashyap Desai
2017-02-15 10:05                             ` Hannes Reinecke
2017-02-16  9:48                               ` Kashyap Desai
2017-02-16 10:18                                 ` Hannes Reinecke
2017-02-16 10:45                                   ` Kashyap Desai
2017-02-07 13:19 ` Christoph Hellwig
2017-02-07 14:38   ` Hannes Reinecke
2017-02-07 15:34     ` Christoph Hellwig
2017-02-07 15:39       ` Hannes Reinecke
2017-02-07 15:40         ` Christoph Hellwig
2017-02-07 15:49           ` Hannes Reinecke
2017-02-15  8:15   ` Christoph Hellwig
2017-02-15  8:19     ` Hannes Reinecke

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=3e50cfdc-c330-4241-5ac3-a8f2ef5f77b4@suse.de \
    --to=hare@suse.de \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mpt-fusionlinux.pdl@broadcom.com \
    --cc=sathya.prakash@broadcom.com \
    --cc=sreekanth.reddy@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.