From: ebiederm@xmission.com (Eric W. Biederman)
To: Salam Noureddine <noureddine@arista.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jiri Pirko <jiri@mellanox.com>,
Alexei Starovoitov <ast@plumgrid.com>,
Daniel Borkmann <daniel@iogearbox.net>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next 0/4] batch calls to fib_flush and arp_ifdown
Date: Mon, 04 Jan 2016 18:35:15 -0600 [thread overview]
Message-ID: <87oad0rhh8.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <1451949056-15500-1-git-send-email-noureddine@arista.com> (Salam Noureddine's message of "Mon, 4 Jan 2016 15:10:52 -0800")
Salam Noureddine <noureddine@arista.com> writes:
> fib_flush walks the whole fib in a net_namespace and is called for
> each net_device being closed or unregistered. This can be very expensive
> when dealing with 100k or more routes in the fib and removal of a lot
> of interfaces. These four patches deal with this issue by calling fib_flush
> just once for each net namespace and introduce a new function arp_ifdown_all
> that does a similar optimization for the neighbour table.
Two things would be very valuable with this patchset.
Some numbers on how much your changes have improved the code in the case
you care about. I suspect the improvements are not subtle so this
should not be hard.
Can you please provide a justification for event_list. Just skimming
through it appears that event_list because a duplicate of the list of
batched network devices that are passed to dev_close_many and friends.
If the list is actually a duplicate it appears foolish to create it.
Eric
> Salam Noureddine (4):
> net: add event_list to struct net and provide utility functions
> net: dev: add batching to net_device notifiers
> net: core: introduce neigh_ifdown_all for all down interfaces
> net: fib: avoid calling fib_flush for each device when doing batch
> close and unregister
>
> include/linux/netdevice.h | 2 ++
> include/net/arp.h | 1 +
> include/net/neighbour.h | 1 +
> include/net/net_namespace.h | 22 ++++++++++++++++++++++
> include/net/netns/ipv4.h | 1 +
> net/core/dev.c | 39 ++++++++++++++++++++++++++++++++++++---
> net/core/neighbour.c | 38 +++++++++++++++++++++++++++++++-------
> net/ipv4/arp.c | 4 ++++
> net/ipv4/fib_frontend.c | 16 ++++++++++++++--
> 9 files changed, 112 insertions(+), 12 deletions(-)
next prev parent reply other threads:[~2016-01-05 0:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-04 23:10 [PATCH net-next 0/4] batch calls to fib_flush and arp_ifdown Salam Noureddine
2016-01-04 23:10 ` [PATCH net-next 1/4] net: add event_list to struct net and provide utility functions Salam Noureddine
2016-01-04 23:10 ` [PATCH net-next 2/4] net: dev: add batching to net_device notifiers Salam Noureddine
2016-01-04 23:10 ` [PATCH net-next 3/4] net: core: introduce neigh_ifdown_all for all down interfaces Salam Noureddine
2016-01-04 23:10 ` [PATCH net-next 4/4] net: fib: avoid calling fib_flush for each device when doing batch close and unregister Salam Noureddine
2016-01-05 0:35 ` Eric W. Biederman [this message]
2016-01-05 1:12 ` [PATCH net-next 0/4] batch calls to fib_flush and arp_ifdown Salam Noureddine
2016-01-12 1:53 ` Salam Noureddine
-- strict thread matches above, loose matches on Subject: below --
2016-02-01 22:32 Salam Noureddine
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=87oad0rhh8.fsf@x220.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=ast@plumgrid.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiri@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=noureddine@arista.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).