From: Patrick McHardy <kaber@trash.net>
To: Nuutti Kotivuori <naked@iki.fi>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: [PATCH] Very first try: ipt_connrate patch.
Date: Mon, 16 Feb 2004 14:07:53 +0100 [thread overview]
Message-ID: <4030C0A9.2090003@trash.net> (raw)
In-Reply-To: <878yj39p9a.fsf@iki.fi>
Nuutti Kotivuori wrote:
> Right. I didn't see any locking in resolve_normal_ct, so I assumed no
> locking was needed. Then I peeked in the functions it calls and every
> one of them gets the ip_conntrack_lock.
>
> But, I am a bit confused on the best way to handle locking. For
> example, ip_conntrack_proto_tcp has only one RWLOCK which it uses. I
> can undestand this for the actual connection tracking table, but for
> the subentries in it... well, why would writing to one conntrack
> element block reading from another conntrack element - or simultaneous
> writing to two different conntrack elements and so on. Shouldn't there
> be some locking per connection tracking entry, so other entries could
> simultaneously be processed on other processors?
There are patches for per-bucket locking in pom, look at
extra/conntrack_locking.patch if you are interested.
> SMP performance and correctness is an important issue for me, as I am
> specifically running this on an SMP machine. Luckily I haven't ran
> into any problems yet - thanks for spotting this. I shall implement
> things as proto_tcp does it for now.
That should do it for now. I wouldn't expect any performance problems
as the critical section is really short.
Regards,
Patrick
>
> -- Naked
>
>
next prev parent reply other threads:[~2004-02-16 13:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-08 19:56 [PATCH] Very first try: ipt_connrate patch Nuutti Kotivuori
2004-02-14 20:14 ` Harald Welte
2004-02-16 2:22 ` Nuutti Kotivuori
2004-02-19 18:28 ` Harald Welte
2004-02-19 19:05 ` Nuutti Kotivuori
2004-02-16 11:18 ` Patrick McHardy
2004-02-16 12:34 ` Nuutti Kotivuori
2004-02-16 13:07 ` Patrick McHardy [this message]
2004-02-16 16:19 ` Nuutti Kotivuori
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=4030C0A9.2090003@trash.net \
--to=kaber@trash.net \
--cc=naked@iki.fi \
--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.