tcp: tsq: performance series
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest8 patches 7 repliesIn review
- v14 patches 2 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | tcp: tsq: add tsq_flags / tsq_enuminclude/ net/ | +18 | 0 replies | |
| 2/8 | tcp: tsq: remove one locked operation in tcp_wfree()net/ | +10 | 0 replies | |
| 3/8 | tcp: tsq: add shortcut in tcp_tasklet_func()net/ | +12 | 0 replies | |
| 4/8 | tcp: tsq: avoid one atomic in tcp_wfree()net/ | +4 | 0 replies | |
| 5/8 | tcp: tsq: add a shortcut in tcp_small_queue_check()net/ | +9 | 0 replies | |
| 6/8 | tcp: tcp_mtu_probe() is likely to exit earlynet/ | +9 | 0 replies | |
| 7/8 | net: reorganize struct sock for better data localityinclude/ | +27 | 2 replies | |
| 8/8 | tcp: tsq: move tsq_flags close to sk_wmem_allocinclude/ net/ net/ +3 more | +17 | 4 replies |
Reviews trailers per patch
None of the 8 patches has a Reviewed-by or Acked-by.
| Patch | Paolo Abeni |
|---|---|
| 1/8 | |
| 2/8 | |
| 3/8 | |
| 4/8 | |
| 5/8 | |
| 6/8 | |
| 7/8 | T-b |
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 net-next 0/8] tcp: tsq: performance series
Under very high TX stress, CPU handling NIC TX completions can spend considerable amount of cycles handling TSQ (TCP Small Queues) logic.
This patch series avoids some atomic operations, but most notable patch is the 3rd one, allowing other cpus processing ACK packets and calling tcp_write_xmit() to grab TCP_TSQ_DEFERRED so that tcp_tasklet_func() can skip already processed sockets.
This avoid lots of lock acquisitions and cache lines accesses, particularly under load.
In v2, I added :
- tcp_small_queue_check() change to allow 1st and 2nd packets in write queue to be sent, even in the case TX completion of already acknowledged packets did not happen yet. This helps when TX completion coalescing parameters are set even to insane values, and/or busy polling is used.
- A reorganization of struct sock fields to
lower false sharing and increase data locality.
- Then I moved tsq_flags from tcp_sock to struct sock also to reduce cache line misses during TX completions.
I measured an overall throughput gain of 22 % for heavy TCP use over a single TX queue.
Eric Dumazet (8):
tcp: tsq: add tsq_flags / tsq_enum
tcp: tsq: remove one locked operation in tcp_wfree()
tcp: tsq: add shortcut in tcp_tasklet_func()
tcp: tsq: avoid one atomic in tcp_wfree()
tcp: tsq: add a shortcut in tcp_small_queue_check()
tcp: tcp_mtu_probe() is likely to exit early
net: reorganize struct sock for better data locality
tcp: tsq: move tsq_flags close to sk_wmem_alloc
include/linux/tcp.h | 12 +++++-- include/net/sock.h | 51 +++++++++++++++-------------- net/ipv4/tcp.c | 4 +-- net/ipv4/tcp_ipv4.c | 2 +- net/ipv4/tcp_output.c | 91 +++++++++++++++++++++++++++++++-------------------- net/ipv4/tcp_timer.c | 4 +-- net/ipv6/tcp_ipv6.c | 2 +- 7 files changed, 98 insertions(+), 68 deletions(-)
Signature · 1 line
2.8.0.rc3.226.g39d4020