Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Brian King <brking@linux.vnet.ibm.com>
To: wenxiong@linux.vnet.ibm.com, linux-scsi@vger.kernel.org
Cc: JBottomley@Odin.com, martin.petersen@oracle.com,
	krisman@linux.vnet.ibm.com
Subject: Re: [PATCH 3/3] ipr: Add scsi multi-queue support
Date: Tue, 12 Jul 2016 16:59:04 -0500	[thread overview]
Message-ID: <57856828.3020107@linux.vnet.ibm.com> (raw)
In-Reply-To: <1468357329-3790-3-git-send-email-wenxiong@linux.vnet.ibm.com>

On 07/12/2016 04:02 PM, wenxiong@linux.vnet.ibm.com wrote:
> From: Wen Xiong <wenxiong@linux.vnet.ibm.com>
> 
> Add scsi multi-queue support in ipr driver. This feature
> is enabled by setting ipr_use_blk_mq=1 when loading ipr
> module and scsi blk-mq is enabled in the kernel.
> 
> Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
> ---
>  drivers/scsi/ipr.c |   16 ++++++++++++++--
>  drivers/scsi/ipr.h |    1 +
>  2 files changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
> index 1f539c2..21b6da6 100644
> --- a/drivers/scsi/ipr.c
> +++ b/drivers/scsi/ipr.c
> @@ -100,6 +100,7 @@ static unsigned int ipr_max_devs = IPR_DEFAULT_SIS64_DEVS;
>  static unsigned int ipr_dual_ioa_raid = 1;
>  static unsigned int ipr_number_of_msix = 16;
>  static unsigned int ipr_fast_reboot;
> +static unsigned int ipr_use_blk_mq = 0;

No need to initialize a static to 0. Can you be sure to run scripts/checkpatch.pl
in future? 


> @@ -6329,7 +6333,12 @@ static int ipr_queuecommand(struct Scsi_Host *shost,
>  		return rc;
>  	}
> 
> -	hrrq_id = ipr_get_hrrq_index(ioa_cfg);
> +	if (ioa_cfg->use_blk_mq && shost_use_blk_mq(scsi_cmd->device->host)) {
> +		tag = blk_mq_unique_tag(scsi_cmd->request);
> +		hrrq_id = blk_mq_unique_tag_to_hwq(tag);
> +	} else
> +		hrrq_id = ipr_get_hrrq_index(ioa_cfg);
> +
>  	hrrq = &ioa_cfg->hrrq[hrrq_id];
> 
>  	spin_lock_irqsave(hrrq->lock, hrrq_flags);
> @@ -10144,6 +10153,8 @@ static int ipr_probe_ioa(struct pci_dev *pdev,
>  				(unsigned int)num_online_cpus(),
>  				(unsigned int)IPR_MAX_HRRQ_NUM);
> 
> +	host->nr_hw_queues = ioa_cfg->hrrq_num;

Prior to this patch we reserved HRRQ 0 for error interrupts. This changes that
to use it also for normal I/O interrupts. One side effect of this is that we
can now no longer use iopoll for HRRQ 0. It would be nice to not change this
behavior and keep using HRRQ 0 for errors only, since we have an MMIO read
in that path we wanted to avoid in the normal I/O path.

I think if we just change the line above to:

host->nr_hw_queues = ioa_cfg->hrrq_num - 1;

Then this should resolve this. Can you verify this doesn't break anything?

Thanks,

Brian

-- 
Brian King
Power Linux I/O
IBM Linux Technology Center


  reply	other threads:[~2016-07-12 21:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12 21:02 [PATCH 1/3] ipr: Add new CCIN for new adapters support wenxiong
2016-07-12 21:02 ` [PATCH 2/3] ipr: Increase MSIX vectors number wenxiong
2016-07-12 21:44   ` Gabriel Krisman Bertazi
2016-07-12 22:00   ` Brian King
2016-07-12 21:02 ` [PATCH 3/3] ipr: Add scsi multi-queue support wenxiong
2016-07-12 21:59   ` Brian King [this message]
2016-07-13  0:55   ` Christoph Hellwig
2016-07-12 21:43 ` [PATCH 1/3] ipr: Add new CCIN for new adapters support Gabriel Krisman Bertazi
2016-07-12 22:00 ` Brian King
2016-07-14  2:43 ` Martin K. Petersen

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=57856828.3020107@linux.vnet.ibm.com \
    --to=brking@linux.vnet.ibm.com \
    --cc=JBottomley@Odin.com \
    --cc=krisman@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=wenxiong@linux.vnet.ibm.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