From: Florian Westphal <fw@strlen.de>
To: <netdev@vger.kernel.org>
Subject: [PATCH net-next 0/7] mptcp: update mptcp ack sequence outside of recv path
Date: Wed, 26 Feb 2020 10:14:45 +0100 [thread overview]
Message-ID: <20200226091452.1116-1-fw@strlen.de> (raw)
This series moves mptcp-level ack sequence update outside of the recvmsg path.
Current approach has two problems:
1. There is delay between arrival of new data and the time we can ack
this data.
2. If userspace doesn't call recv for some time, mptcp ack_seq is not
updated at all, even if this data is queued in the subflow socket
receive queue.
Move skbs from the subflow socket receive queue to the mptcp-level
receive queue, updating the mptcp-level ack sequence and have recv
take skbs from the mptcp-level receive queue.
The first place where we will attempt to update the mptcp level acks
is from the subflows' data_ready callback, even before we make userspace
aware of new data.
Because of possible deadlock (we need to take the mptcp socket lock
while already holding the subflow sockets lock), we may still need to
defer the mptcp-level ack update. In such case, this work will be either
done from work queue or recv path, depending on which runs sooner.
In order to avoid pointless scheduling of the work queue, work
will be queued from the mptcp sockets lock release callback.
This allows to detect when the socket owner did drain the subflow
socket receive queue.
Please see individual patches for more information.
Florian Westphal (5):
mptcp: add and use mptcp_data_ready helper
mptcp: update mptcp ack sequence from work queue
mptcp: add rmem queue accounting
mptcp: remove mptcp_read_actor
mptcp: avoid work queue scheduling if possible
Paolo Abeni (2):
mptcp: add work queue skeleton
mptcp: defer work schedule until mptcp lock is released
net/mptcp/protocol.c | 364 ++++++++++++++++++++++++++++++++++++++-------------
net/mptcp/protocol.h | 9 +-
net/mptcp/subflow.c | 32 ++---
3 files changed, 289 insertions(+), 116 deletions(-)
next reply other threads:[~2020-02-26 9:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-26 9:14 Florian Westphal [this message]
2020-02-26 9:14 ` [PATCH net-next 1/7] mptcp: add and use mptcp_data_ready helper Florian Westphal
2020-02-27 0:09 ` Mat Martineau
2020-02-26 9:14 ` [PATCH net-next 2/7] mptcp: add work queue skeleton Florian Westphal
2020-02-27 0:10 ` Mat Martineau
2020-02-26 9:14 ` [PATCH net-next 3/7] mptcp: update mptcp ack sequence from work queue Florian Westphal
2020-02-27 0:10 ` Mat Martineau
2020-02-26 9:14 ` [PATCH net-next 4/7] mptcp: add rmem queue accounting Florian Westphal
2020-02-27 0:11 ` Mat Martineau
2020-02-26 9:14 ` [PATCH net-next 5/7] mptcp: remove mptcp_read_actor Florian Westphal
2020-02-27 0:11 ` Mat Martineau
2020-02-26 9:14 ` [PATCH net-next 6/7] mptcp: avoid work queue scheduling if possible Florian Westphal
2020-02-27 0:11 ` Mat Martineau
2020-02-26 9:14 ` [PATCH net-next 7/7] mptcp: defer work schedule until mptcp lock is released Florian Westphal
2020-02-27 0:12 ` Mat Martineau
2020-02-27 4:47 ` [PATCH net-next 0/7] mptcp: update mptcp ack sequence outside of recv path David Miller
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=20200226091452.1116-1-fw@strlen.de \
--to=fw@strlen.de \
--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).