[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <241CE5A1B2AFFA4987A663380D74C0BB3FFD15887F@MBX73.ad2.softcom.biz>
Date: Fri, 7 Nov 2008 11:38:14 -0500
From: Yavor Goulishev <yavor@...plifymedia.com>
To: Evgeniy Polyakov <zbr@...emap.net>
CC: David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [Patch] Establishing more than 64K outgoing TCP connections
________________________________________
From: Evgeniy Polyakov [zbr@...emap.net]
Sent: Friday, November 07, 2008 12:45 AM
To: Yavor Goulishev
Cc: David Miller; netdev@...r.kernel.org
Subject: Re: [Patch] Establishing more than 64K outgoing TCP connections
> When sockets (hash results) are evenly distributed over the hash table,
> access will be O(num_of_elemets / hash_table_size), with particulary big
> table it will be O(1).
OK, but this is mainly achieved with good hash function and proper table size.
My original patch wouldn't change the locations(buckets) of the ports. It will just chose different ports.
The hack for picking a good port number just looks for empty bucket.
> If you will add any other fields into hash in inet_csk_get_port(), this
> will not change anything, since it will just switch hash table bucket to
> be checked. When we found hash bucket for given port, all its entries
> are checked to have the same parameters as in provided data. See how
> bind_conflict() callback is invoked in inet_csk_get_port().
It would change. Switching the bucket allows you to grow the table size and keep O(1).
Without changing the hash function, growing the table size will not help.
Currently all binds on the same port will go to the same bucket.
--Yavor
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists