[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110606.203851.1325136360346365091.davem@davemloft.net>
Date: Mon, 06 Jun 2011 20:38:51 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: lucian.grijincu@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH 2/2] net: dummy: allocate devices with alloc_netdev_id
From: Eric Dumazet <eric.dumazet@...il.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists