All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] [PATCH v2 0/4] mptcp: add and use wmem_queued accounting
@ 2019-11-12 14:10 Florian Westphal
  0 siblings, 0 replies; only message in thread
From: Florian Westphal @ 2019-11-12 14:10 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 2033 bytes --]

This is v2 of the wmem accouting patch set.

I've dropped the ack_seq patches, we can resurrect them later on if needed.

After adding wmem thresholds, mptcp can deadlock at connection level when
both sides call write() at the same time and sndbuf is exhausted.

This won't happen in the selftests because it only sends small amounts
of data at a time and will always call read() if data is available.
It could happen with code that sends large amount of data at once
though, or when sndbuf is reduced via setsockopt:

Unlike TCP, which acknowledges in-sequence bytes queued to the socket, MPTCP
updates its ack_seq only when recv() is called.

In case both peers are blocked in write, no updates of the mptcp ack
sequence space occurs.  This in turn can prevent both peers from making
any progress: even if all data is queued on the peer, it will look like no
data arrived and thus no wmem can be freed up for the write() to complete.

Resolving this will need more work to get pushed into the data_ready
callback, which is hard because of need to synchronize with other subflows
used by same mptcp socket.

The following changes since commit 6e61dd3c078fe69ac2e442a9251d771a61dcc62f:

  subflow: wake parent mptcp socket on subflow state change (2019-11-08 15:22:58 +0000)

are available in the Git repository at:

  git://git.breakpoint.cc/fw/mptcp-next.git wmem_acct_06

for you to fetch changes up to eea081f8828bbe2c503873319374a7666c6b6af2:

  sendmsg: block until mptcp sk is writeable (2019-11-12 14:53:29 +0100)

----------------------------------------------------------------
Florian Westphal (4):
      mptcp: add wmem_queued accounting
      mptcp: allow partial cleaning of rtx head dfrag
      mptcp: add and use mptcp RTX flag
      sendmsg: block until mptcp sk is writeable

 net/mptcp/options.c  |  2 +-
 net/mptcp/protocol.c | 77 +++++++++++++++++++++++++++++++++++++++++++++-------
 net/mptcp/protocol.h |  3 +-
 3 files changed, 70 insertions(+), 12 deletions(-)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-12 14:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12 14:10 [MPTCP] [PATCH v2 0/4] mptcp: add and use wmem_queued accounting Florian Westphal

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.