All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] Re: [PATCH v2 mptcp-next 2/4] mptcp: re-enable sndbuf autotune
@ 2021-01-12 10:27 Paolo Abeni
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Abeni @ 2021-01-12 10:27 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1903 bytes --]

On Mon, 2021-01-11 at 17:01 -0800, Mat Martineau wrote:
> On Mon, 11 Jan 2021, Paolo Abeni wrote:
> 
> > After commit 6e628cd3a8f7 ("mptcp: use mptcp release_cb for
> > delayed tasks"), MPTCP never sets the flag bit SOCK_NOSPACE
> > on its subflow. As a side effect, autotune never takes place,
> > as it happens inside tcp_new_space(), which in turn is called
> > only when the mentioned bit is set.
> > 
> > Let's sendmsg() set the subflows NOSPACE bit when looking for
> > more memory. Additionally, cleanup the sndbuf propagation from
> > subflow into the msk, leveraging the subflow write space callback
> > and dropping a bunch of duplicate code.
> > 
> > This also makes the SNDBUF_LIMITED chrono relevant again
> > for MPTCP subflows.
> > 
> > Fixes: 6e628cd3a8f7 ("mptcp: use mptcp release_cb for delayed tasks")
> > Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
> > ---
> > v1 -> v2:
> > - leverage the previous commit, so we can always simply set the nospace
> >   bit on the msk/parent socket
> > ---
> > net/mptcp/protocol.c | 57 +++++++++++++++++++-------------------------
> > net/mptcp/protocol.h | 20 ++++++++++++++++
> > net/mptcp/subflow.c  | 10 +++++++-
> > 3 files changed, 53 insertions(+), 34 deletions(-)
> > 
> > diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> > index ada69495a51b..a64b2f6fb17b 100644
> > --- a/net/mptcp/protocol.c
> > +++ b/net/mptcp/protocol.c
> > @@ -1421,7 +1410,8 @@ static struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk,
> > 		 send_info[1].ssk, send_info[1].ratio);
> > 
> > 	/* pick the best backup if no other subflow is active */
> > -	if (!nr_active)
> > +	msk->use_backup = !nr_active;
> > +	if (msk->use_backup)
> 
> This is the only place msk->use_backup is read. Is this a leftover from 
> v1?

Indeed! thanks for noticing! I will drop that in the next iteration.

Paolo

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [MPTCP] Re: [PATCH v2 mptcp-next 2/4] mptcp: re-enable sndbuf autotune
@ 2021-01-12  1:01 Mat Martineau
  0 siblings, 0 replies; 2+ messages in thread
From: Mat Martineau @ 2021-01-12  1:01 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1706 bytes --]

On Mon, 11 Jan 2021, Paolo Abeni wrote:

> After commit 6e628cd3a8f7 ("mptcp: use mptcp release_cb for
> delayed tasks"), MPTCP never sets the flag bit SOCK_NOSPACE
> on its subflow. As a side effect, autotune never takes place,
> as it happens inside tcp_new_space(), which in turn is called
> only when the mentioned bit is set.
>
> Let's sendmsg() set the subflows NOSPACE bit when looking for
> more memory. Additionally, cleanup the sndbuf propagation from
> subflow into the msk, leveraging the subflow write space callback
> and dropping a bunch of duplicate code.
>
> This also makes the SNDBUF_LIMITED chrono relevant again
> for MPTCP subflows.
>
> Fixes: 6e628cd3a8f7 ("mptcp: use mptcp release_cb for delayed tasks")
> Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
> ---
> v1 -> v2:
> - leverage the previous commit, so we can always simply set the nospace
>   bit on the msk/parent socket
> ---
> net/mptcp/protocol.c | 57 +++++++++++++++++++-------------------------
> net/mptcp/protocol.h | 20 ++++++++++++++++
> net/mptcp/subflow.c  | 10 +++++++-
> 3 files changed, 53 insertions(+), 34 deletions(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index ada69495a51b..a64b2f6fb17b 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c

> @@ -1421,7 +1410,8 @@ static struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk,
> 		 send_info[1].ssk, send_info[1].ratio);
>
> 	/* pick the best backup if no other subflow is active */
> -	if (!nr_active)
> +	msk->use_backup = !nr_active;
> +	if (msk->use_backup)

This is the only place msk->use_backup is read. Is this a leftover from 
v1?


--
Mat Martineau
Intel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-12 10:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 10:27 [MPTCP] Re: [PATCH v2 mptcp-next 2/4] mptcp: re-enable sndbuf autotune Paolo Abeni
  -- strict thread matches above, loose matches on Subject: below --
2021-01-12  1:01 Mat Martineau

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.