[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-scsi
Subject: Re: [PATCH 11/15] megaraid_sas: Set device queue_depth same as HBA can_queue value in scsi-mq mode
From: Hannes Reinecke <hare () suse ! de>
Date: 2017-06-30 13:39:46
Message-ID: 40da55a6-77c5-340d-17cd-fae3c6f4c097 () suse ! de
[Download RAW message or body]
On 06/30/2017 10:30 AM, Shivasharan S wrote:
> Currently driver sets default queue_depth for VDs at 256 and JBODs based on interface type,
> ie., for SAS JBOD QD will be 64, for SATA JBOD QD will be 32.
> During performance runs with scsi-mq enabled, we are seeing better results by
> setting QD same as HBA queue_depth.
>
> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
> Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
> ---
> drivers/scsi/megaraid/megaraid_sas_base.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
> index 0230929..c200f1a 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -1891,7 +1891,8 @@ static void megasas_set_static_target_properties(struct scsi_device *sdev,
> if (instance->nvme_page_size && max_io_size_kb)
> megasas_set_nvme_device_properties(sdev, (max_io_size_kb << 10));
>
> - scsi_change_queue_depth(sdev, device_qd);
> + if (!shost_use_blk_mq(sdev->host))
> + scsi_change_queue_depth(sdev, device_qd);
>
> }
>
> @@ -5914,6 +5915,9 @@ static int megasas_io_attach(struct megasas_instance *instance)
> host->max_lun = MEGASAS_MAX_LUN;
> host->max_cmd_len = 16;
>
> + if (shost_use_blk_mq(host))
> + host->cmd_per_lun = host->can_queue;
> +
> /*
> * Notify the mid-layer about the new controller
> */
>
Is this bit really necessary? It will be adjusted by the above hunk,
would it not?
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic