Skip to content

RFC mptcp: opportunistic reinjection on an idle subflow

Abdul Wasey mptcp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest1 patch 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1mptcp: opportunistic reinjection on an idle subflownet/mptcp/mib.c net/mptcp/mib.h net/mptcp/options.c +2 more+299 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC PATCH mptcp-next 0/1] mptcp: opportunistic reinjection on an idle subflow

This is an attempt at issue #332, the "opportunistic retransmission" of section 4.2 of the NSDI 2012 paper, which the out-of-tree kernel had.

I found it from a multi-WAN router: a fast link next to a slow one gets much less than the fast link alone, because data sent on the slow link holds back the DATA_ACK until the receive window or the send buffer is used up. With the default tcp_rmem, a 400 Mbit link next to a 15 Mbit/240 ms one gave 67-82 Mbit in total with BBR, and 30-142 with CUBIC. With this patch it is 320-345, and uploads gain the same.

When a DATA_ACK shows that no new data can go out and an active subflow is idle, the data the slower subflows hold is resent on it: the ranges from the DSS mappings in their queues, not everything from snd_una. It only does so when the copy can arrive at least one RTT of the idle subflow sooner, and no more than the idle subflow can send in that time. Without these limits it cost about 1% on simult_flows.sh's unbalanced cases, and even waking the worker for nothing showed there, so the decision is made before scheduling it.

A subflow that had a retransmission timeout and no progress since is left alone: the copies would keep the MPTCP-level timeout from firing, and with it the stale detection (mptcp_join.sh's "multiple flows, signal, link failure" caught that).

Tested in netns on the current export, against the same kernel without the patch: nine 2-path cases with BBR and CUBIC, 6 and 32 MB tcp_rmem, uploads and downloads, 3 runs each and 16 for the slow lossy path. mptcp_connect.sh, mptcp_join.sh (twice) and simult_flows.sh (16 runs) pass as they do without the patch. The 2-path cases, mptcp_connect.sh and simult_flows.sh also ran on a KASAN + lockdep kernel, with no report, and on a KCSAN one, whose reports are the same data races in mptcp_subflow_get_send() and mptcp_subflow_active() that it shows without the patch.

Questions, since this is an RFC:
- It is in the core, for every scheduler. Should it rather be a scheduler hook (#344), with the default scheduler using it?
- The rules (slower, one RTT of gain, budget) come from my tests. Is there a better signal to use here?
- mptcp_oppr_check() runs on each DATA_ACK and reads the other subflows' queues and RTTs without their locks: is that acceptable as a heuristic, or should it be done differently?
- I could not find a short simult_flows.sh case where the stock kernel is clearly slower: the stall needs a few seconds of traffic to build up. Would a counter based test (OppReinject moving on a lossy slow path, with the data checked) be enough?

Abdul Wasey (1):
mptcp: opportunistic reinjection on an idle subflow

 net/mptcp/mib.c      |   2 +
 net/mptcp/mib.h      |   2 +
 net/mptcp/options.c  |   1 +
 net/mptcp/protocol.c | 291 +++++++++++++++++++++++++++++++++++++++++++
 net/mptcp/protocol.h |   3 +
 5 files changed, 299 insertions(+)
Signature · 1 line
2.43.0