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: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)

?



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux