lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 28 Mar 2013 18:29:05 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Stephen Hemminger <stephen@...workplumber.org>,
	Benoit Lourdelet <blourdel@...iper.net>,
	Serge Hallyn <serge.hallyn@...ntu.com>,
	"netdev\@vger.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [RFC][PATCH] iproute: Faster ip link add, set and delete

Eric Dumazet <eric.dumazet@...il.com> writes:

> On Thu, 2013-03-28 at 17:43 -0700, Eric Dumazet wrote:
>
>> In batch mode, I can create these veth pairs in 4 seconds
>> 
>> for i in $(seq 1 5000) ; do echo link add a$i type veth peer name b$i;
>> done | ip -batch -
>
>
> At rmmod time, 30% of cpu is spent in packet_notifier()
>
> Maybe we can do something about this.

An interesting thought.  I had a patch I never got around to pushing a
while back that would have had an effect.

It is my observation that the vast majority of packet filters apply not
to the entire machine but to an individual interface.  In fact you have
to work pretty hard to get tools like tcpdump to dump all of the
interfaces at once.

So to speed things up for machines that have a lot of these things the
idea was to create per device lists for the filters that only needed to
be run on a single device.  In this case it looks like we could
potentially create per device lists for of the listening sockets as well.

In general these lists should be short so the search can also be short.

But I am curious do you actually have a tcpdump or something similar
running on your box that is using AF_PACKET sockets?  Perhaps a dhcp
client?

I am a little surprised that your default case has anything on the lists
to trigger any work in the packet_notifier notifier.

>    30.85%         rmmod  [kernel.kallsyms]     [k]
> packet_notifier                                                                                 
>                    |
>                    --- packet_notifier
>                        notifier_call_chain
>                        raw_notifier_call_chain
>                        call_netdevice_notifiers
>                        rollback_registered_many
>                        unregister_netdevice_many
>                        __rtnl_link_unregister
>                        rtnl_link_unregister
>                        0xffffffffa0044868
>                        sys_delete_module
>                        sysenter_dispatch

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

Powered by blists - more mailing lists