MPTCP Linux Development
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Geliang Tang <geliangtang@gmail.com>,
	mptcp@lists.linux.dev, Christoph Paasch <cpaasch@apple.com>
Cc: Geliang Tang <geliangtang@xiaomi.com>
Subject: Re: [PATCH RFC mptcp-next 3/4] mptcp: round-robin packet scheduler support
Date: Tue, 07 Sep 2021 13:16:19 +0200	[thread overview]
Message-ID: <bf211816c921732874fcc66cade7a86c2eaecfa8.camel@redhat.com> (raw)
In-Reply-To: <95d450f9694cf9d95081a77db529db2181d0d3b3.1631011068.git.geliangtang@xiaomi.com>

On Tue, 2021-09-07 at 18:41 +0800, Geliang Tang wrote:
> From: Geliang Tang <geliangtang@xiaomi.com>
> 
> Implement the round-robin packet scheduler like on the mptcp.org kernel.
> 
> Signed-off-by: Geliang Tang <geliangtang@xiaomi.com>
> ---
>  net/mptcp/Kconfig    |  7 +++++++
>  net/mptcp/protocol.c | 26 ++++++++++++++++++++++++++
>  2 files changed, 33 insertions(+)
> 
> diff --git a/net/mptcp/Kconfig b/net/mptcp/Kconfig
> index 10c97e19a7da..0df36991566a 100644
> --- a/net/mptcp/Kconfig
> +++ b/net/mptcp/Kconfig
> @@ -23,6 +23,13 @@ config MPTCP_IPV6
>  	depends on IPV6=y
>  	default y
>  
> +config MPTCP_ROUNDROBIN
> +	tristate "MPTCP Round-Robin"
> +	default n
> +	help
> +	  This is a very simple round-robin scheduler. Probably has bad performance
> +	  but might be interesting for researchers.
> +
>  config MPTCP_KUNIT_TEST
>  	tristate "This builds the MPTCP KUnit tests" if !KUNIT_ALL_TESTS
>  	depends on KUNIT
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index ab72a3950f2b..b78c4eb4947f 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -1521,6 +1521,29 @@ static struct mptcp_sched_ops mptcp_sched_default = {
>  	.owner		= THIS_MODULE,
>  };
>  
> +#if IS_ENABLED(CONFIG_MPTCP_ROUNDROBIN)
> +static struct sock *rr_get_subflow(struct mptcp_sock *msk)
> +{
> +	struct mptcp_subflow_context *subflow;
> +	struct sock *ssk;
> +
> +	mptcp_for_each_subflow(msk, subflow) {
> +		ssk = mptcp_subflow_tcp_sock(subflow);
> +		if (ssk != msk->last_snd) {
> +			pr_debug("msk=%p ssk=%p last_snd=%p", msk, ssk, msk->last_snd);
> +			msk->last_snd = ssk;
> +		}

This needs some more logic:
- it must take in account backup vs non backup
- it should consider if the given subflow has available write
space/snd_wnd
- it should move from the 'last_snd' subflow to the 'next' one, instead
of always selecting the fist subflow other then 'last_snd'. Otherwise
with 3 non backup subflow active we will never pick the last created
one.

There is an import side question, already asked by Christoph, why the
round robin? perhpas we should consider instead some different
scheduler, known to perform well. @Christoph: which is the 'best'
mptcp.org scheduler out there? blest?

Thanks!

Paolo


  reply	other threads:[~2021-09-07 11:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07 10:41 [PATCH RFC mptcp-next 0/4] round-robin packet scheduler support Geliang Tang
2021-09-07 10:41 ` [PATCH RFC mptcp-next 1/4] mptcp: add a new sysctl scheduler Geliang Tang
2021-09-07 10:59   ` Paolo Abeni
2021-09-07 10:41 ` [PATCH RFC mptcp-next 2/4] mptcp: add struct mptcp_sched_ops Geliang Tang
2021-09-07 11:04   ` Paolo Abeni
2021-09-07 10:41 ` [PATCH RFC mptcp-next 3/4] mptcp: round-robin packet scheduler support Geliang Tang
2021-09-07 11:16   ` Paolo Abeni [this message]
2021-09-09  0:18     ` Mat Martineau
2021-09-07 10:41 ` [PATCH RFC mptcp-next 4/4] selftests: mptcp: add round-robin testcase Geliang Tang

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=bf211816c921732874fcc66cade7a86c2eaecfa8.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=cpaasch@apple.com \
    --cc=geliangtang@gmail.com \
    --cc=geliangtang@xiaomi.com \
    --cc=mptcp@lists.linux.dev \
    /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