From: Thomas Graf <tgraf@suug.ch>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, daniel@iogearbox.net
Subject: Re: [PATCH 2/3 net-next] rhashtable: Use spin_lock_bh_nested() consistently
Date: Mon, 16 Mar 2015 08:44:10 +0000 [thread overview]
Message-ID: <20150316084410.GB10896@casper.infradead.org> (raw)
In-Reply-To: <20150314022118.GB10086@gondor.apana.org.au>
On 03/14/15 at 01:21pm, Herbert Xu wrote:
> On Fri, Mar 13, 2015 at 12:54:11PM -0400, David Miller wrote:
> > From: Thomas Graf <tgraf@suug.ch>
> > Date: Fri, 13 Mar 2015 15:45:20 +0100
> >
> > > No change in behaviour as the outer lock already disables softirq
> > > but it prevents bugs down the line as this lock logically requires
> > > the BH variant.
> > >
> > > Signed-off-by: Thomas Graf <tgraf@suug.ch>
> >
> > I would prefer you don't do this.
OK, I'm dropping this patch.
> > x_bh() may be relatively cheap, but it is not zero cost.
> >
> > If there is an invariant that when we are called here BH
> > is disabled, make it explicit.
I assume you are referring to the preempt disabled case. Fair enough.
> Agreed. I dropped the _bh precisely for this reason when I did
> the arbitrary rehash. Please don't add it back because it serves
> zero purpose. Only the outside lock should do _bh while the
> nested one should not.
A note in the commit would have helped, it looked like an
accidental change.
next prev parent reply other threads:[~2015-03-16 8:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 14:45 [PATCH 0/3 net-next] Minor rhashtable fixes Thomas Graf
2015-03-13 14:45 ` [PATCH 1/3 net-next] rhashtable: Avoid calculating hash again to unlock Thomas Graf
2015-03-14 2:20 ` Herbert Xu
2015-03-13 14:45 ` [PATCH 2/3 net-next] rhashtable: Use spin_lock_bh_nested() consistently Thomas Graf
2015-03-13 16:54 ` David Miller
2015-03-14 2:21 ` Herbert Xu
2015-03-16 8:44 ` Thomas Graf [this message]
2015-03-13 14:45 ` [PATCH 3/3 net-next] rhashtable: Annotate RCU locking of walkers Thomas Graf
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=20150316084410.GB10896@casper.infradead.org \
--to=tgraf@suug.ch \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).