From: Patrick Schaaf <bof@bof.de>
To: "David S. Miller" <davem@redhat.com>
Cc: bof@bof.de, rusty@rustcorp.com.au, ak@suse.de,
laforge@gnumonks.org, netfilter-devel@lists.netfilter.org,
linux-kernel@vger.kernel.org
Subject: Re: ip_conntrack_hash() problem
Date: Thu, 5 Sep 2002 08:33:40 +0200 [thread overview]
Message-ID: <20020905083340.E19551@oknodo.bof.de> (raw)
In-Reply-To: <20020904.232425.10994370.davem@redhat.com>; from davem@redhat.com on Wed, Sep 04, 2002 at 11:24:25PM -0700
On Wed, Sep 04, 2002 at 11:24:25PM -0700, David S. Miller wrote:
>
> B) I despise the (1 << ...htable_bits) construct, used in several places.
> It's nothing but obfuscation. Please reinstate ...htable_size, and
> use that, the code will be more readable.
>
> You despise, but the processor doesn't. Less data loads
> means the code goes faster.
Please explain. I don't think that matters here:
Both _bits and _size are unsigned int, same amount of stuff to load.
The one single per-packet-path use is in hash_conntrack(), where
the _bits thing can be used without touching the _size thing.
All other places where the patch now uses _bits, really need _size,
and do the ugly computation by shifting. And all those other places
are called very rarely.
So, I don't see how your (abstractly true) observation is relevant, here.
best regards
Patrick
next prev parent reply other threads:[~2002-09-05 6:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-04 12:33 Martin Wilck
2002-09-04 12:56 ` Harald Welte
2002-09-04 13:24 ` Martin Wilck
2002-09-04 13:26 ` Andi Kleen
2002-09-05 0:39 ` Rusty Russell
2002-09-05 6:21 ` Patrick Schaaf
2002-09-05 6:24 ` David S. Miller
2002-09-05 6:33 ` Patrick Schaaf [this message]
2002-09-05 6:32 ` David S. Miller
2002-09-05 6:39 ` Patrick Schaaf
2002-09-05 6:40 ` David S. Miller
2002-09-05 13:37 ` Rik van Riel
2002-09-05 11:14 ` Rusty Russell
2002-09-05 6:51 ` Patrick Schaaf
2002-09-05 7:19 ` Martin Wilck
2002-09-05 11:15 ` Rusty Russell
2002-09-05 11:54 ` Andi Kleen
2002-09-05 17:55 ` Patrick Schaaf
2002-09-05 18:24 ` Martin Wilck
2002-09-05 8:19 ` Harald Welte
2002-09-04 13:40 ` Martin Wilck
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=20020905083340.E19551@oknodo.bof.de \
--to=bof@bof.de \
--cc=ak@suse.de \
--cc=davem@redhat.com \
--cc=laforge@gnumonks.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@lists.netfilter.org \
--cc=rusty@rustcorp.com.au \
/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
all inboxes | Powered by JetHome®