public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay•com>
To: Jan Engelhardt <jengelh@medozas•de>
Cc: David Miller <davem@davemloft•net>,
	graham@gmurray•org.uk, linux-kernel@vger•kernel.org,
	netdev@vger•kernel.org, netfilter-devel@vger•kernel.org
Subject: Re: Regression caused by commit "netfilter: iptables: lock free counters"
Date: Sun, 05 Apr 2009 14:34:50 +0200	[thread overview]
Message-ID: <49D8A56A.8050606@cosmosbay.com> (raw)
In-Reply-To: <alpine.LSU.2.00.0904051328030.7501@fbirervta.pbzchgretzou.qr>

Jan Engelhardt a écrit :
> On Sunday 2009-04-05 12:01, Eric Dumazet wrote:
>> This could probably be solved using a single "table" containing
>> rules only, that could be shared for every cpus. Only counters
>> should be percpu. This should save a lot of ram, over previous
>> situation (2.6.29 or current one)
> 
> Why would counters stay separate?
> 
> I recognize all of this table copying is related to do NUMA
> optimizations, and I think I heard cache bouncing too somewhere else.
> 
> [ http://marc.info/?l=netfilter-devel&m=119903624211253&w=2 ]
> 
> 

Not only NUMA, but SMP too. counters are integrated in rules themselves.
So in order to avoid ping pongs between cpus, we choose to allocate
one copy of rules/counters per cpu.

But with some changes, we could let the rules read-only and shared by
all cpus, and shadow counters only on percpu variables, thus reducing
memory costs.


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger•kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2009-04-05 12:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090329234702.4988017f@desktop.r000n.info>
     [not found] ` <8763hja8cy.fsf@newton.gmurray.org.uk>
2009-04-05  8:22   ` Regression caused by commit "netfilter: iptables: lock free counters" David Miller
2009-04-05 10:01     ` Eric Dumazet
     [not found]       ` <87ws9z8l4c.fsf@newton.gmurray.org.uk>
2009-04-05 10:30         ` Eric Dumazet
2009-04-05 12:29           ` [PATCH] netfilter: ip6tables fix Eric Dumazet
2009-04-05 12:40             ` Eric Dumazet
2009-04-06 15:08               ` Patrick McHardy
2009-04-05 11:36       ` Regression caused by commit "netfilter: iptables: lock free counters" Jan Engelhardt
2009-04-05 12:34         ` Eric Dumazet [this message]

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=49D8A56A.8050606@cosmosbay.com \
    --to=dada1@cosmosbay$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=graham@gmurray$(echo .)org.uk \
    --cc=jengelh@medozas$(echo .)de \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=netfilter-devel@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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