lkml.org 
[lkml]   [2002]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ip_conntrack_hash() problem
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:3.048 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site