RE: smp_processor_id warning in megasas driver on 3.19.3

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

 



>-----Original Message-----
>From: Andy Lutomirski [mailto:luto@xxxxxxxxxxxxxx]
>Sent: Thursday, April 09, 2015 12:45 AM
>To: Christoph Hellwig
>Cc: Kashyap Desai; Sumit Saxena; Uday Lingala;
>megaraidlinux.pdl@xxxxxxxxxxxxx; Linux SCSI List
>Subject: Re: smp_processor_id warning in megasas driver on 3.19.3
>
>On Wed, Apr 8, 2015 at 11:51 AM, Christoph Hellwig <hch@xxxxxxxxxxxxx>
>wrote:
>> On Wed, Apr 08, 2015 at 10:59:36AM -0700, Andy Lutomirski wrote:
>>> This is a regression somewhere between 3.15 and 3.19.3.  Let me know
>>> if more diagnostics would be helpful.
>>
>> Try this patch:
>>
>> diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c
>> b/drivers/scsi/megaraid/megaraid_sas_fusion.c
>> index 675b5e7..5a0800d 100644
>> --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
>> +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
>> @@ -1584,11 +1584,11 @@ megasas_build_ldio_fusion(struct
>megasas_instance *instance,
>>                         fp_possible = io_info.fpOkForIo;
>>         }
>>
>> -       /* Use smp_processor_id() for now until cmd->request->cpu is CPU
>> +       /* Use raw_smp_processor_id() for now until cmd->request->cpu
>> + is CPU
>>            id by default, not CPU group id, otherwise all MSI-X queues
>> won't
>>            be utilized */
>>         cmd->request_desc->SCSIIO.MSIxIndex = instance->msix_vectors ?
>> -               smp_processor_id() % instance->msix_vectors : 0;
>> +               raw_smp_processor_id() % instance->msix_vectors : 0;
>>
>>         if (fp_possible) {
>>                 megasas_set_pd_lba(io_request, scp->cmd_len, &io_info,
>> scp, @@ -1693,7 +1693,10 @@ megasas_build_dcdb_fusion(struct
>megasas_instance *instance,
>>                         << MR_RAID_CTX_RAID_FLAGS_IO_SUB_TYPE_SHIFT;
>>                 cmd->request_desc->SCSIIO.DevHandle =
>> io_request->DevHandle;
>>                 cmd->request_desc->SCSIIO.MSIxIndex =
>> -                       instance->msix_vectors ? smp_processor_id() %
>> instance-
>>msix_vectors : 0;
>> +                       instance->msix_vectors ?
>> +                               raw_smp_processor_id() %
>> +                                       instance->msix_vectors :
>> +                               0;
>>                 os_timeout_value = scmd->request->timeout / HZ;
>>
>>                 if (instance->secure_jbod_support &&
>
>I wrote an effectively identical patch (differed in whitespace and
>formatting),
>and it seems to work.


Acked-by: Sumit Saxena <sumit.saxena@xxxxxxxxxxxxx>

>
>Tested-by: Andy Lutomirski <luto@xxxxxxxxxx>
>
>--Andy
>
>--
>Andy Lutomirski
>AMA Capital Management, LLC
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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