netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <zbr@ioremap.net>
To: Yavor Goulishev <yavor@simplifymedia.com>
Cc: David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [Patch] Establishing more than 64K outgoing TCP connections
Date: Fri, 7 Nov 2008 11:45:55 +0300	[thread overview]
Message-ID: <20081107084555.GA13347@ioremap.net> (raw)
In-Reply-To: <241CE5A1B2AFFA4987A663380D74C0BB3FFD15887B@MBX73.ad2.softcom.biz>

On Fri, Nov 07, 2008 at 01:57:34AM -0500, Yavor Goulishev (yavor@simplifymedia.com) wrote:
> I'm suggesting a solution different from my original patch.
> To overcome the limit and preserver the current properties you can
> just change the hash function and the the table size.
> This is just an idea.

You can use bindtodevice and reuseaddr socket options already.

> The current hash is only the port number.
> Not sure why you want linear access in a hash table though:
>   >  I'm asking for O(num_ports_bound / hash_table_size) access.
> What is this? Searching for unused port number?
> It would stay the same if you use "(port + ip) % size".

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).

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().

-- 
	Evgeniy Polyakov

  parent reply	other threads:[~2008-11-07  8:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-28 21:06 [Patch] Establishing more than 64K outgoing TCP connections Yavor Goulishev
2008-11-02  4:15 ` David Miller
2008-11-07  6:12   ` Yavor Goulishev
2008-11-07  6:23     ` David Miller
2008-11-07  6:57       ` Yavor Goulishev
2008-11-07  7:04         ` David Miller
2008-11-07  7:15           ` Yavor Goulishev
2008-11-07  7:30             ` David Miller
2008-11-07  7:40               ` Yavor Goulishev
2008-11-07  8:45         ` Evgeniy Polyakov [this message]
2008-11-07 16:38           ` Yavor Goulishev
2008-11-07 17:25             ` Evgeniy Polyakov
2008-11-07 19:54             ` David Miller
2008-11-07 22:37               ` Yavor Goulishev
2008-11-07 23:04                 ` Evgeniy Polyakov
2008-11-07  8:36   ` Rémi Denis-Courmont
2008-11-07 15:56     ` Yavor Goulishev
2008-11-07 16:23       ` Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081107084555.GA13347@ioremap.net \
    --to=zbr@ioremap.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=yavor@simplifymedia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).