Improve neigh_flush_dev performance
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v9 Latest6 patches 7 repliesApplied 6/6
- v86 patches 8 repliesSuperseded
- v76 patches 6 repliesSuperseded
Earlier versions · 6
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v6 | 6 patches | 6 replies | Superseded | |
| v5 | 6 patches | 4 replies | Superseded | |
| v4 | 6 patches | 9 replies | Superseded | |
| v3 | 2 patches | 5 replies | Superseded | |
| v2 | 2 patches | 4 replies | Superseded | |
| v1 | 2 patches | 3 replies | Superseded |
Changes in v9 from the cover letter
- Use RCU iteration in ___neigh_lookup_noref and neigh_dump_table
Patches in v9 All 6 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | neighbour: Add hlist_node to struct neighbourinclude/ net/ | +21 | 1 reply | Applied |
| 2/6 | neighbour: Define neigh_for_each_in_bucketinclude/ | +6 | 1 reply | Applied |
| 3/6 | neighbour: Convert seq_file functions to use hlistnet/ | +48 | 1 reply | Applied |
| 4/6 | neighbour: Convert iteration to use hlist+macroinclude/ net/ | +19 | 1 reply | Applied |
| 5/6 | neighbour: Remove bare neighbour::next pointerinclude/ net/ net/ | +12 | 1 reply | Applied |
| 6/6 | neighbour: Create netdev->neighbour associationDocumentation/ include/ include/ +2 more | +80 | 2 replies | Applied |
Reviews trailers per patch
All 6 patches have a Reviewed-by or Acked-by.
| Patch | Kuniyuki Iwashima | Eric Dumazet |
|---|---|---|
| 1/6 | R-b | R-b |
| 2/6 | R-b | R-b |
| 3/6 | R-b | R-b |
| 4/6 | R-b | R-b |
| 5/6 | R-b | R-b |
| 6/6 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next v9 0/6] Improve neigh_flush_dev performance
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 neigh-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 v9:
- Use RCU iteration in ___neigh_lookup_noref and neigh_dump_table
I kept the reviewed-by tags, as instructed, but note that there are minor changes in commits 2/6 and 4/6 (just adding the _rcu).
Gilad Naaman (6):
neighbour: Add hlist_node to struct neighbour
neighbour: Define neigh_for_each_in_bucket
neighbour: Convert seq_file functions to use hlist
neighbour: Convert iteration to use hlist+macro
neighbour: Remove bare neighbour::next pointer
neighbour: Create netdev->neighbour association
.../networking/net_cachelines/net_device.rst | 1 + include/linux/netdevice.h | 7 + include/net/neighbour.h | 26 +- include/net/neighbour_tables.h | 12 + net/core/neighbour.c | 325 ++++++++---------- net/ipv4/arp.c | 2 +- 6 files changed, 170 insertions(+), 203 deletions(-) create mode 100644 include/net/neighbour_tables.h
Signature · 1 line
2.34.1