From: Stephen Hemminger <shemminger@vyatta.com>
To: Pravin B Shelar <pshelar@nicira.com>
Cc: netdev@vger.kernel.org, jpettit@nicira.com, jesse@nicira.com
Subject: Re: [PATCH 1/2] iproute2: Improve list add.
Date: Mon, 11 Jun 2012 15:01:07 -0700 [thread overview]
Message-ID: <20120611150107.41260615@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <1337726239-9925-1-git-send-email-pshelar@nicira.com>
On Tue, 22 May 2012 15:37:19 -0700
Pravin B Shelar <pshelar@nicira.com> 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@nicira.com>
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
> ---
> 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@google.com>
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@google.com>
If that doesn't fix your problem go ahead and resubmit.
prev parent reply other threads:[~2012-06-11 22:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 22:37 [PATCH 1/2] iproute2: Improve list add Pravin B Shelar
2012-06-11 22:01 ` Stephen Hemminger [this message]
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=20120611150107.41260615@nehalam.linuxnetplumber.net \
--to=shemminger@vyatta.com \
--cc=jesse@nicira.com \
--cc=jpettit@nicira.com \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.com \
/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