From: Florian Westphal <fw at strlen.de>
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 11:16:46 +0100 [thread overview]
Message-ID: <20210209101646.GJ16570@breakpoint.cc> (raw)
In-Reply-To: e48e9c4f2328275779a7c54409764e4d5018ad34.camel@redhat.com
[-- Attachment #1: Type: text/plain, Size: 1956 bytes --]
Paolo Abeni <pabeni(a)redhat.com> wrote:
> On Tue, 2021-02-09 at 00:47 +0100, Florian Westphal wrote:
> if the actual close is also in charge of subflow accounting (and
> subflow limits enforcing), likely there will be no issue. If subflow
> accounting is done at NL event generation time, a malicius peer could
> open/close a subflow multiple times and "leeking" (not really leaking,
> but still cause allocation with no free) a lot of subflow on this side.
No, event generation should do just that, emit the mcast event, no
accounting or similar.
> > > Side note: it would be nice using the deferred actions to do the
> > > netlink call, to avoid the workqueue usage.
> >
> > Why? How many events/s do you expect?
>
> 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, but see
below.
> > Events try to prefer GFP_KERNEL allocations where possible.
>
> yep, that is relevant. Delegated actions are handled at msk release_cb
> time - depending on the lock status when they are fires - even in non
> atomic/process context. We could use GFP_KERNEL when triggering the
> event from release_cb and ATOMIC elsewhere. Would that inconsistency be
> acceptable?
The function already provides a gfp_t arg, there are spots where event
happens from atomic context.
> I have some related patches "cleaning-up" mptcp_release_cb that I'll
> hopefully share soon.
Ok, will have a l ook.
> 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?
next reply other threads:[~2021-02-09 10:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-09 10:16 Florian Westphal [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-02-09 12:01 [MPTCP] Re: [PATCH mptcp 1/3] mptcp: schedule worker when subflow is closed Paolo Abeni
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=20210209101646.GJ16570@breakpoint.cc \
--to=unknown@example.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.