Re: [PATCH 1/2] iproute2: Improve list add.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 22 May 2012 15:37:19 -0700
Pravin B Shelar <pshelar@xxxxxxxxxx> wrote:

> ip command reads entire list of devices on every flush command.
> While adding device record to list is does list traversal O(n).
> This is time consuming for large batch commands.
> Following patch improves list add operation to O(1).
> 
> Reported-by: Justin Pettit <jpettit@xxxxxxxxxx>
> Signed-off-by: Pravin B Shelar <pshelar@xxxxxxxxxx>
> ---
>  ip/ipaddress.c |   16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 

This no longer applies, after a similar patch I just accepted
from Eric.

commit 62e2e540919d31147165dabd35431c0649122c96
Author: Eric Dumazet <edumazet@xxxxxxxxxx>
Date:   Sat Jun 9 13:55:55 2012 +0200

    ip: speedup ip link
    
    ip link has quadratic behavior because store_nlmsg()
    has a head list pointer and search the end of list.
    
    Provides a head/tail to cut time.
    
    Time with 128000 net devices, to do "ip link show dev xxx"
    
    Before: 2m3.594s
    After: 0m2.830s
    
    Signed-off-by: Eric Dumazet <edumazet@xxxxxxxxxx>


If that doesn't fix your problem go ahead and resubmit.


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Discussion]     [TCP Instrumentation]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux WPAN Networking]     [Linux Host AP]     [Linux WPAN Networking]     [Linux Bluetooth Networking]     [Linux ATH6KL Networking]     [Linux Networking Users]     [Linux Coverity]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux IDE]     [Linux RAID]     [Linux SCSI]