From: Thomas Heinz <creatix@hipac.org>
To: Harald Welte <laforge@netfilter.org>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: Table duplication on smp machine
Date: Mon, 31 Mar 2003 14:06:42 +0200 [thread overview]
Message-ID: <3E882F52.1040705@hipac.org> (raw)
In-Reply-To: 20030331110709.GE7718@sunbeam.de.gnumonks.org
Hi Harald
Thanks for your quick reply.
You wrote:
> it's not only write locking. Even if there was a locking mechanism in
> place, and we didn't care about it's performance.
>
> What we are really caring about is cacheline ping-pong. If you have a
> single piece of data (like a counter) that is written by different cpu's
> all the time, you will always invalidate the cached values in the other
> cpu's cachelines.
I see. If this is the main reason it would suffice to have _one_ ruleset
for all cpu's but a block of counters for each rule like this:
----------------------------------------
| counter for cpu 0 |
|--------------------------------------|
| cache-align padding |
|--------------------------------------|
| |
... ...
|--------------------------------------|
| cache-align padding |
|--------------------------------------|
| counter for cpu n |
|--------------------------------------|
Right?
> Depends on what you think of 'a lot of space'. In all my practical
> setups, the connection tracking table is significantly larger (by orders
> of magnitude) than the iptables ruleset.
Hm, in the above scheme the padding could be up to 112 bytes on x86
which means that the netfilter scheme does not waste a byte if the
average rule is <= 112 bytes.
Anyway, I was more concerned about the reasons behind the table
duplication than waste of memory.
Thomas
next prev parent reply other threads:[~2003-03-31 12:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-31 10:52 Table duplication on smp machine Thomas Heinz
2003-03-31 11:07 ` Harald Welte
2003-03-31 12:06 ` Thomas Heinz [this message]
2003-03-31 12:33 ` Harald Welte
2003-03-31 12:50 ` Thomas Heinz
2003-03-31 12:56 ` Patrick Schaaf
2003-03-31 13:34 ` Thomas Heinz
2003-03-31 13:45 ` Patrick Schaaf
2003-03-31 13:51 ` Patrick Schaaf
2003-03-31 14:06 ` Thomas Heinz
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=3E882F52.1040705@hipac.org \
--to=creatix@hipac.org \
--cc=laforge@netfilter.org \
--cc=netfilter-devel@lists.netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.