public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Sumit Saxena <sumit.saxena@avagotech.com>
To: Andy Lutomirski <luto@amacapital.net>,
	Christoph Hellwig <hch@infradead.org>
Cc: Kashyap Desai <kashyap.desai@avagotech.com>,
	Uday Lingala <uday.lingala@avagotech.com>,
	"PDL,MEGARAIDLINUX" <megaraidlinux.pdl@avagotech.com>,
	Linux SCSI List <linux-scsi@vger.kernel.org>
Subject: RE: smp_processor_id warning in megasas driver on 3.19.3
Date: Wed, 15 Apr 2015 21:39:18 +0530	[thread overview]
Message-ID: <305f00cee981e538352606afeaf23743@mail.gmail.com> (raw)
In-Reply-To: <CALCETrU2E3=mrf4MYTKs5GgKzjkQCHsF00bwi8U3BfKbk4SBmg@mail.gmail.com>

>-----Original Message-----
>From: Andy Lutomirski [mailto:luto@amacapital.net]
>Sent: Thursday, April 09, 2015 12:45 AM
>To: Christoph Hellwig
>Cc: Kashyap Desai; Sumit Saxena; Uday Lingala;
>megaraidlinux.pdl@avagotech.com; 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@infradead.org>
>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@avagotech.com>

>
>Tested-by: Andy Lutomirski <luto@kernel.org>
>
>--Andy
>
>--
>Andy Lutomirski
>AMA Capital Management, LLC

  reply	other threads:[~2015-04-15 16:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 17:59 smp_processor_id warning in megasas driver on 3.19.3 Andy Lutomirski
2015-04-08 18:17 ` James Bottomley
2015-04-08 18:26   ` Andy Lutomirski
2015-04-08 18:29     ` James Bottomley
2015-04-08 18:55     ` Elliott, Robert (Server Storage)
2015-04-08 18:51 ` Christoph Hellwig
2015-04-08 19:14   ` Andy Lutomirski
2015-04-15 16:09     ` Sumit Saxena [this message]
2015-04-15 16:44 ` [PATCH] megaraid_sas: use raw_smp_processor_id() Christoph Hellwig
2015-04-15 20:22   ` Andy Lutomirski
2015-04-21 10:15   ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=305f00cee981e538352606afeaf23743@mail.gmail.com \
    --to=sumit.saxena@avagotech.com \
    --cc=hch@infradead.org \
    --cc=kashyap.desai@avagotech.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=megaraidlinux.pdl@avagotech.com \
    --cc=uday.lingala@avagotech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox