Skip to content

tcp: better handling of memory pressure

Eric Dumazet netdev 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 3 repliesIn review
  2. v16 patches 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6net: fix sk_mem_reclaim_partial()include/net/sock.h net/core/sock.c+8 -71 reply
2/6tcp: rename sk_forced_wmem_schedule() to sk_forced_mem_schedule()include/net/tcp.h net/ipv4/tcp_output.c+6 -20 replies
3/6tcp: introduce tcp_under_memory_pressure()include/net/tcp.h net/ipv4/tcp_input.c net/ipv4/tcp_output.c +1 more+15 -70 replies
4/6tcp: fix behavior for epoll edge triggernet/ipv4/tcp.c+13 -20 replies
5/6tcp: allow one skb to be received per socket under memory pressurenet/ipv4/tcp_input.c+6 -40 replies
6/6tcp: halves tcp_mem[] limitsnet/ipv4/tcp.c+5 -40 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJason Baron
SeriesA-b
1/6
2/6
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 net-next 0/6] tcp: better handling of memory pressure

When testing commit 790ba4566c1a ("tcp: set SOCK_NOSPACE under memory pressure") using edge triggered epoll applications, I found various issues under memory pressure and thousands of active sockets.

This patch series is a first round to solve these issues, in send and receive paths. There are probably other fixes needed, but with this series, my tests now all succeed.

v2: fix typo in "allow one skb to be received per socket under memory pressure", as spotted by Jason Baron.

Eric Dumazet (6):
net: fix sk_mem_reclaim_partial()
tcp: rename sk_forced_wmem_schedule() to sk_forced_mem_schedule()
tcp: introduce tcp_under_memory_pressure()
tcp: fix behavior for epoll edge trigger
tcp: allow one skb to be received per socket under memory pressure
tcp: halves tcp_mem[] limits

 include/net/sock.h    |  6 +++---
 include/net/tcp.h     | 10 ++++++++++
 net/core/sock.c       |  9 +++++----
 net/ipv4/tcp.c        | 24 ++++++++++++++++++------
 net/ipv4/tcp_input.c  | 18 ++++++++++--------
 net/ipv4/tcp_output.c | 10 ++++++----
 net/ipv4/tcp_timer.c  |  2 +-
 7 files changed, 53 insertions(+), 26 deletions(-)
Signature · 1 line
2.2.0.rc0.207.ga3a616c