From: Gilad Naaman <gnaaman@drivenets.com>
To: netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Gilad Naaman <gnaaman@drivenets.com>
Subject: [PATCH net-next v2 0/2] Improve neigh_flush_dev performance
Date: Sun, 6 Oct 2024 06:47:41 +0000 [thread overview]
Message-ID: <20241006064747.201773-1-gnaaman@drivenets.com> (raw)
This patchsets improves the performance of neigh_flush_dev.
Currently, the only way to implement it requires traversing
all neighbours known to the kernel, across all network-namespaces.
This means that some flows are slowed down as a function of neighbour-scale,
even if the specific link they're handling has little to no neighbours.
In order to solve this, this patchset adds a netdev->neighbours list,
as well as making the original linked-list doubly-, so that it is
possible to unlink neighbours without traversing the hash-bucket to
obtain the previous neighbour.
The original use-case we encountered was mass-deletion of links (12K
VLANs) while there are 50K ARPs and 50K NDPs in the system; though the
slowdowns would also appear when the links are set down.
Changes in v2:
- Fix RCU usage
- Document new net_device->neighbours field
Gilad Naaman (2):
Convert neighbour-table to use hlist
Create netdev->neighbour association
.../networking/net_cachelines/net_device.rst | 1 +
include/linux/netdevice.h | 6 +
include/net/neighbour.h | 18 +-
include/net/neighbour_tables.h | 13 +
net/core/neighbour.c | 224 +++++++++---------
5 files changed, 144 insertions(+), 118 deletions(-)
create mode 100644 include/net/neighbour_tables.h
--
2.46.0
next reply other threads:[~2024-10-06 6:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-06 6:47 Gilad Naaman [this message]
2024-10-06 6:47 ` [PATCH net-next v2 1/2] Convert neighbour-table to use hlist Gilad Naaman
2024-10-06 15:52 ` Kuniyuki Iwashima
2024-10-08 7:38 ` Gilad Naaman
2024-10-08 14:53 ` Kuniyuki Iwashima
2024-10-06 15:56 ` Kuniyuki Iwashima
2024-10-09 13:52 ` kernel test robot
2024-10-06 6:47 ` [PATCH net-next v2 2/2] Create netdev->neighbour association Gilad Naaman
2024-10-09 6:03 ` kernel test robot
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=20241006064747.201773-1-gnaaman@drivenets.com \
--to=gnaaman@drivenets.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.