netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next-2.6 0/4] tunnels: SMP safe accounting
@ 2010-09-27 10:32 Eric Dumazet
  2010-09-28  4:51 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2010-09-27 10:32 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

Before making ip_gre, ipip, and sit transmit path lockless, it is
necessary to make accounting SMP safe, not only for correctness but to
avoid cache line ping pongs.

This also takes care of receive path, already lockless and using unsafe
stats accounting.

I chose to use small percpu structures, holding {rx|tx}_{packets|bytes}
only, and keep all other counters in netdev->stats, since they should be
seldom used.

Patch 1/4 makes the needed changes in include files
Patch 2/4 takes care of ip_gre
Patch 3/4 takes care of ipip
Patch 4/4 takes care of sit

Thanks

 include/linux/netdevice.h |    1 
 include/net/dst.h         |   24 ++++--
 include/net/ipip.h        |   12 +--
 net/ipv4/ip_gre.c         |  138 +++++++++++++++++++++++++-----------
 net/ipv4/ipip.c           |  127 ++++++++++++++++++++++++---------
 net/ipv6/sit.c            |   80 ++++++++++++++++----
 6 files changed, 282 insertions(+), 100 deletions(-)



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next-2.6 0/4] tunnels: SMP safe accounting
  2010-09-27 10:32 [PATCH net-next-2.6 0/4] tunnels: SMP safe accounting Eric Dumazet
@ 2010-09-28  4:51 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-09-28  4:51 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 27 Sep 2010 12:32:48 +0200

> Before making ip_gre, ipip, and sit transmit path lockless, it is
> necessary to make accounting SMP safe, not only for correctness but to
> avoid cache line ping pongs.
> 
> This also takes care of receive path, already lockless and using unsafe
> stats accounting.
> 
> I chose to use small percpu structures, holding {rx|tx}_{packets|bytes}
> only, and keep all other counters in netdev->stats, since they should be
> seldom used.

Series applied, thanks a lot Eric!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-28  4:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-27 10:32 [PATCH net-next-2.6 0/4] tunnels: SMP safe accounting Eric Dumazet
2010-09-28  4:51 ` David Miller

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).