From: Eric Dumazet <[EMAIL PROTECTED]>
Date: Thu, 09 Mar 2006 20:32:16 +0100

> #define PTRS_PER_CACHELINE ((L1_CACHE_BYTES - sizeof(rwlock_t))/sizeof(struct 
> hlist_head))
> 
> struct hash_agg_bucket {
>       rwlock_t   wlock;
>       struct hlist_head chains[PTRS_PER_CACHELINE];
> };
>
> A division by a constant (7 or 15, or 31...) is fast since gcc emits
> a multiply, so computing the address of wlock and 'hlist_head' would
> not be very expensive.

I like this idea.  Let's explore it after we push the RCU
infrastructure and dynamic TCP hash table sizing ideas into
the tree.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to