Re: [PATCH] Revert "scsi: qla2xxx: Limit interrupt vectors to number of CPUs"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux