From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>,
David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] net: percpu net_device refcount
Date: Sat, 9 Oct 2010 09:58:59 -0700 [thread overview]
Message-ID: <20101009165859.GD2544@linux.vnet.ibm.com> (raw)
In-Reply-To: <1286605396.2692.10.camel@edumazet-laptop>
On Sat, Oct 09, 2010 at 08:23:16AM +0200, Eric Dumazet wrote:
> Le vendredi 08 octobre 2010 à 14:56 -0700, Paul E. McKenney a écrit :
> > On Thu, Oct 07, 2010 at 10:30:51AM -0700, Stephen Hemminger wrote:
> > > On Thu, 07 Oct 2010 19:12:35 +0200
> > > Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > >
> > > > We tried very hard to remove all possible dev_hold()/dev_put() pairs in
> > > > network stack, using RCU conversions.
> > > >
> > > > There is still an unavoidable device refcount change for every dst we
> > > > create/destroy, and this can slow down some workloads (routers or some
> > > > app servers)
> > > >
> > > > We can switch to a percpu refcount implementation, now dynamic per_cpu
> > > > infrastructure is mature. On a 64 cpus machine, this consumes 256 bytes
> > > > per device.
> > >
> > > It makes sense, but what about 256 cores and 1024 Vlans?
> > > That adds up to 4M of memory which is might be noticeable.
> >
> > I bet that systems that have 256 cores have >100GB of memory, at which
> > point 4MB is way down in the noise.
>
> Well, first its 1MB added, and secondly we added percpu stats for vlan
> devices, and this consumed 8x more :
>
> (struct vlan_rx_stats is 32 bytes per cpu and per vlan
> 32*256*1024 -> 8 Mbytes
>
> Some strange machines have many cores sharing a small amount of memory,
> but I am not sure they want to run many net devices ;)
I do have to admit that the rapid growth rate in the data required might
well be cause for concern. But only if it continues. ;-)
Thanx, Paul
next prev parent reply other threads:[~2010-10-09 16:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-07 17:12 [PATCH net-next] net: percpu net_device refcount Eric Dumazet
2010-10-07 17:30 ` Stephen Hemminger
2010-10-07 18:06 ` Eric Dumazet
2010-10-08 21:56 ` Paul E. McKenney
2010-10-09 6:23 ` Eric Dumazet
2010-10-09 16:58 ` Paul E. McKenney [this message]
2010-10-11 19:13 ` David Miller
2010-10-11 19:38 ` Eric Dumazet
2010-10-11 19:41 ` David Miller
2010-10-11 19:49 ` David Miller
2010-10-11 19:51 ` Eric Dumazet
2010-10-11 20:22 ` [PATCH net-next V3] " Eric Dumazet
2010-10-12 19:36 ` David Miller
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=20101009165859.GD2544@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.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).