From: Matthieu Baerts <matttbe@kernel.org>
To: Shardul Bankar <shardul.b@mpiricsoftware.com>
Cc: MPTCP Linux <mptcp@lists.linux.dev>
Subject: Re: [PATCH mptcp-next 0/3] mptcp: sched: penalise a slow subflow (#345, first cut for your lab)
Date: Fri, 7 Aug 2026 18:10:06 +0200 [thread overview]
Message-ID: <c4180506-a5a8-40c0-87db-a33a61ca0fe3@kernel.org> (raw)
In-Reply-To: <745def4591c1b3b35ace0719159fe2c6cbbab467.camel@mpiricsoftware.com>
Hi Shardul,
Thank you for your reply!
On 07/08/2026 17:17, Shardul Bankar wrote:
> Hi Matt,
>
> On Wed, 2026-07-29 at 13:48 +0200, Matthieu Baerts wrote:
>> Hi Shardul,
>>
>> On 26/07/2026 07:55, Shardul Bankar wrote:
>>>
>>>
>>> - 2/3 is a guard that is in neither the fork nor what I described.
>>> Without it,
>>> 1/3 regresses badly (about 2x slower in my runs) when the
>>> connection is
>>> receive-window-limited. In that case the fastest path is capped
>>> by the same
>>> shared window, so it cannot absorb what the slow path gives up,
>>> and halving
>>> just sheds the slow path's throughput. 2/3 skips the penalty
>>> while the
>>> application has queued past the send-window edge (write_seq >
>>> wnd_end), which
>>> is the sign that the receiver, not our congestion window, is the
>>> bottleneck.
>>> I kept it a separate patch so you can test 1/3 on its own, or
>>> drop or retune
>>> 2/3 independently. The exact condition is the piece I would most
>>> value your
>>> lab checking.
>>
>> It feels to me that you require this because patch 1/3 doesn't check
>> if
>> the MPTCP connection was "send-buffer-limited", no? But you are doing
>> something very similar, no? Without testing, it feels like this is
>> required not to limit the penalisation to when it is really needed.
>>
>
> Patch 1 does gate on load, with tcp_is_cwnd_limited(); though that is
> not the send-buffer-limited check. The send-buffer-limited check never
> fires at scheduler time in this tree, as the msk buffer has just
> drained into the subflows. Patch 2 guards the receive-window-limited
> case, where patch 1 without it can regress the transfer about 2x in my
> tests. I have kept it as the explicit guard and am still characterizing
> when patch 1 alone would suffice. Would you prefer we drop it?
Dropping it, no, but I was more thinking about squashing. But fine to
keep it separated (but within the same series) for now or even for the
final version if that helps with the explanations and reviews.
>>> I drove those regimes with a small simult_flows variant (receive-
>>> window-
>>> limited, send-buffer-limited, and autotuned cases). It is a helper,
>>> not
>>> selftest quality, so I did not fold it into the series; it is on a
>>> branch of
>>> my tree, in case it saves your lab time or you spot a case I
>>> missed:
>>>
>>> https://github.com/shardulsdk-mpiric/linux/blob/6926c4b7f583/tools/testing/selftests/net/mptcp/mptcp_sched_penalise.sh
>>>
>>> Run it on a baseline and a patched kernel and compare (prefix with
>>> MPTCP_LIB_IP_MPTCP=1 if pm_nl_ctl does not work in your setup):
>>>
>>> SCENARIO=suite
>>> ./mptcp_sched_penalise.sh
>>> SCENARIO=unbounded
>>> ./mptcp_sched_penalise.sh
>>> SCENARIO=rwnd RCVBUF=262144
>>> ./mptcp_sched_penalise.sh
>>> SCENARIO=sndbuf SNDBUF=65536
>>> ./mptcp_sched_penalise.sh
>>> SCENARIO=both RCVBUF=262144 SNDBUF=65536
>>> ./mptcp_sched_penalise.sh
>>
>> Sounds good! Did you check with a fixed sndbuf higher than the rcv
>> one?
>>
>
> Yes (SNDBUF 256K, RCVBUF 128K). The guard correctly suppresses the
> penalty there: the receiver is genuinely at a zero window (receive-
> window-limited, not congestion-limited), and it is not slower than
> baseline.
Nice, thank you!
>> Also, be careful that with netem, the limits you give to run_test()
>> can
>> influence a lot the bufferbloat. Did you monitor the RTTs during
>> these
>> transfers?
>>
>
> I do now. The harness samples the subflows' srtt, and it confirms your
> point: the netem queue length drives it (srtt max is about 40 ms with
> the fast path alone, rising to several seconds on a bufferbloated
> path).
>
>> On the other hand, it would be good to validate this with one path
>> having bufferbloat. These patches should also help to improve the
>> situation. (And issue #332 should help even more)
>>
>
> I added a bufferbloated-slow-path case, but it was too noisy to draw a
> firm conclusion: the completion times swung widely, and the same swing
> was on the baseline kernel, so my setup is not measuring the effect
> cleanly. I would build a more controlled bufferbloat case (a moderate,
> stable queue, and a latency metric rather than completion time). I
> agree #332 is likely the bigger lever there.
Indeed, that's where my lab would be handy (but not ready yet, keep
being delayed by "urgent fixes"...)
>>> For the rwnd/sndbuf/both scenarios the simult_flows pass/fail bound
>>> is not
>>> meaningful (it assumes both paths are fully used): read the printed
>>> runtime
>>> and out-of-order counts, not OK/FAIL. The "both" case also
>>> occasionally fails
>>> to bring up the second subflow with the very small SO_SNDBUF; just
>>> rerun it if
>>> you see a single-subflow run.
>>
>> I see, yes. I think what is important here for #345, is that when the
>> transfer is buffer limited, the slow subflow impact should be
>> reduced.
>> At least not to cause the transfer to be worse than without this slow
>> subflow.
>>
>
> Using that as the bar: when send-buffer-limited, the penalised two-path
> transfer beats the fast path alone (about 11.3 s against 14.4 s), with
> roughly 15 to 20% less out-of-order data, so the slow subflow helps.
> When it is bufferbloated, it comes out about even with the fast path
> alone.
Excellent!
> I have all of these changes ready in my tree. I would rather settle
> whether patch 2 stays (above) and the counters question on 3/3 before I
> post v2, but I am glad to send v2 now if you would prefer to look at
> the code directly.
See my other replies, but in short:
- patch 2 can stay or not, up to you
- extending the tracing and keeping the counters (at least "Penalized")
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
prev parent reply other threads:[~2026-08-07 16:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-26 5:55 [PATCH mptcp-next 0/3] mptcp: sched: penalise a slow subflow (#345, first cut for your lab) Shardul Bankar
2026-07-26 5:55 ` [PATCH mptcp-next 1/3] mptcp: sched: penalise a slow subflow by halving its cwnd Shardul Bankar
2026-07-29 11:49 ` Matthieu Baerts
2026-08-07 15:18 ` Shardul Bankar
2026-08-07 16:10 ` Matthieu Baerts
2026-07-26 5:55 ` [PATCH mptcp-next 2/3] mptcp: sched: do not penalise when receive-window-limited Shardul Bankar
2026-07-29 11:49 ` Matthieu Baerts
2026-08-07 15:18 ` Shardul Bankar
2026-07-26 5:55 ` [PATCH mptcp-next 3/3] DO-NOT-MERGE: mptcp: sched: penalise counters Shardul Bankar
2026-07-29 11:50 ` Matthieu Baerts
2026-08-07 15:19 ` Shardul Bankar
2026-08-07 16:10 ` Matthieu Baerts
2026-07-26 7:14 ` [PATCH mptcp-next 0/3] mptcp: sched: penalise a slow subflow (#345, first cut for your lab) MPTCP CI
2026-07-29 11:48 ` Matthieu Baerts
2026-08-07 15:17 ` Shardul Bankar
2026-08-07 16:10 ` Matthieu Baerts [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c4180506-a5a8-40c0-87db-a33a61ca0fe3@kernel.org \
--to=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=shardul.b@mpiricsoftware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox