From: Eric Dumazet <eduma...@google.com> Date: Fri, 9 Aug 2019 05:04:47 -0700
> Starting from commit d41a69f1d390 ("tcp: make tcp_sendmsg() aware of socket > backlog") > loopback flows got hurt, because for each skb sent, the socket receives an > immediate ACK and sk_flush_backlog() causes extra work. > > Intent was to not let the backlog grow too much, but we went a bit too far. > > We can check the backlog every 16 skbs (about 1MB chunks) > to increase TCP over loopback performance by about 15 % > > Note that the call to sk_flush_backlog() handles a single ACK, > thanks to coalescing done on backlog, but cleans the 16 skbs > found in rtx rb-tree. > > Reported-by: Soheil Hassas Yeganeh <soh...@google.com> > Signed-off-by: Eric Dumazet <eduma...@google.com> Applied.