lkml.org 
[lkml]   [2009]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] netfilter: use per-cpu spinlock rather than RCU (v3)
On Wed, 15 Apr 2009 12:59:03 +0200
Patrick McHardy <kaber@trash.net> wrote:

> Eric Dumazet wrote:
> > Stephen Hemminger a écrit :
> >> This is an alternative version of ip/ip6/arp tables locking using
> >> per-cpu locks. This avoids the overhead of synchronize_net() during
> >> update but still removes the expensive rwlock in earlier versions.
> >>
> >> The idea for this came from an earlier version done by Eric Dumazet.
> >> Locking is done per-cpu, the fast path locks on the current cpu
> >> and updates counters. The slow case involves acquiring the locks on
> >> all cpu's.
> >>
> >> The mutex that was added for 2.6.30 in xt_table is unnecessary since
> >> there already is a mutex for xt[af].mutex that is held.
> >>
> >> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> >>
> >> ---
> >> include/linux/netfilter/x_tables.h | 5 -
> >> net/ipv4/netfilter/arp_tables.c | 112 +++++++++------------------------
> >> net/ipv4/netfilter/ip_tables.c | 123 +++++++++++--------------------------
> >> net/ipv6/netfilter/ip6_tables.c | 119 +++++++++++------------------------
> >> net/netfilter/x_tables.c | 28 --------
> >> 5 files changed, 110 insertions(+), 277 deletions(-)
> >>
> >
> > Tested successfuly on my dev machine, thanks Stephen.
> >
> > Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
>
> Applied, thanks everyone. I'll give it some testing myself and
> will send it upstream tonight.

I am running it with LOCKDEP now to check for any issues.
It also needs to be validated with SMP configured kernel running on UP.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-04-15 18:35    [W:0.211 / U:1.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site