Skip to content

mptcp: rework mptcp_sendmsg

Florian Westphal mptcp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest7 patches 2 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7mptcp: break and restart in case mptcp sndbuf is fullnet/mptcp/protocol.c+30 -72 replies
2/7mptcp: avoid blocking in tcp_sendpagesnet/mptcp/protocol.c+30 -30 replies
3/7mptcp: make sure timer is inited once data is pending for transmissionnet/mptcp/protocol.c+3 -20 replies
4/7mptcp: fill skb extension cache outside of mptcp_sendmsg_fragnet/mptcp/protocol.c+14 -40 replies
5/7mptcp: fill skb page frag cache outside of mptcp_sendmsg_fragnet/mptcp/protocol.c+6 -10 replies
6/7mptcp: remove inner wait loop from mptcp_sendmsg_fragnet/mptcp/protocol.c+0 -140 replies
7/7net: allow __skb_ext_alloc to sleepinclude/linux/skbuff.h net/core/skbuff.c net/mptcp/protocol.c+9 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [MPTCP] [PATCH net-next v2 0/7] mptcp: rework mptcp_sendmsg

This series reworks mptcp_sendmsg logic to avoid blocking on the subflow socket.
This is another iteration, because there were problems with the previous one.

1. Add a new patch 1/7 to stop mptcp from accepting megabytes worth of data when tcp data gets acked at subflow level quickly, but not at mptcp level.

2. drop the patch that cached an skb in sk->sk_tx_skb_cache. One problem with that patch was that it sabotages an extra check that tcp has: when it allocates and skb it will behave slightly differently when the tcp write and retrans queues are empty wrt. wmem schedule.
By preallocating in mptcp layer that code gets bypassed. Moreover, the preallocation doesn't buy anything; the allocation can schedule but it won't sleep forever.

3. for the 3rd patch I moved the initialisation to a single location, also the timer is only started before returning to userspace. As long was we keep looping, the timer doesn't have to be started here as it will be kicked by mptcp_data_acked() for the incoming acks.

4. xmit via lo and MPTCP is SLOOOOOOOOW in 'mmap' mode. However it turned out this is already the case without these patches, so I decided to send these patches out anyway.
I will send another email to followup up on this.

I've preserved Paolos ACKs on patches that had no changes vs. v1.

Florian Westphal (7):
mptcp: break and restart in case mptcp sndbuf is full
mptcp: avoid blocking in tcp_sendpages
mptcp: make sure timer is inited once data is pending for transmission
mptcp: fill skb extension cache outside of mptcp_sendmsg_frag
mptcp: fill skb page frag cache outside of mptcp_sendmsg_frag
mptcp: remove inner wait loop from mptcp_sendmsg_frag
net: allow __skb_ext_alloc to sleep

 include/linux/skbuff.h |   2 +-
 net/core/skbuff.c      |   8 ++--
 net/mptcp/protocol.c   | 116 ++++++++++++++++++++++++++++++++++++-------------
 3 files changed, 91 insertions(+), 35 deletions(-)