From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Kashyap Desai <kashyap.desai@avagotech.com>,
Sumit Saxena <sumit.saxena@avagotech.com>,
Uday Lingala <uday.lingala@avagotech.com>,
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, 08 Apr 2015 11:29:18 -0700 [thread overview]
Message-ID: <1428517758.2224.38.camel@HansenPartnership.com> (raw)
In-Reply-To: <CALCETrUbOrUnu8zp_yfQj_vG7EZeo7rSw8XJXcmhNxD-gQRxRw@mail.gmail.com>
On Wed, 2015-04-08 at 11:26 -0700, Andy Lutomirski wrote:
> On Wed, Apr 8, 2015 at 11:17 AM, James Bottomley
> <James.Bottomley@hansenpartnership.com> wrote:
> > On Wed, 2015-04-08 at 10:59 -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.
> >
> > It's not a regression. Likely someone turned on additional warnings.
> > So the problem is that the warning is incorrect: the use of
> > smp_processor_id() isn't pre-empt unsafe. The driver is using it as a
> > hint as to which queue it should be using, so it doesn't matter if
> > pre-empt schedules the driver thread away from that CPU.
>
> The warning goes a long way back. For example, this change from 2005
> seems to have refactored it:
>
> commit 39c715b71740c4a78ba4769fb54826929bac03cb
> Author: Ingo Molnar <mingo@elte.hu>
> Date: Tue Jun 21 17:14:34 2005 -0700
>
> [PATCH] smp_processor_id() cleanup
>
>
> >
> > I presume the warning is because whoever added it thinks that you should
> > be using the get/put cpu API, which would be wholly inappropriate here
> > because we don't want to bind the thread, we just want a hint about the
> > queue.
>
> Would raw_smp_processor_id be a good compromise? I'm testing a patch
> right now and, if it works, I can send it and cc stable.
Anything that doesn't dump the warning would be fine. Of course, the
current queue selection
smp_processor_id() % instance->msix_vectors
Is a bit suboptimal anyway, so perhaps avago would like to fix it more
elegantly.
James
next prev parent reply other threads:[~2015-04-08 18:29 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 [this message]
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
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=1428517758.2224.38.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=kashyap.desai@avagotech.com \
--cc=linux-scsi@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=megaraidlinux.pdl@avagotech.com \
--cc=sumit.saxena@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