RE: [PATCH] hpsa: add module parameter to disable irq affinity

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

 



-----Original Message-----
From: Hannes Reinecke [mailto:hare@xxxxxxx] 
Sent: Tuesday, December 18, 2018 1:57 AM
To: Don Brace <don.brace@xxxxxxxxxxxxx>; Kevin Barnett - C33748 <Kevin.Barnett@xxxxxxxxxxxxx>; Scott Teel - C33730 <Scott.Teel@xxxxxxxxxxxxx>; Justin Lindley - C33718 <Justin.Lindley@xxxxxxxxxxxxx>; Scott Benesh - C33703 <Scott.Benesh@xxxxxxxxxxxxx>; bader.alisaleh@xxxxxxxxxxxxx; Gerry Morong - C33720 <Gerry.Morong@xxxxxxxxxxxxx>; Mahesh Rajashekhara - I30583 <Mahesh.Rajashekhara@xxxxxxxxxxxxx>; hch@xxxxxxxxxxxxx; jejb@xxxxxxxxxxxxxxxxxx; joseph.szczypek@xxxxxxx; POSWALD@xxxxxxxx; shunyong.yang@xxxxxxxxxxxxxxxx
Cc: linux-scsi@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] hpsa: add module parameter to disable irq affinity

EXTERNAL EMAIL


On 12/3/18 11:35 PM, Don Brace wrote:
> The PCI_IRQ_AFFINITY flag prevents customers from changing the 
> smp_affinity and smp_affinity_list entries.
>
> - add a module parameter to allow this flag to be turned
>    off.
>
> - to turn off PCI_IRQ_AFFINITY:
>    flag hpsa_disable_irq_affinity=1
>
> Reviewed-by: David Carroll <david.carroll@xxxxxxxxxxxxx>
> Reviewed-by: Scott Teel <scott.teel@xxxxxxxxxxxxx>
> Signed-off-by: Don Brace <don.brace@xxxxxxxxxxxxx>
> ---
>   drivers/scsi/hpsa.c |   13 ++++++++++---
>   1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 
> c9cccf35e9d7..0aa5aa66151f 100644
> --- a/drivers/scsi/hpsa.c
> +++ b/drivers/scsi/hpsa.c
> @@ -87,6 +87,10 @@ static int hpsa_simple_mode;
>   module_param(hpsa_simple_mode, int, S_IRUGO|S_IWUSR);
>   MODULE_PARM_DESC(hpsa_simple_mode,
>       "Use 'simple mode' rather than 'performant mode'");
> +static bool hpsa_disable_irq_affinity; 
> +module_param(hpsa_disable_irq_affinity, bool, S_IRUGO|S_IWUSR); 
> +MODULE_PARM_DESC(hpsa_disable_irq_affinity,
> +     "Turn off managed irq affinity. Allows smp_affinity to be 
> +changed.");
>
>   /* define the PCI info for the cards we can control */
>   static const struct pci_device_id hpsa_pci_device_id[] = { @@ 
> -7389,7 +7393,7 @@ static void hpsa_setup_reply_map(struct ctlr_info *h)
>    */
>   static int hpsa_interrupt_mode(struct ctlr_info *h)
>   {
> -     unsigned int flags = PCI_IRQ_LEGACY;
> +     unsigned int flags;
>       int ret;
>
>       /* Some boards advertise MSI but don't really support it */ @@ 
> -7400,17 +7404,20 @@ static int hpsa_interrupt_mode(struct ctlr_info *h)
>       case 0x40830E11:
>               break;
>       default:
> +             flags = PCI_IRQ_MSIX;
> +             if (!hpsa_disable_irq_affinity)
> +                     flags |= PCI_IRQ_AFFINITY;
>               ret = pci_alloc_irq_vectors(h->pdev, 1, MAX_REPLY_QUEUES,
> -                             PCI_IRQ_MSIX | PCI_IRQ_AFFINITY);
> +                             flags);
>               if (ret > 0) {
>                       h->msix_vectors = ret;
>                       return 0;
>               }
>
> -             flags |= PCI_IRQ_MSI;
>               break;
>       }
>
> +     flags = PCI_IRQ_LEGACY | PCI_IRQ_MSI;
>       ret = pci_alloc_irq_vectors(h->pdev, 1, 1, flags);
>       if (ret < 0)
>               return ret;
>
That completely breaks multiqueue.
You sure about this?
What is the intention here?

Cheers,

Hannes

This patch is a result of some customers complaining that they cannot
alter the smp_affinity* entries for hpsa because the vectors are managed.

The message is: write error: Input/output error

I added the module parameter to allow them to turn off the affinity flag
so they can set the mask to whatever they want, but leaves the default
behavior in-place.

Is there a better method?

--
Dr. Hannes Reinecke                Teamlead Storage & Networking
hare@xxxxxxx                                   +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)




[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