All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/7] mptcp: do not block on subflow socket
@ 2020-05-16  8:46 Florian Westphal
  2020-05-16  8:46 ` [PATCH net-next 1/7] mptcp: move common nospace-pattern to a helper Florian Westphal
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Florian Westphal @ 2020-05-16  8:46 UTC (permalink / raw)
  To: netdev; +Cc: pabeni, mathew.j.martineau, matthieu.baerts

This series reworks mptcp_sendmsg logic to avoid blocking on the subflow
socket.

It does so by removing the wait loop from mptcp_sendmsg_frag helper.

In order to do that, it moves prerequisites that are currently
handled in mptcp_sendmsg_frag (and cause it to wait until they are
met, e.g. frag cache refill) into the callers.

The worker can just reschedule in case no subflow socket is ready,
since it can't wait -- doing so would block other work items and
doesn't make sense anyway because we should not (re)send data
in case resources are already low.

The sendmsg path can use the existing wait logic until memory
becomes available.

Because large send requests can result in multiple mptcp_sendmsg_frag
calls from mptcp_sendmsg, we may need to restart the socket lookup in
case subflow can't accept more data or memory is low.

Doing so blocks on the mptcp socket, and existing wait handling
releases the msk lock while blocking.

Lastly, no need to use GFP_ATOMIC for extension allocation:
extend __skb_ext_alloc with gfp_t arg instead of hard-coded ATOMIC and
then relax the allocation constraints for mptcp case: those requests
occur in process context.

Florian Westphal (7):
      mptcp: move common nospace-pattern to a helper
      mptcp: break and restart in case mptcp sndbuf is full
      mptcp: avoid blocking in tcp_sendpages
      mptcp: fill skb extension cache outside of mptcp_sendmsg_frag
      mptcp: fill skb page frag cache outside of mptcp_sendmsg_frag
      mptcp: remove inner wait loop from mptcp_sendmsg_frag
      net: allow __skb_ext_alloc to sleep

 include/linux/skbuff.h |   2 +-
 net/core/skbuff.c      |   8 +--
 net/mptcp/protocol.c   | 139 ++++++++++++++++++++++++++++++++++++-------------
 3 files changed, 109 insertions(+), 40 deletions(-)


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-05-17 19:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-16  8:46 [PATCH net-next 0/7] mptcp: do not block on subflow socket Florian Westphal
2020-05-16  8:46 ` [PATCH net-next 1/7] mptcp: move common nospace-pattern to a helper Florian Westphal
2020-05-16  8:46 ` [PATCH net-next 2/7] mptcp: break and restart in case mptcp sndbuf is full Florian Westphal
2020-05-16  8:46 ` [PATCH net-next 3/7] mptcp: avoid blocking in tcp_sendpages Florian Westphal
2020-05-16  8:46 ` [PATCH net-next 4/7] mptcp: fill skb extension cache outside of mptcp_sendmsg_frag Florian Westphal
2020-05-16  8:46 ` [PATCH net-next 5/7] mptcp: fill skb page frag " Florian Westphal
2020-05-16  8:46 ` [PATCH net-next 6/7] mptcp: remove inner wait loop from mptcp_sendmsg_frag Florian Westphal
2020-05-16  8:46 ` [PATCH net-next 7/7] net: allow __skb_ext_alloc to sleep Florian Westphal
2020-05-17 19:36 ` [PATCH net-next 0/7] mptcp: do not block on subflow socket David Miller

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.