[openib-general] Re: [PATCH] SDP: use linux/list.h for binds

Libor Michalek libor at topspin.com
Tue Jul 19 16:29:08 PDT 2005


On Wed, Jul 20, 2005 at 02:09:23AM +0300, Michael S. Tsirkin wrote:
> Quoting r. Libor Michalek <libor at topspin.com>:
> > Subject: Re: [PATCH] SDP: use linux/list.h for binds
> > 
> > On Thu, Jul 14, 2005 at 11:34:06AM -0700, Tom Duffy wrote:
> > > This patch replaces the null terminated linked list for connections
> > > bound to a port and instead uses the list.h library from core Linux.
> > > 
> > > I have tested this on a few machines doing several ttcp's at once, but
> > > please inspect to verify correctness.
> > 
> >   Thanks. I've applied the patch since it's better then what was there.
> > However, the longer term solution needs to use a full hash table, the 
> > linear list is problematic when there are a lot of connections, and each
> > port_get() needs to traverse the entire list to check for collisions.
> 
> Or a tree?

  A tree would be fine as well, I was just thinking anything that has
a src_port lookup time of O(log n) instead of O(n). Also the tcp code
uses it's own hash table for it's port lookup. (net/ipv4/tcp_ipv4.c)
That seems like it might be overkill...

-Libor



More information about the general mailing list