From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"Alexandre FOURNIER" <alexandre.fournier@wisp-e.com>,
"Ezequiel Garcia" <ezequiel.garcia@free-electrons.com>,
"Marcin Wojtas" <mw@semihalf.com>,
"Gregory Clément" <gregory.clement@free-electrons.com>
Subject: Re: RCU stall in af_unix.c, should use spin_lock_irqsave?
Date: Tue, 21 Oct 2014 13:58:20 +0200 [thread overview]
Message-ID: <20141021135820.3664bdeb@free-electrons.com> (raw)
In-Reply-To: <1413887300.23173.14.camel@edumazet-glaptop2.roam.corp.google.com>
Dear Eric Dumazet,
On Tue, 21 Oct 2014 03:28:20 -0700, Eric Dumazet wrote:
> > Ok. So it's actually safe to mix spin_lock() and spin_lock_irqsave() on
> > the same lock, if you know that this lock will never ever be taken in
> > an interrupt context?
>
> Sure.
Ok, thanks.
> > > mvpp2 is seriously brain damaged : on_each_cpu() cannot be used from
> > > a bottom half handler.
> >
> > That's what I thought. Back to the drawing board then, to fix mvpp2.
> >
> > Do you think there is a place where we can write down those
> > assumptions? It isn't easy to spot whether on_each_cpu() is safe to use
> > in a bottom half or not.
> >
>
> Really ? kernel/smp.c is full of comments.
>
> Too many comments and people seem to not read them ;)
>
> Take a look at smp_call_function(), which is called from on_each_cpu()
Indeed, it's written black on white on smp_call_function(). I guess
we'll have to dig into the details of the mvpp2 hardware and its
per-CPU registers and see how to handle things properly.
Thanks a lot for your input!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2014-10-21 11:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-21 8:03 RCU stall in af_unix.c, should use spin_lock_irqsave? Thomas Petazzoni
2014-10-21 10:04 ` Eric Dumazet
2014-10-21 10:10 ` Thomas Petazzoni
2014-10-21 10:28 ` Eric Dumazet
2014-10-21 11:58 ` Thomas Petazzoni [this message]
2014-10-21 10:08 ` Hannes Frederic Sowa
2014-10-21 10:13 ` Thomas Petazzoni
[not found] <6E9AD71A-9E19-437F-A94B-D8B267F533EA@opengear.com>
2015-06-16 9:19 ` Thomas Petazzoni
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=20141021135820.3664bdeb@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=alexandre.fournier@wisp-e.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=ezequiel.garcia@free-electrons.com \
--cc=gregory.clement@free-electrons.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mw@semihalf.com \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.