From: Paolo Abeni <pabeni at redhat.com>
To: mptcp at lists.01.org
Subject: [MPTCP] Re: [PATCH mptcp 1/3] mptcp: schedule worker when subflow is closed
Date: Tue, 09 Feb 2021 13:01:35 +0100 [thread overview]
Message-ID: <70af47423799bd1f64201e8aac7bb2eecd467171.camel@redhat.com> (raw)
In-Reply-To: 20210209101646.GJ16570@breakpoint.cc
[-- Attachment #1: Type: text/plain, Size: 1758 bytes --]
On Tue, 2021-02-09 at 11:16 +0100, Florian Westphal wrote:
> Paolo Abeni <pabeni(a)redhat.com> wrote:
> > At least one per msk connection, I think. On a busy server with an high
> > ingress connection rate is likely significant. Yes, DATA_FIN (ack) will
> > weight twice (or 4x) more, so I think we should use delegated action
> > even for that ;)
>
> Compared to packet processing they are likely not relevant,
I'm not sure - for short lived connection. Looks like time has come to
collect some connection/rate performance figure ;)
> > I have some related patches "cleaning-up" mptcp_release_cb that I'll
> > hopefully share soon.
>
> Ok, will have a l ook.
Just shared ;)
>
> > Or perhaps we could check for genl_has_listeners() before scheduling
> > the workqueue?
>
> I think thats a good idea, however, the idea was not just to kick the
> event but also do the actual socket close, so if we don't sched the wq
> the ssk will stay around until msk close time, no?
We can use the delegated actions to close the subflow (or do any other
task requiring the msk socket lock), with the folloing pattern:
// under ssk lock
mptcp_data_lock();
if (!sock_owned_by_user(msk))
if (<target ssk != us>)
mptcp_subflow_delegate(target_subflow, action id);
// mptcp_subflow_delegate to be extended to schedule
// different actions [1]
else
<do the intended task> // [2]
else
<schedule the task for release_cb time> // [3]
[1] and [2] must act atomically, while [3] could sleep, using the loop
introduced by "mptcp: fix race in release_cb".
For CLOSE_SUBFLOW the target ssk will always be the current one, so
there is actually no need for delegated actions, the release cb will
suffice.
/P
next reply other threads:[~2021-02-09 12:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-09 12:01 Paolo Abeni [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-02-09 10:16 [MPTCP] Re: [PATCH mptcp 1/3] mptcp: schedule worker when subflow is closed Florian Westphal
2021-02-09 9:49 Paolo Abeni
2021-02-08 23:47 Florian Westphal
2021-02-08 23:33 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=70af47423799bd1f64201e8aac7bb2eecd467171.camel@redhat.com \
--to=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