From: Cong Wang <amwang@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org,
Stephen Hemminger <stephen@networkplumber.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [Patch net-next v3 3/3] igmp: convert RTNL lock to a spinlock
Date: Thu, 06 Jun 2013 10:50:18 +0800 [thread overview]
Message-ID: <1370487018.31875.12.camel@cr0> (raw)
In-Reply-To: <1370486400.24311.316.camel@edumazet-glaptop>
On Wed, 2013-06-05 at 19:40 -0700, Eric Dumazet wrote:
> On Thu, 2013-06-06 at 10:20 +0800, Cong Wang wrote:
> > From: Cong Wang <amwang@redhat.com>
> >
> > It is not necessary to hold RTNL lock to protect mc_list,
> > at least IPv6 mcast is using a local spinlock, IPv4 can do
> > this too. This patch converts RTNL lock+RCU to spinlock+RCU.
> >
>
> Why are you doing this ?
RTNL is becoming another big kernel lock, we should not hold it unless
we have to, right?
>
> Really, holding a spinlock in this code instead of a mutex brings all
> kind of problems.
>
> For example, you have to use GFP_ATOMIC allocations instead of
> GFP_KERNEL
>
> Not counting the race/bug you added in ip_mc_join_group()
>
Maybe I should replace the spinlock with a mutex?
next prev parent reply other threads:[~2013-06-06 2:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-06 2:20 [Patch net-next v3 1/3] igmp: fix return value of some functions Cong Wang
2013-06-06 2:20 ` [Patch net-next v3 2/3] ipv6,mcast: " Cong Wang
2013-06-06 2:20 ` [Patch net-next v3 3/3] igmp: convert RTNL lock to a spinlock Cong Wang
2013-06-06 2:40 ` Eric Dumazet
2013-06-06 2:50 ` Cong Wang [this message]
2013-06-06 20:16 ` [Patch net-next v3 1/3] igmp: fix return value of some functions David Stevens
2013-06-08 10:56 ` Cong Wang
2013-06-09 2:12 ` David Stevens
2013-06-10 3:07 ` Cong Wang
2013-06-10 3:09 ` Cong Wang
2013-06-10 13:00 ` David Stevens
2013-06-13 8:44 ` Cong Wang
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=1370487018.31875.12.camel@cr0 \
--to=amwang@redhat.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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).