netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: lucian.grijincu@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] net: dummy: allocate devices with alloc_netdev_id
Date: Mon, 06 Jun 2011 20:38:51 -0700 (PDT)	[thread overview]
Message-ID: <20110606.203851.1325136360346365091.davem@davemloft.net> (raw)
In-Reply-To: <1307416765.2642.37.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 07 Jun 2011 05:19:25 +0200

> Le mardi 07 juin 2011 à 04:39 +0300, Lucian Adrian Grijincu a écrit :
>> The most like case is that no one else is registering devices with a
>> name like "dummy%d".
>> 
>> We can bring the complexity down by replacing:
>> - alloc_netdev_id which is O(N) with
>> - alloc_netdev_id which, on the average case, is O(1).
>> 
>> $ time modprobe dummy numdummies=5000
>> - with alloc_netdev   : 9.50s
>> - with alloc_netdev_id: 3.50s
>> 
>> NOTE: Stats generated on a heavily patched 3.0-rc1 which replaces the
>>       current O(N^2) sysctl algorithm with a better one.
> 
> Yes, and disabled hotplug I guess.
> 
> Dont try this on a random computer ;)
> 
> # time modprobe dummy numdummies=5000
> 
> real	4m45.646s
> user	0m0.000s
> sys	0m12.440s
> # uptime
>  05:13:46 up 13:30,  3 users,  load average: 11221.41, 6918.70, 3101.12

ROFL

  reply	other threads:[~2011-06-07  3:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-07  1:39 [PATCH 0/2] speed up net device allocation using pattern names Lucian Adrian Grijincu
2011-06-07  1:39 ` [PATCH 1/2] net: add alloc_netdev_mqs_id Lucian Adrian Grijincu
2011-06-07  1:39 ` [PATCH 2/2] net: dummy: allocate devices with alloc_netdev_id Lucian Adrian Grijincu
2011-06-07  3:19   ` Eric Dumazet
2011-06-07  3:38     ` David Miller [this message]
2011-06-07  7:49     ` Lucian Adrian Grijincu
2011-06-07  7:59       ` Eric Dumazet
2011-06-07  8:30         ` Lucian Adrian Grijincu
2011-06-07  9:29           ` David Miller
2011-06-09  7:20             ` David Miller

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=20110606.203851.1325136360346365091.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=lucian.grijincu@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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).