netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Octavian Purdila <opurdila@ixiacom.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] [next-next-2.6] net: configurable device name hash
Date: Wed, 11 Nov 2009 23:47:41 +0200	[thread overview]
Message-ID: <200911112347.41425.opurdila@ixiacom.com> (raw)
In-Reply-To: <20091111133342.1011e16a@nehalam>

On Wednesday 11 November 2009 23:33:42 you wrote:
> On Wed, 11 Nov 2009 12:42:35 -0800 (PST)
> 
> David Miller <davem@davemloft.net> wrote:
> > From: Octavian Purdila <opurdila@ixiacom.com>
> > Date: Wed, 11 Nov 2009 21:38:44 +0200
> >
> > > I don't think we can dynamically size it at boot time since it
> > > depends on the usage pattern which is impossible to determine at
> > > boot time, right?
> >
> > We have no idea how many sockets will be used by the system yet we
> > dynamically size the socket hash tables.
> >
> > Please do some research and see how we handle this elsewhere in the
> > networking.
> 
> dcache also sizes hash bits at boot time on available memory.
> See alloc_large_system_hash().
> 

Thanks Stephen.

I was actually taking a look at that but I see that the device hash is 
allocated per net namespace which means we can't use 
alloc_large_system_hash().

We could use a similar function that will work in the per namespace 
initialization context, but this might upset net namespace folks since we will 
get a large hash for every namespace.

Not sure what can be done to address that problem now except using a boot 
parameter to override the defaults. A better solution would be to be able to 
use "namespace create" parameters but it appears we don't have this 
possibility, yet.


  reply	other threads:[~2009-11-11 21:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-11 19:16 [PATCH] [next-next-2.6] net: configurable device name hash Octavian Purdila
2009-11-11 19:21 ` David Miller
2009-11-11 19:38   ` Octavian Purdila
2009-11-11 20:08     ` Eric Dumazet
2009-11-11 20:32       ` Octavian Purdila
2009-11-11 20:42     ` David Miller
2009-11-11 21:33       ` Stephen Hemminger
2009-11-11 21:47         ` Octavian Purdila [this message]
2009-11-11 22:24           ` Stephen Hemminger
2009-11-12  2:36           ` David Miller
2009-11-12 12:46             ` Mark Smith
2009-11-12 14:09               ` 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=200911112347.41425.opurdila@ixiacom.com \
    --to=opurdila@ixiacom.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.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).