From: Eric Dumazet <eric.dumazet@gmail.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next-2.6] rtnetlink: rtnl_setlink() and rtnl_getlink() changes
Date: Thu, 22 Oct 2009 06:48:38 +0200 [thread overview]
Message-ID: <4ADFE426.6040806@gmail.com> (raw)
In-Reply-To: <4ADFCA82.80901@gmail.com>
Eric Dumazet a écrit :
> Stephen Hemminger a écrit :
>> On Wed, 21 Oct 2009 22:59:31 +0200
>> Eric Dumazet <eric.dumazet@gmail.com> wrote:
>>
>>> Stephen, do you think we could change "ip link show dev ethX" to
>>> let it use rtnl_getlink() instead of rtnl_dump_ifinfo() ?
>>>
>> Would work, but not sure what it gains.
>
> It takes about one second to dump the table when we have 25.000 devices
Adding new links takes also lot of time in rtnl_dump_ifinfo(), we could
optimize it using a 256 fanout (using the ifindex hash table instead
of the single list)
But IMHO rtnl_dump_ifinfo() should be used only when needed, not when
querying/adding a particular device.
------------------------------------------------------------------------------
PerfTop: 42745 irqs/sec kernel:88.0% [100000 cycles], (all, 8 CPUs)
------------------------------------------------------------------------------
samples pcnt kernel function
_______ _____ _______________
231146.00 - 52.4% : rtnl_dump_ifinfo
18491.00 - 4.2% : __register_sysctl_paths
17700.00 - 4.0% : mwait_idle
12883.00 - 2.9% : rtnl_fill_ifinfo
12661.00 - 2.9% : schedule
6324.00 - 1.4% : find_busiest_group
5911.00 - 1.3% : _spin_lock_irqsave
4862.00 - 1.1% : dev_get_stats
4726.00 - 1.1% : copy_to_user
4547.00 - 1.0% : __nla_put
4117.00 - 0.9% : sysfs_find_dirent
4090.00 - 0.9% : sysenter_past_esp
3789.00 - 0.9% : fput
3735.00 - 0.8% : __nla_reserve
3699.00 - 0.8% : read_tsc
next prev parent reply other threads:[~2009-10-22 4:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-21 20:59 [PATCH net-next-2.6] rtnetlink: rtnl_setlink() and rtnl_getlink() changes Eric Dumazet
2009-10-21 21:48 ` Stephen Hemminger
2009-10-22 2:59 ` Eric Dumazet
2009-10-22 4:48 ` Eric Dumazet [this message]
2009-10-22 11:34 ` 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=4ADFE426.6040806@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.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;
as well as URLs for NNTP newsgroup(s).