netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next-2.6] ipv4: speedup inet_dump_ifaddr()
Date: Thu, 12 Nov 2009 11:12:18 -0800	[thread overview]
Message-ID: <20091112111218.0a561166@nehalam> (raw)
In-Reply-To: <4AFC4979.7030007@gmail.com>

On Thu, 12 Nov 2009 18:44:25 +0100
Eric Dumazet <eric.dumazet@gmail.com> wrote:

> Stephen Hemminger a écrit :
> > On Thu, 12 Nov 2009 15:11:36 +0100
> > Eric Dumazet <eric.dumazet@gmail.com> 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 <eric.dumazet@gmail.com>
> > 
> > You might be able to make RCU critical section smaller by moving
> > it into loop.
> > 
> 
> Indeed. But we dump at most one skb (<= 8192 bytes ?), so rcu_read_lock
> holding time is small, unless we meet many netdevices without
> addresses. I wonder if its really common...
> 
> Thanks

One case where that might happen is:
  modprobe dummy numdummies=10000

But dummy device should really be added with netlink, not at boot time.

-- 

  reply	other threads:[~2009-11-12 19:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12 14:11 [PATCH net-next-2.6] ipv4: speedup inet_dump_ifaddr() Eric Dumazet
2009-11-12 17:12 ` Stephen Hemminger
2009-11-12 17:44   ` Eric Dumazet
2009-11-12 19:12     ` Stephen Hemminger [this message]
2009-11-12 19:14       ` Eric Dumazet
2009-11-14  4:50     ` 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=20091112111218.0a561166@nehalam \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@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).