netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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: Sat, 23 Jan 2021 08:10:37 +0100	[thread overview]
Message-ID: <fab5f9f2abdc478702fc7f9a831de418a1234e38.camel@redhat.com> (raw)
In-Reply-To: <20210122152355.761ff148@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

On Fri, 2021-01-22 at 15:23 -0800, Jakub Kicinski wrote:
> On Fri, 22 Jan 2021 09:25:07 +0100 Paolo Abeni wrote:
> > > 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.
> 
> But it is due to locking or is it not? Because you're running the
> callback in the same context, so otherwise why not just call the
> function directly? Can't be batching, it's after GRO so we won't 
> batch much more.

Thank you for the feedback. 

Let me try to elaborate a bit more on this. When processing the input
packet (MPTCP data ack) on the MPTCP subflow A, under the subflow A
socket lock, we possibly need to push some data via a different subflow
B - depending on the MPTCP packet scheduler decision. We can't try to
acquire the B subflow socket lock due to ABBA deadlock.

Either the workqueue usage and this infra avoid the deadlock breaking
the locks chain.

Should not have any bad iteraction with threaded NAPI nor busy polling,
but I don't have experimented yet. Placing that on my TODO list.

Thanks!

Paolo


  reply	other threads:[~2021-01-23  7:12 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
2021-01-22 23:23       ` Jakub Kicinski
2021-01-23  7:10         ` Paolo Abeni [this message]
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=fab5f9f2abdc478702fc7f9a831de418a1234e38.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).