netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Mark Smith <lk-netdev@lk-netdev.nosense.org>
Cc: David Miller <davem@davemloft.net>,
	opurdila@ixiacom.com, shemminger@vyatta.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH] [next-next-2.6] net: configurable device name hash
Date: Thu, 12 Nov 2009 15:09:57 +0100	[thread overview]
Message-ID: <4AFC1735.6000105@gmail.com> (raw)
In-Reply-To: <20091112231620.0b56c0b0@opy.nosense.org>

Mark Smith a écrit :
> On Wed, 11 Nov 2009 18:36:26 -0800 (PST)
> David Miller <davem@davemloft.net> wrote:
> 
>> From: Octavian Purdila <opurdila@ixiacom.com>
>> Date: Wed, 11 Nov 2009 23:47:41 +0200
>>
>>> 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.
>> Use kzalloc(), that's sufficient for a 64K or so hash table which is
>> way more than you ever will need.
>>
>> Use the GFP_* flags that will silently (ie. without a log message)
>> fail, and divide by two until you successfully allocate the table if
>> you're worried about memory fragmentation at allocation time.
>>
>> This is so straightforward, I can't believe we're talking so much
>> about how to implement this, it's a 15 minute hack :-)
> 
> Yes, but sadly, sometimes there is too much history(!) to be able to be
> fully aware of it. "suck-it-and-see" type patches are possibly a
> quicker way to find out what people are thinking right now!
> 

Before extending hash tables, we should make sure existing algos are going to
scale with millions of netdevices, and they dont scale that much for the moment.
We still have many for_each_netdev() loops...

It's easy to change a constant somewhere in an include file, its less easy to make
real scalability changes :(


      reply	other threads:[~2009-11-12 14:10 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
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 [this message]

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=4AFC1735.6000105@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=lk-netdev@lk-netdev.nosense.org \
    --cc=netdev@vger.kernel.org \
    --cc=opurdila@ixiacom.com \
    --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).