netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Alex Bligh <alex@alex.org.uk>,
	netdev@vger.kernel.org, Jesse Gross <jesse@nicira.com>
Subject: Re: Scalability of interface creation and deletion
Date: Mon, 9 May 2011 00:11:15 -0700	[thread overview]
Message-ID: <20110509071114.GA2608@linux.vnet.ibm.com> (raw)
In-Reply-To: <1304888447.3207.66.camel@edumazet-laptop>

On Sun, May 08, 2011 at 11:00:47PM +0200, Eric Dumazet wrote:
> Le dimanche 08 mai 2011 à 08:48 -0700, Paul E. McKenney a écrit :
> > On Sun, May 08, 2011 at 04:17:42PM +0100, Alex Bligh wrote:
> > > 
> > > If 6 jiffies per call to ensure cpus are idle is a fact of life,
> > > then the question goes back to why interface removal is waiting
> > > for rcu readers to be released synchronously, as opposed to
> > > doing the update bits synchronously, then doing the reclaim
> > > element (freeing the memory) afterwards using call_rcu.
> > 
> > This would speed things up considerably, assuming that there is no
> > other reason to block for an RCU grace period.
> 
> Thats not so simple... Things are modular and better be safe than crash,
> on a very rare event (device dismantles are not the thing we expect to
> do very often. Only special needs might need to perform hundred of them
> per minute...)

I was afraid of that, but had to ask...

> For example, in the VLAN dismantle phase (ip link del eth0.103)
> we have 3 calls to synchronize_rcu() and one call to rcu_barrier()
> 
> [ the 'extra' synchronize_rcu() call comes from unregister_vlan_dev() ]
> 
> Maybe with new VLAN model, we could now remove this synchronize_net()
> call from vlan code. Jesse what do you think ?
> Once vlan_group_set_device(grp, vlan_id, NULL) had been called, why
> should we respect one rcu grace period at all, given dev is queued to
> unregister_netdevice_queue() [ which has its own couples of
> synchronize_net() / rcu_barrier() ]
> 
> 
> The real scalability problem of device dismantles comes from the fact
> that all these waits are done under RTNL mutex. This is the real killer
> because you cannot use your eight cpus, even if you are willing to.
> 
> We can probably speed things, but we should consider the following user
> actions :
> 
> ip link add link eth0 vlan103 type vlan id 103
> ip link del vlan103
> ip link add link eth1 vlan103 type vlan id 103
> 
> The "link del" command should return to user only if the minimum things
> had been done, to make sure the following "link add" wont fail
> mysteriously.

Hmmm...  One approach would be to use synchronize_rcu_expedited(), though
that is a bit of a big hammer.

							Thanx, Paul

  parent reply	other threads:[~2011-05-09  7:11 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-07 11:08 Scalability of interface creation and deletion Alex Bligh
2011-05-07 12:22 ` Eric Dumazet
2011-05-07 15:26   ` Alex Bligh
2011-05-07 15:54     ` Eric Dumazet
2011-05-07 16:23       ` Ben Greear
2011-05-07 16:37         ` Eric Dumazet
2011-05-07 16:44           ` Ben Greear
2011-05-07 16:51             ` Eric Dumazet
2011-05-08  3:45               ` Ben Greear
2011-05-08  8:08                 ` Alex Bligh
2011-05-09 21:46       ` Octavian Purdila
2011-05-07 16:26     ` Eric Dumazet
2011-05-07 18:24       ` Alex Bligh
2011-05-07 18:32         ` Eric Dumazet
2011-05-07 18:39           ` Eric Dumazet
2011-05-08 10:09             ` Alex Bligh
2011-05-07 18:42           ` Eric Dumazet
2011-05-07 18:50             ` Alex Bligh
2011-05-08  7:12             ` Eric Dumazet
2011-05-08  8:06               ` Alex Bligh
2011-05-08  9:35               ` Alex Bligh
2011-05-08 12:18                 ` Alex Bligh
2011-05-08 12:50                   ` Paul E. McKenney
2011-05-08 13:13                     ` Alex Bligh
2011-05-08 13:44                       ` Paul E. McKenney
2011-05-08 14:27                         ` Alex Bligh
2011-05-08 14:47                           ` Paul E. McKenney
2011-05-08 15:17                             ` Alex Bligh
2011-05-08 15:48                               ` Paul E. McKenney
2011-05-08 21:00                                 ` Eric Dumazet
2011-05-09  4:44                                   ` [PATCH] veth: use batched device unregister Eric Dumazet
2011-05-09  6:56                                     ` Michał Mirosław
2011-05-09  8:20                                       ` Eric Dumazet
2011-05-09  9:17                                         ` [PATCH net-next-2.6] net: use batched device unregister in veth and macvlan Eric Dumazet
2011-05-09 18:42                                           ` David Miller
2011-05-09 19:05                                             ` Eric Dumazet
2011-05-09 20:17                                               ` Eric Dumazet
2011-05-10  6:40                                                 ` [PATCH net-2.6] vlan: fix GVRP at dismantle time Eric Dumazet
2011-05-10 19:23                                                   ` David Miller
2011-05-09  7:45                                     ` [PATCH v2 net-next-2.6] veth: use batched device unregister Eric Dumazet
2011-05-09  9:22                                       ` Eric Dumazet
2011-05-09  5:37                                   ` Scalability of interface creation and deletion Alex Bligh
2011-05-09  6:37                                     ` Eric Dumazet
2011-05-09  7:11                                   ` Paul E. McKenney [this message]
2011-05-09 17:30                                   ` Jesse Gross
2011-05-08 12:44                 ` Paul E. McKenney
2011-05-08 13:06                   ` Alex Bligh
2011-05-08 13:14                     ` Alex Bligh
2011-05-08 12:32               ` Paul E. McKenney
2011-05-07 18:51           ` Alex Bligh
2011-05-07 19:24             ` Eric Dumazet
2011-05-07 18:38       ` Alex Bligh
2011-05-07 18:44         ` Eric Dumazet

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=20110509071114.GA2608@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=alex@alex.org.uk \
    --cc=eric.dumazet@gmail.com \
    --cc=jesse@nicira.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 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).