Re: [NETLINK] periodically rehash table, why?

2007-03-14 Thread Herbert Xu
Holger Eitzenberger <[EMAIL PROTECTED]> wrote: > > in nl_pid_hash_dilute() there is: > > if (unlikely(avg > 1) && nl_pid_hash_rehash(hash, 1)) > return 1; > > if (unlikely(len > avg) && time_after(jiffies, hash->rehash_time)) { > nl_pid_hash_rehash(hash, 0); > return

[NETLINK] periodically rehash table, why?

2007-03-14 Thread Holger Eitzenberger
Hi, in nl_pid_hash_dilute() there is: if (unlikely(avg > 1) && nl_pid_hash_rehash(hash, 1)) return 1; if (unlikely(len > avg) && time_after(jiffies, hash->rehash_time)) { nl_pid_hash_rehash(hash, 0); return 1; } I don't see a reason why periodically rehash