RFC net: mitigate retpoline overhead
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest4 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | indirect call wrappers: helpers to speed-up indirect calls of builtininclude/ | +77 | 2 replies | |
| 2/4 | net: use indirect call wrappers at GRO network layerinclude/ net/ net/ +1 more | +18 | 0 replies | |
| 3/4 | net: use indirect call wrapper at GRO transport layerinclude/ net/ net/ +4 more | +44 | 0 replies | |
| 4/4 | udp: use indirect call wrapper for GRO socket lookupnet/ net/ net/ | +8 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/4] net: mitigate retpoline overhead
The spectre v2 counter-measures, aka retpolines, are a source of measurable overhead[1]. We can partially address that when the function pointer refers to a builtin symbol resorting to a list of tests vs well-known builtin function and direct calls.
This may lead to some uglification around the indirect calls. In netconf 2018 Eric Dumazet described a technique to hide the most relevant part of the needed boilerplate with some macro help.
This series is a [re-]implementation of such idea, exposing the introduced helpers in a new header file. They are later leveraged to avoid the indirect call overhead in the GRO path, when possible.
Overall this gives > 10% performance improvement for UDP GRO benchmark, and smaller but measurable under for TCP syn flood.
The added infra can be used in follow-up patches to cope with retpoline overhead in other points of the networking stack (e.g. at the qdisc layer) and possibly even in other subsystems.
Paolo Abeni (4):
indirect call wrappers: helpers to speed-up indirect calls of builtin
net: use indirect call wrappers at GRO network layer
net: use indirect call wrapper at GRO transport layer
udp: use indirect call wrapper for GRO socket lookup
include/linux/indirect_call_wrapper.h | 77 +++++++++++++++++++++++++++ include/net/inet_common.h | 9 ++++ net/core/dev.c | 10 +++- net/ipv4/af_inet.c | 15 +++++- net/ipv4/tcp_offload.c | 5 ++ net/ipv4/udp.c | 2 + net/ipv4/udp_offload.c | 11 +++- net/ipv6/ip6_offload.c | 14 ++++- net/ipv6/tcpv6_offload.c | 5 ++ net/ipv6/udp.c | 2 + net/ipv6/udp_offload.c | 5 ++ 11 files changed, 147 insertions(+), 8 deletions(-) create mode 100644 include/linux/indirect_call_wrapper.h
Signature · 1 line
2.19.2