On Thu, Jan 10, 2019 at 5:05 AM <[email protected]> wrote:
>
> -----Original Message-----
> Subject: Re: [PATCH] hpsa: add module parameter to disable irq affinity
>
> On 1/8/19 10:16 PM, [email protected] wrote:
> > 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 <[email protected]>
> >> Reviewed-by: Scott Teel <[email protected]>
> >> Signed-off-by: Don Brace <[email protected]>
> >> ---
> >>    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.");
> >>
> >
> > Is there a better method?
> >
> Shouldn't we rather figure out what is triggering the I/O error?
> Have you checked that we're not running into the issue discussed in the 
> thread 'scsi: hpsa: fix selection of reply queue' ?
>
> Cheers,
>
> Hannes
> --
> Dr. Hannes Reinecke                Teamlead Storage & Networking
> [email protected]                                   +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)
> ---
> The issue is that in kernel/irq/proc.c function write_irq_affinity there is a 
> check to see if the
> affinity can be changed. This fails with -EIO because interrupts are managed.

That is expected behavior for managed IRQ.

> There are customers who want to be able to change affinity for application 
> performance reasons.

Could you give examples in which customized affinity may improve
application performance.

> Note that there are other drivers which also unset the PCI_IRQ_AFFINITY flag 
> for similar reasons.

Any SCSI drivers which unset  PCI_IRQ_AFFINITY may break blk-mq.

Thanks,
Ming Lei

Reply via email to