On Thu, Mar 09, 2006 at 07:25:25PM +0100, Eric Dumazet wrote: > On a second thought, do you think we still need one rwlock per hash chain ? > > TCP established hash table entries: 1048576 (order: 12, 16777216 bytes) > > On this x86_64 machine, we 'waste' 8 MB of ram for those rwlocks. > > With RCU, we touch these rwlocks only on TCP connection creation/deletion, > maybe we could reduce to one rwlock or a hashed array of 2^N rwlocks (2^N > depending on NR_CPUS), like in net/ipv4/route.c ?
Hrm, maybe use cmpxchg? That gets rid of the lock and automatically provides us with hashed spinlocks on archs without a cmpxchg implementation. -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