All of lore.kernel.org
 help / color / mirror / Atom feed
From: gang.yan@linux.dev
To: "Paolo Abeni" <pabeni@redhat.com>,
	"Geliang Tang" <geliang@kernel.org>,
	mptcp@lists.linux.dev
Subject: Re: [PATCH v7 mptcp-next 0/7] mptcp: address stall under memory pressure
Date: Thu, 21 May 2026 03:23:13 +0000	[thread overview]
Message-ID: <6eedf75be575a1db987ad5b7b8226bf0f412f37d@linux.dev> (raw)
In-Reply-To: <5b4149a2-fa05-4f72-bb8c-f3ee82f07d63@redhat.com>

May 20, 2026 at 4:19 PM, "Paolo Abeni" <pabeni@redhat.com mailto:pabeni@redhat.com?to=%22Paolo%20Abeni%22%20%3Cpabeni%40redhat.com%3E > wrote:


> 
> On 5/20/26 8:32 AM, Geliang Tang wrote:
> 
> > 
> > On Tue, 2026-05-19 at 19:01 +0200, Paolo Abeni wrote:
> > 
> > > 
> > > 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 presents a significant change WRT the previous one,
> > >  avoiding entirely the collapse attempt on memory pressure. Note that
> > >  this choice represent a trade off: collapsing allow much faster
> > >  transfer
> > >  (to be more accurate: order of magnitude less slow) under some
> > >  extreme
> > >  conditions, but makes transfer slower and much more CPU intensive for
> > >  less unlikely conditions.
> > > 
> > >  As a consequence of the above the `mptcp_data.multi_chunk_sendfile`
> > >  test-case needs a 240 seconds timeout to complete successfully:
> > > 
> > >  TEST_F_TIMEOUT(mptcp, multi_chunk_sendfile, 240)
> > > 
> > >  The solution performing data collapsing would need similar long
> > >  timeout
> > >  for the multiproc tests cases: mutliproc_even, mutliproc_readers,
> > >  mutliproc_writers, mutliproc_sendpage_even,
> > >  mutliproc_sendpage_readers,
> > >  mutliproc_sendpage_writers.
> > > 
> >  
> >  Based on this version, I actually tested the MPTCP TLS self-tests and
> >  still encountered a few similar errors, with the test duration taking
> >  several times longer than before.
> > 
> [...]
> 
> > 
> > ... ...
> >  # # RUN tls.12_aes_gcm_mptcp.multi_chunk_sendfile ...
> >  # # multi_chunk_sendfile: Test terminated by timeout
> >  # # FAIL tls.12_aes_gcm_mptcp.multi_chunk_sendfile
> >  # not ok 3 tls.12_aes_gcm_mptcp.multi_chunk_sendfile
> > 
> Without this series you should get some stall there, right?
> 
> Note that the 'multi_chunk' test will require increasing the test-case timeout,
> as mentioned in v3:
> 
> ---
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_data.c b/tools/testing/selftests/net/mptcp/mptcp_data.c
> index 39d092e7888d..127d8b47bd39 100644
> --- a/tools/testing/selftests/net/mptcp/mptcp_data.c
> +++ b/tools/testing/selftests/net/mptcp/mptcp_data.c
> @@ -166,7 +166,7 @@ static void chunked_sendfile(struct __test_metadata *_metadata,
>  close(fd);
>  }
>  
> -TEST_F(mptcp, multi_chunk_sendfile)
> +TEST_F_TIMEOUT(mptcp, multi_chunk_sendfile, 240)
>  {
>  chunked_sendfile(_metadata, self, 4096, 4096);
>  chunked_sendfile(_metadata, self, 4096, 0);
> 
> ---
> 
Hi Paolo,

No offense intended at all— Geliang and I just wanted to confirm
whether this performance regression is expected, acceptable, or
something we can optimize further.

We tested the performance of mptcp_data.sh (time per run) 15 times
under the v7 patch and [1], and the results are as follows:

v7 results:
5.82 4.72 5.38 6.18 6.52 6.04 5.05 6.49 4.78 5.62 5.52 4.91 8.07 3.87 5.61

    Max: 8.07s, Min: 3.87s, Avg: 5.64s

[1] results:
2.98 3.44 3.11 3.06 3.78 3.23 3.28 2.88 3.52 3.33 2.89 3.33 3.91 3.20 3.45

    Max: 3.91s, Min: 2.88s, Avg: 3.29s

We’d appreciate your thoughts on whether this delta aligns with
expectations, or if there are further optimizations we should explore.


[1] https://patchwork.kernel.org/project/mptcp/cover/cover.1773735950.git.yangang@kylinos.cn/

Thanks
Gang

> The timeout could be reduced/avoided, including the 'collapse' strategy from v5
> and previous revisions. As hinted by Eric, collapsing is a sort of weak spot
> for potential evil peers and in practice causes high CPU usage increase to the
> point that in debug build some other test-cases will still require an increased
> timeout. 
> 
> AFAICS the multi chunk is really a corner case, especially when sending
> 1 byte chunk. As a trade off I prefer avoiding collapsing, and accept any
> solution that allow completion in the multi chunk test, even with very low
> tput. 
> 
> Side note: I think/I'm reasonably sure even plain TCP will have hard time
> with such that case in comparable conditions, i.e. when OoO happens with
> very high probability _after_ that the sender start pushing data at high speed, 
> but the upstream self-tests (rightfully) do not include the OoO part.
> 
> /P
>

  reply	other threads:[~2026-05-21  3:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19 17:01 [PATCH v7 mptcp-next 0/7] mptcp: address stall under memory pressure Paolo Abeni
2026-05-19 17:01 ` [PATCH v7 mptcp-next 1/7] mptcp: fix missing wakeups in edge scenarios Paolo Abeni
2026-05-19 17:01 ` [PATCH v7 mptcp-next 2/7] mptcp: explicitly drop over memory limits Paolo Abeni
2026-05-19 17:01 ` [PATCH v7 mptcp-next 3/7] mptcp: enforce hard limit on backlog flushing Paolo Abeni
2026-05-19 17:01 ` [PATCH v7 mptcp-next 4/7] mptcp: implemented OoO queue pruning Paolo Abeni
2026-05-19 17:01 ` [PATCH v7 mptcp-next 5/7] mptcp: track prune recovery status Paolo Abeni
2026-05-19 17:01 ` [PATCH v7 mptcp-next 6/7] mptcp: move the retrans loop to a separate helper Paolo Abeni
2026-05-19 17:01 ` [PATCH v7 mptcp-next 7/7] mptcp: let the retrans scheduler do its job Paolo Abeni
2026-05-19 18:09 ` [PATCH v7 mptcp-next 0/7] mptcp: address stall under memory pressure MPTCP CI
2026-05-20  6:32 ` Geliang Tang
2026-05-20  8:19   ` Paolo Abeni
2026-05-21  3:23     ` gang.yan [this message]
2026-05-21  8:04       ` Paolo Abeni

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=6eedf75be575a1db987ad5b7b8226bf0f412f37d@linux.dev \
    --to=gang.yan@linux.dev \
    --cc=geliang@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.