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 20:25:38 +0300	[thread overview]
Message-ID: <20081107172538.GA15239@ioremap.net> (raw)
In-Reply-To: <241CE5A1B2AFFA4987A663380D74C0BB3FFD15887F@MBX73.ad2.softcom.biz>

On Fri, Nov 07, 2008 at 11:38:14AM -0500, Yavor Goulishev (yavor@simplifymedia.com) wrote:
> 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.

Your original patch just added full check into bucket selection
algorithm, so that you could jump into the next bucket early.

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

Listen sockets have a priviledge to steal ports, so they can not be
accessed by any other bind, if you will distribute sockets with the
same port over the whole table, listen sockets will not caught this.

-- 
	Evgeniy Polyakov

  reply	other threads:[~2008-11-07 17:25 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
2008-11-07 16:38           ` Yavor Goulishev
2008-11-07 17:25             ` Evgeniy Polyakov [this message]
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=20081107172538.GA15239@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).