Files
tailscale/kernel/linux
Brad Fitzpatrick 842a082cc5 kernel/linux/src: free sent packets on the tx worker, not the encrypt workers
The encrypt workers freed each list's original packets as soon as they
were encrypted. For TCP, freeing releases the socket's small queues
accounting (tcp_wfree), whose TSQ handlers then ran on all the encrypt
workers' CPUs at once and contended for the socket lock (about 5% of
each sender CPU in queued_spin_lock_slowpath). Free them instead on the
peer's tx worker once their encrypted packets are sent, which is also
when upstream releases them.

Bulk TCP in the lean harness (medians of interleaved runs): 1 stream
10.4 Gbps (wireguard-go 10.0), 4 streams 12.7 Gbps (wireguard-go 11.1).

Updates #426

Signed-off-by: Brad Fitzpatrick <[email protected]>
Change-Id: I904dea12ccfd7bc0534d616eb319fd692eefd832
2026-11-07 13:32:47 +00:00
..