Re: [PATCH mptcp-next 1/3] mptcp: sched: penalise a slow subflow by halving its cwnd
Matthieu Baerts <[email protected]>
| Newsgroups | dev.linux.lists.mptcp |
|---|---|
| Organization | NGI0 Core |
| Message-ID | <[email protected]> |
Hi Shardul,
Thank you for your reply!
On 07/08/2026 17:18, Shardul Bankar wrote:
> On Wed, 2026-07-29 at 13:49 +0200, Matthieu Baerts wrote:
>> On 26/07/2026 07:55, Shardul Bankar wrote:
(...)
>>> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
>>> index da40c6f3705f..2bf801292563 100644
>>> --- a/net/mptcp/protocol.h
>>> +++ b/net/mptcp/protocol.h
>>> @@ -587,6 +587,7 @@ struct mptcp_subflow_context {
>>> __unused : 8;
>>> bool data_avail;
>>> bool scheduled;
>>> + bool penalise; /* scheduler flagged this
>>> subflow for cwnd halving */
>>
>> (If you don't need to read this locklessly, then you can probably use
>> one unused bit.)
>>
>
> It is written under two locks (set in the scheduler under the msk lock,
> cleared in the push path under the subflow lock), so a shared bitfield
> word would race on the read-modify-write, and I kept it a bool for that
> reason. If you see a single-lock way to do it, I am glad to move it to
> a bit.
I didn't check all entries from the bitfield a few lines above, but are
they not also written under the subflow lock? (but maybe not under the
msk lock)
But if you saw a risk, fine to keep it like that.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.