On Tue, Mar 07, 2006 at 12:48:23AM +0100, Eric Dumazet wrote:
> If I understand your patch correctly, your future plan is to change "struct 
> inet_ehash_bucket" rwlock_t wlock to a pure spinlock (when ipv6 is 
> converted to rcu lookups too), because no more read_lock() are expected ?

Yes/no... The cost doesn't change if we convert it to a spinlock as we would 
have to insert a memory barrier where the write_unlock() was.

> I didnt understand why you added a test on sk->sk_node.pprev against 
> LIST_POISON2 in sk_unhashed() and sk_hashed()

In doing the conversion the code was changed over to use hlist_del_rcu(), 
which poisons the pprev member.  RCU basically adds another state where the 
hash list entry is unhashed but not freed, which can be detected by the 
presence of the poison value.  Without the check there are a couple of 
places where we end up trying to remove an already dead hash.

                -ben
-
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