ovpn: reduce cacheline contention in the data path
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest3 patches 0 repliesNew
- v23 patches 0 repliesSuperseded
- v13 patches 0 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | ovpn: use percpu references for peersdrivers/ drivers/ drivers/ +2 more | +77 | 0 replies | |
| 2/3 | ovpn: use percpu references for key slotsdrivers/ drivers/ drivers/ | +43 | 0 replies | |
| 3/3 | ovpn: use per-CPU peer statisticsdrivers/ drivers/ drivers/ +7 more | +104 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [Openvpn-devel] [PATCH ovpn net-next v3 0/3] ovpn: reduce cacheline contention in the data path
Packet processing updates shared peer and key-slot reference counters and per-peer statistics. These updates cause cacheline contention when traffic for one peer is spread across CPUs.
Use percpu_ref for peers and key slots, and per-CPU counters for peer statistics. Separate read-mostly fields from fields written per packet to reduce false sharing.
Tests used an EPYC 7443 encryptor and a workstation decryptor, with five flows pinned to separate cores across four CCDs and RPS enabled on the encryptor's tunnel interface. Results are averages of four interleaved runs per configuration.
The per-CPU conversions increased throughput from 12.095 to 12.856 Gbit/s (+6.29%). The cacheline layout changes included in this series added another 2.11%, bringing the total gain to approximately 8.5%.
With all cores on one CCD, changes ranged from -0.9% to +1.5%, within measurement variance. The benefit is therefore most visible when traffic spans CCDs.
Marco Baffo (1):
ovpn: use per-CPU peer statistics
Ralf Lici (2):
ovpn: use percpu references for peers
ovpn: use percpu references for key slots
drivers/net/ovpn/Makefile | 1 - drivers/net/ovpn/crypto.c | 16 ++++----- drivers/net/ovpn/crypto.h | 33 +++++++++++++++--- drivers/net/ovpn/crypto_aead.c | 20 ++++++++--- drivers/net/ovpn/io.c | 17 +++++---- drivers/net/ovpn/netlink.c | 26 ++++++++------ drivers/net/ovpn/peer.c | 59 +++++++++++++++++++++---------- drivers/net/ovpn/peer.h | 57 ++++++++++++++++++++++++------ drivers/net/ovpn/stats.c | 21 ------------ drivers/net/ovpn/stats.h | 63 ++++++++++++++++++++-------------- drivers/net/ovpn/tcp.c | 42 +++++++++++------------ 11 files changed, 220 insertions(+), 135 deletions(-) delete mode 100644 drivers/net/ovpn/stats.c
Signature · 8 lines
2.43.0 _______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel