From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: nicolas.dichtel@6wind.com, netdev@vger.kernel.org,
opurdila@ixiacom.com, bcrl@kvack.org
Subject: Re: [PATCH] net: use rcu_barrier() in rollback_registered_many
Date: Tue, 14 Sep 2010 14:27:49 -0700 (PDT) [thread overview]
Message-ID: <20100914.142749.55853240.davem@davemloft.net> (raw)
In-Reply-To: <1284416694.2627.89.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 14 Sep 2010 00:24:54 +0200
> [PATCH] net: use rcu_barrier() in rollback_registered_many
>
> netdev_wait_allrefs() waits that all references to a device vanishes.
>
> It currently uses a _very_ pessimistic 250 ms delay between each probe.
> Some users reported that no more than 4 devices can be dismantled per
> second, this is a pretty serious problem for some setups.
>
> Most of the time, a refcount is about to be released by an RCU callback,
> that is still in flight because rollback_registered_many() uses a
> synchronize_rcu() call instead of rcu_barrier(). Problem is visible if
> number of online cpus is one, because synchronize_rcu() is then a no op.
>
> time to remove 50 ipip tunnels on a UP machine :
>
> before patch : real 11.910s
> after patch : real 1.250s
>
> Reported-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> Reported-by: Octavian Purdila <opurdila@ixiacom.com>
> Reported-by: Benjamin LaHaise <bcrl@kvack.org>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied, thanks Eric.
prev parent reply other threads:[~2010-09-14 21:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-10 13:35 [RFC PATCH] ipv4: release dev refcnt early when destroying inetdev Nicolas Dichtel
2010-09-10 14:24 ` Eric Dumazet
2010-09-10 14:57 ` Nicolas Dichtel
2010-09-10 15:16 ` Eric Dumazet
2010-09-14 20:45 ` David Miller
2010-09-15 6:01 ` Eric Dumazet
2010-09-13 22:24 ` [PATCH] net: use rcu_barrier() in rollback_registered_many Eric Dumazet
2010-09-14 21:27 ` David Miller [this message]
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=20100914.142749.55853240.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bcrl@kvack.org \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=opurdila@ixiacom.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;
as well as URLs for NNTP newsgroup(s).