All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: Harald Welte <laforge@netfilter.org>,
	Netfilter Development Mailinglist
	<netfilter-devel@lists.netfilter.org>,
	Patrick McHardy <kaber@trash.net>
Subject: Re: [PATCH] x_tables, take 5 (Final Review)
Date: Mon, 09 Jan 2006 12:23:59 +0100	[thread overview]
Message-ID: <43C247CF.2000608@cosmosbay.com> (raw)
In-Reply-To: <20060108212619.GE24266@sunbeam.de.gnumonks.org>

Harald Welte a écrit :
> Hi!
> 
> It's been some time since I last released a version of the x_tables
> patch.  This is mainly due to the reason that 2.6.15 has only been
> released recently, and x_tables was clearly 2.6.16 work.
> 
> I've modified nfsim and the nfsim-testsuite to work with an x_tables
> kernel, and all tests now pass without any problem (using an old
> iptables binary that was compiled against a non-xtables kernel). This,
> in addition to my manual tests, give me enough confidence that I didn't
> break something significant.
> 
> I'm planning to submit x_tables eatly next week, so this is assumed to
> be the final review phase.
> 
> So if you have any issues, please comment now before it's too late :)
> 
Hi Harald

Is there any chance we can get rid of the rwlock_t lock in 'struct xt_table' ?
(Replacing it by an array of spinlocks)

     /* Lock for the curtain */
-   rwlock_t lock;
+   spinlock_t *lockp;



Pros :

   1) No more cache line ping pongs between cpus. A read_lock_bh(&table->lock) 
is still expensive because of that.

   2) spinlocks are less expensive (spin_unlock is not an atomic op like 
read_unlock_bh()

On a dual processor machine, its quite common that all incoming frames are 
handled by CPU 0, while CPU 1 is doing the User level stuff and sends network 
trafic...

Thank you

( I had a patch sent in September which was doing quite the same thing on 
ipt_tables, but keeping the rwlock_t : Correct me but I think we can just use 
spinlocks)

Eric

  parent reply	other threads:[~2006-01-09 11:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-08 21:26 [PATCH] x_tables, take 5 (Final Review) Harald Welte
2006-01-08 22:08 ` Patrick McHardy
2006-01-08 22:12   ` Patrick McHardy
2006-01-08 23:01 ` Patrick McHardy
2006-01-09  9:19   ` Harald Welte
2006-01-09  6:46 ` Patrick McHardy
2006-01-09  8:59   ` Harald Welte
2006-01-09  8:52 ` Yasuyuki KOZAKAI
     [not found] ` <200601090852.k098qjeO004027@toshiba.co.jp>
2006-01-09 10:35   ` Harald Welte
2006-01-10  4:18     ` Yasuyuki KOZAKAI
     [not found]     ` <200601100418.k0A4IxhL008706@toshiba.co.jp>
2006-01-12 16:58       ` Harald Welte
2006-01-09 11:23 ` Eric Dumazet [this message]
2006-01-09 13:15   ` Harald Welte
2006-01-27 15:16   ` [PATCH] x_tables : Use SMP friendly (percpu) rwlock_t to protect x_tables Eric Dumazet
2006-01-27 15:37     ` Stephen Hemminger
2006-01-27 15:46       ` Eric Dumazet
2006-01-27 17:53         ` Stephen Hemminger
2006-01-27 21:51           ` Eric Dumazet
2006-01-27 16:06     ` Eric Dumazet
2006-01-09 17:44 ` [PATCH] x_tables, take 5 (Final Review) Yasuyuki KOZAKAI
     [not found] ` <200601091744.k09HiVP2022456@toshiba.co.jp>
2006-01-12 16:02   ` Harald Welte

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=43C247CF.2000608@cosmosbay.com \
    --to=dada1@cosmosbay.com \
    --cc=kaber@trash.net \
    --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.