Subject: Re: [net-next-2.6 PATCH] net: fast consecutive name allocation

From: Ben Greear <[email-masked]>
Date: Fri, 13 Nov 2009 08:40:05 -0800

Octavian Purdila wrote:
> On Friday 13 November 2009 08:12:35 you wrote:
>   
>> Octavian Purdila a écrit :
>>     
>>> On Friday 13 November 2009 07:01:14 you wrote:
>>>       
>>>> This patch speeds up the network device name allocation for the case
>>>> where a significant number of devices of the same type are created
>>>> consecutively.
>>>>
>>>> Tests performed on a PPC750 @ 800Mhz machine with per device sysctl
>>>> and sysfs entries disabled:
>>>>
>>>> Without the patch           With the patch
>>>>
>>>> real    0m 43.43s	    real    0m 0.49s
>>>> user    0m 0.00s	    user    0m 0.00s
>>>> sys     0m 43.43s	    sys     0m 0.48s
>>>>         
>>> Oops, pasting root prompts (e.g. # modprobe ....) directly into the git
>>> commit message is not a good idea :) Here it is again, with the full
>>> commit message.
>>>
>>> [net-next-2.6 PATCH] net: fast consecutive name allocation
>>>
>>> This patch speeds up the network device name allocation for the case
>>> where a significant number of devices of the same type are created
>>> consecutively.
>>>
>>> Tests performed on a PPC750 @ 800Mhz machine with per device sysctl
>>> and sysfs entries disabled:
>>>
>>> $ time insmod /lib/modules/dummy.ko numdummies=8000
>>>
>>> Without the patch           With the patch
>>>
>>> real    0m 43.43s	    real    0m 0.49s
>>> user    0m 0.00s	    user    0m 0.00s
>>> sys     0m 43.43s	    sys     0m 0.48s
>>>
>>> Signed-off-by: Octavian Purdila <[email-masked]>
>>> ---
>>>       
>> Honestly I dont like this bloat.
>>
>> Changing dummy.c is trivial, and you can allocate 100.000.000 dummies if
>>  you want now :)
>>
>>     
>
> Yep we can do that - actually we are doing exactly this in our drivers. But in 
> that way, you get to "bloat" every driver which needs this. 
>   
For mac-vlans, .1q vlans, VETH, at least, you can choose the name when 
you create them
via 'ip'.  So, you can do the logic in user-space.

Thanks,
Ben

-- 
Ben Greear <[email-masked]> 
Candela Technologies Inc  http://www.candelatech.com