[PATCH v8 mptcp-next 0/9] mptcp: address stall under memory pressure

Paolo Abeni posted 9 patches 2 days, 5 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/cover.1779485511.git.pabeni@redhat.com
net/mptcp/mib.c      |   3 +
net/mptcp/mib.h      |   3 +
net/mptcp/options.c  |  71 +++++++++----
net/mptcp/protocol.c | 245 ++++++++++++++++++++++++++++++++-----------
4 files changed, 237 insertions(+), 85 deletions(-)
[PATCH v8 mptcp-next 0/9] mptcp: address stall under memory pressure
Posted by Paolo Abeni 2 days, 5 hours ago
This an attempt to fix the data transfer stall reported by Geliang and
Gang more carefully enforcing memory constraints at the MPTCP level.

This iteration introduces a few more fixes for pre-existing issues,
and keep the same trade-off as before: avoiding entirely the collapse
attempt on memory pressure. Collapsing allow faster transfer
(to be more accurate: less slow) under some extreme conditions, but
makes transfer slower and much more CPU intensive for less unlikely
conditions.

As a consequences `multi_chunk_sendfile` and `multiproc*` test cases in
mptcp_data *may* require longer timeout than default[1].

Patch 1 - 4 are actually fixes for pre-existing issues targeting net,
included here just for my convenience.

Patch 5 and 6 make the admission check much more strict for incoming
packets exceeding the memory limits, with some exception for fallback
sockets.
Patch 7 implements OoO queue pruning for MPTCP and patch 5
addresses an edge scenario that could still lead to transfer stall
under memory pressure.
Finally patch 8 and 9 improve the MPTCP-level retransmission schema to
make recovery from memory pressure/after MPTCP-level drop significantly
faster.

[1] In my testing on v8 mptcp_data survived a few hundred iterations
with the default timeout. Some independent testing would be appreciated.
---
v7 -> v8:
  - added patch 3 & 4
  - some change for patch 5 avoiding dumb optimizations that added
    complexity. this also allowed removing patch "mptcp: track prune
    recovery status"
  - address some of sashiko feedback

Paolo Abeni (9):
  mptcp: fix missing wakeups in edge scenarios
  mptcp: fix retransmission loop when csum is enabled
  mptcp: close TOCTOU race while computing rcv_wnd
  mptcp: allow subflow rcv wnd to shrink
  mptcp: explicitly drop over memory limits
  mptcp: enforce hard limit on backlog flushing
  mptcp: implemented OoO queue pruning
  mptcp: move the retrans loop to a separate helper
  mptcp: let the retrans scheduler do its job.

 net/mptcp/mib.c      |   3 +
 net/mptcp/mib.h      |   3 +
 net/mptcp/options.c  |  71 +++++++++----
 net/mptcp/protocol.c | 245 ++++++++++++++++++++++++++++++++-----------
 4 files changed, 237 insertions(+), 85 deletions(-)

-- 
2.54.0
Re: [PATCH v8 mptcp-next 0/9] mptcp: address stall under memory pressure
Posted by MPTCP CI 2 days, 4 hours ago
Hi Paolo,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal (except selftest_mptcp_join): Success! ✅
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Unstable: 2 failed test(s): packetdrill_dss packetdrill_fastopen ⚠️ 
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/26314295414

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/0bcab31fe736
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1099630


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)