Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Mar 1997 09:03:20 -0800
From:      David Greenman <dg@root.com>
To:        "David S. Miller" <davem@jenolan.rutgers.edu>
Cc:        netdev@roxanne.nuclecu.unam.mx, hackers@freebsd.org
Subject:   Re: ok, final sockhash changes, new diff 
Message-ID:  <199703011703.JAA05291@root.com>
In-Reply-To: Your message of "Sat, 01 Mar 1997 04:32:49 EST." <199703010932.EAA09015@jenolan.caipgeneral> 

next in thread | previous in thread | raw e-mail | index | archive | help
   Hi, David. I just looked at the hash algorithm you're using in
tcp_hashfn()...I think it looks pretty good, and it's easy to see why it
would have good distribution properties. I didn't think about using xor
when I wrote the stuff for FreeBSD. :-(  ...Anyway, I hope you don't mind
if I change the algorithm in FreeBSD to use xor's. :-) It seems like
the laddr/faddr would likely have a not-very-unique low order portion
(since most hosts are assigned addresses in the low range of class A/B/C's),
so it seems like this could perhaps be improved by combining the upper
word of the IP address with the lower word...but perhaps this would be just
extra overhead (since your analysis seems to show the distribution is
already quite good).
   I've had other improvements to the FreeBSD code on my whiteboard since
last summer ("DELACK queue", for example), but haven't had the time to
work on implementing them. BTW, one thing I didn't see in your code that
was suggested to me a few months ago (and is also on my whiteboard), is
another queue to move connections that have closed and are just waiting
for the 2MSL wait to expire. In the case of busy WWW servers, it's common
for the majority of the connections to be in this state, so by moving
them off of the regular hashed queue and on to a private hashed queue, you
can speed up the lookups for the active connections.

-DG

David Greenman
Core-team/Principal Architect, The FreeBSD Project



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703011703.JAA05291>