Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Roman Bolshakov <r.bolshakov@yadro.com>
To: Daniel Wagner <dwagner@suse.de>
Cc: <martin.petersen@oracle.com>, <linux-scsi@vger.kernel.org>,
	<linux@yadro.com>, Daniel Wagner <daniel.wagner@suse.com>,
	Himanshu Madhani <himanshu.madhani@oracle.com>,
	Quinn Tran <qutran@marvell.com>,
	Nilesh Javali <njavali@marvell.com>, <stable@vger.kernel.org>,
	Aleksandr Volkov <a.y.volkov@yadro.com>,
	Aleksandr Miloserdov <a.miloserdov@yadro.com>
Subject: Re: [PATCH] Revert "scsi: qla2xxx: Limit interrupt vectors to number of CPUs"
Date: Mon, 12 Apr 2021 18:22:26 +0300	[thread overview]
Message-ID: <YHRlsuwSOxEnSWgx@SPB-NB-133.local> (raw)
In-Reply-To: <20210409073645.67e3r5kcsx2ltx32@beryllium.lan>

On Fri, Apr 09, 2021 at 09:36:45AM +0200, Daniel Wagner wrote:
> On Fri, Apr 09, 2021 at 09:17:59AM +0300, Roman Bolshakov wrote:
> >  drivers/scsi/qla2xxx/qla_isr.c | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
> > index 11d6e0db07fe..6641978dfecf 100644
> > --- a/drivers/scsi/qla2xxx/qla_isr.c
> > +++ b/drivers/scsi/qla2xxx/qla_isr.c
> > @@ -3998,12 +3998,10 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp)
> >  	if (USER_CTRL_IRQ(ha) || !ha->mqiobase) {
> >  		/* user wants to control IRQ setting for target mode */
> >  		ret = pci_alloc_irq_vectors(ha->pdev, min_vecs,
> > -		    min((u16)ha->msix_count, (u16)num_online_cpus()),
> > -		    PCI_IRQ_MSIX);
> > +		    ha->msix_count, PCI_IRQ_MSIX);
> >  	} else
> >  		ret = pci_alloc_irq_vectors_affinity(ha->pdev, min_vecs,
> > -		    min((u16)ha->msix_count, (u16)num_online_cpus()),
> > -		    PCI_IRQ_MSIX | PCI_IRQ_AFFINITY,
> > +		    ha->msix_count, PCI_IRQ_MSIX | PCI_IRQ_AFFINITY,
> >  		    &desc);
> 
> 
> Commit message a6dcfe08487e ("scsi: qla2xxx: Limit interrupt vectors to number of
> CPUs") says
> 
>     Driver created too many QPairs(126) with 28xx adapter.  Limit to the number
>     of CPUs to minimize wasted resources.
> 
> I think a simple revert is not taking the resource wasting into
> account. Maybe the min vector calculation just needs a higher lower
> bound. So something stupid like
> 
>   min(msix_cound, num_online_cpus() > 2? num_online_cpus() : 3)
> 
> ?

Hi Daniel,

That would reduce number of Queue Pairs on small-core systems, e.g. 14
HW queues are going to be available on 16-CPU system, even if the HBA
has enough MSI-X vectors for 16 HW queues.

But... min((u16)ha->msix_count, (u16)num_online_cpus() + 3) might
actually do the trick... I'll try that.

Thanks,
Roman

      reply	other threads:[~2021-04-12 15:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-09  6:17 [PATCH] Revert "scsi: qla2xxx: Limit interrupt vectors to number of CPUs" Roman Bolshakov
2021-04-09  7:36 ` Daniel Wagner
2021-04-12 15:22   ` Roman Bolshakov [this message]

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=YHRlsuwSOxEnSWgx@SPB-NB-133.local \
    --to=r.bolshakov@yadro.com \
    --cc=a.miloserdov@yadro.com \
    --cc=a.y.volkov@yadro.com \
    --cc=daniel.wagner@suse.com \
    --cc=dwagner@suse.de \
    --cc=himanshu.madhani@oracle.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@yadro.com \
    --cc=martin.petersen@oracle.com \
    --cc=njavali@marvell.com \
    --cc=qutran@marvell.com \
    --cc=stable@vger.kernel.org \
    /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