Skip to content

NET Improve layering of structs dst_entry/rtable/rt6_info/dn_route to get less dcache footprint

Eric Dumazet netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5NET : Introduce union in struct dst_entry to hold 'next' pointerinclude/net/dst.h+6 -10 replies
2/5NET : Convert ipv4 route to use the new dst_entry 'next' pointerinclude/net/route.h net/ipv4/route.c+31 -320 replies
3/5NET : Convert ipv6 route to use the new dst_entry 'next' pointerinclude/net/ip6_fib.h net/ipv6/ip6_fib.c net/ipv6/route.c+20 -210 replies
4/5NET : Convert decnet route to use the new dst_entry 'next' pointer+0 -00 replies
4/5NET : Convert decnet route to use the new dst_entry 'next' pointerinclude/net/dn_route.h net/decnet/dn_route.c+18 -190 replies
5/5NET : Reorder fields of struct dst_entryinclude/net/dst.h+10 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] NET Improve layering of structs dst_entry/rtable/rt6_info/dn_route to get less dcache footprint

Hi David

Large routers/servers spend lot of CPU time in route cache lookups. This is because each item lookup uses two cache lines : the next pointer is at the begining of item, but keys are far away from this pointer.

Furthermore, the u unions declared in struct rtable, rt6_info and dn_route are imho quite ugly (forcing next pointer be at null offset)

This patch try to cleanup the layering and try to put the 'next' pointer near the fields used at lookup time (in ip_route_input() for example)

I prepared the following five patches :

[PATCH 1/5] : Introduce union in struct dst_entry, to prepare patches 2,3,4 [PATCH 2/5] : Convert ipv4 route to use the new dst_entry 'next' pointer [PATCH 3/5] : Convert ipv6 route to use the new dst_entry 'next' pointer [PATCH 4/5] : Convert decnet route to use the new dst_entry 'next' pointer [PATCH 5/5] : Reorder fields of struct dst_entry

Thank you
Eric Dumazet