netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: kaber@trash.net, netfilter-devel@vger.kernel.org,
	netdev@vger.kernel.org, hawk@diku.dk
Subject: Re: [RFC] netfilter: get rid of atomic ops in fast path
Date: Wed, 16 Mar 2011 13:16:48 -0700 (PDT)	[thread overview]
Message-ID: <20110316.131648.15245216.davem@davemloft.net> (raw)
In-Reply-To: <1300302005.3202.23.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 16 Mar 2011 20:00:05 +0100

> We currently use a percpu spinlock to 'protect' rule bytes/packets
> counters, after various attempts to use RCU instead.
> 
> Lately we added a seqlock so that get_counters() can run without
> blocking BH or 'writers'. But we really use the seqcount in it.
> 
> Spinlock itself is only locked by the current cpu, so we can remove it
> completely.
> 
> This cleanups api, using correct 'writer' vs 'reader' semantic.
> 
> At replace time, the get_counters() call makes sure all cpus are done
> using the old table.
> 
> We could probably avoid blocking BH (we currently block them in xmit
> path), but thats a different topic ;)
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

FWIW, I think this is a great idea.

  reply	other threads:[~2011-03-16 20:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 19:00 [RFC] netfilter: get rid of atomic ops in fast path Eric Dumazet
2011-03-16 20:16 ` David Miller [this message]
2011-03-17 10:35   ` [PATCH] netfilter: xtables: fix reentrancy Eric Dumazet
2011-03-17 11:36     ` Jesper Dangaard Brouer
2011-03-17 11:45       ` Eric Dumazet
2011-03-17 13:17         ` Eric Dumazet
2011-03-18 10:27           ` Jesper Dangaard Brouer
2011-03-18 10:50             ` Eric Dumazet
2011-03-17 10:39 ` [RFC] netfilter: get rid of atomic ops in fast path Patrick McHardy

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=20110316.131648.15245216.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=hawk@diku.dk \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@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).