Subject: Re: [PATCH net-next-2.6] ipv4: speedup inet_dump_ifaddr()

From: Stephen Hemminger <[email-masked]>
Date: Thu, 12 Nov 2009 09:12:21 -0800

On Thu, 12 Nov 2009 15:11:36 +0100
Eric Dumazet <[email-masked]> wrote:

> When handling large number of netdevices, inet_dump_ifaddr()
> is very slow because it has O(N^2) complexity.
> 
> Instead of scanning one single list, we can use the NETDEV_HASHENTRIES
> sub lists of the dev_index hash table, and RCU lookups.
> 
> Signed-off-by: Eric Dumazet <[email-masked]>

You might be able to make RCU critical section smaller by moving
it into loop.

Acked-by: Stephen Hemminger <[email-masked]>