From: Paolo Abeni <pabeni@redhat.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
mptcp@lists.01.org, Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH v2 net-next 5/5] mptcp: implement delegated actions
Date: Fri, 22 Jan 2021 09:25:07 +0100 [thread overview]
Message-ID: <e093e7615490baad413ef6ba49154e3e4e98399a.camel@redhat.com> (raw)
In-Reply-To: <20210121173437.1b945b01@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Hi,
On Thu, 2021-01-21 at 17:34 -0800, Jakub Kicinski wrote:
> On Wed, 20 Jan 2021 15:39:14 +0100 Paolo Abeni wrote:
> > On MPTCP-level ack reception, the packet scheduler
> > may select a subflow other then the current one.
> >
> > Prior to this commit we rely on the workqueue to trigger
> > action on such subflow.
> >
> > This changeset introduces an infrastructure that allows
> > any MPTCP subflow to schedule actions (MPTCP xmit) on
> > others subflows without resorting to (multiple) process
> > reschedule.
>
> If your work doesn't reschedule there should not be multiple
> rescheds, no?
Thank you for looking into this.
With the workqueue it would be:
<running process> -> BH -> (process scheduler) -> MPTCP workqueue ->
(process scheduler) -> <running process>
With this infra is:
<running process> -> BH -> BH -> <running process>
> > A dummy NAPI instance is used instead. When MPTCP needs to
> > trigger action an a different subflow, it enqueues the target
> > subflow on the NAPI backlog and schedule such instance as needed.
> >
> > The dummy NAPI poll method walks the sockets backlog and tries
> > to acquire the (BH) socket lock on each of them. If the socket
> > is owned by the user space, the action will be completed by
> > the sock release cb, otherwise push is started.
> >
> > This change leverages the delegated action infrastructure
> > to avoid invoking the MPTCP worker to spool the pending data,
> > when the packet scheduler picks a subflow other then the one
> > currently processing the incoming MPTCP-level ack.
> >
> > Additionally we further refine the subflow selection
> > invoking the packet scheduler for each chunk of data
> > even inside __mptcp_subflow_push_pending().
>
> Is there much precedence for this sort of hijacking of NAPI
> for protocol work?
AFAICS, xfrm is using a similar trick in the receive path.
Note that we uses TX-only NAPIs, so this does not pollute the napi hash
table.
> Do you need it because of locking?
This infrastructure is used to avoid the workqueue usage in the MPTCP
receive path (to push pending data). With many mptcp connections
established that would be very bad for tput and latency. This
infrastructure is not strictly needed from a functinal PoV, but I was
unable to find any other way to avoid the workqueue usage.
Please let me know if the above is clear enough!
Thanks,
Paolo
next prev parent reply other threads:[~2021-01-22 8:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-20 14:39 [PATCH v2 net-next 0/5] mptcp: re-enable sndbuf autotune Paolo Abeni
2021-01-20 14:39 ` [PATCH v2 net-next 1/5] mptcp: always graft subflow socket to parent Paolo Abeni
2021-01-20 14:39 ` [PATCH v2 net-next 2/5] mptcp: re-enable sndbuf autotune Paolo Abeni
2021-01-20 14:39 ` [PATCH v2 net-next 3/5] mptcp: do not queue excessive data on subflows Paolo Abeni
2021-01-20 14:39 ` [PATCH v2 net-next 4/5] mptcp: schedule work for better snd subflow selection Paolo Abeni
2021-01-20 14:39 ` [PATCH v2 net-next 5/5] mptcp: implement delegated actions Paolo Abeni
2021-01-22 1:34 ` Jakub Kicinski
2021-01-22 8:25 ` Paolo Abeni [this message]
2021-01-22 23:23 ` Jakub Kicinski
2021-01-23 7:10 ` Paolo Abeni
2021-01-23 3:30 ` [PATCH v2 net-next 0/5] mptcp: re-enable sndbuf autotune patchwork-bot+netdevbpf
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=e093e7615490baad413ef6ba49154e3e4e98399a.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=mptcp@lists.01.org \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).