mptcp: don't sleep on ssk with msk lock held
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | mptcp: avoid blocking in tcp_sendpagesnet/ | +20 | 1 reply | |
| 2/7 | mptcp: make sure timer is inited/started once data is pending for transmissionnet/ | +5 | 0 replies | |
| 3/7 | mptcp: avoid blocking in tcp_sendpages due to skb allocnet/ | +28 | 5 replies | |
| 4/7 | mptcp: fill skb extension cache outside of mptcp_sendmsg_fragnet/ | +14 | 0 replies | |
| 5/7 | mptcp: fill skb page frag cache outside of mptcp_sendmsg_fragnet/ | +6 | 0 replies | |
| 6/7 | mptcp: remove inner wait loop from mptcp_sendmsg_fragnet/ | +0 | 0 replies | |
| 7/7 | net: allow __skb_ext_alloc to sleepinclude/ net/ net/ | +9 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [MPTCP] [PATCH mptcp-next 0/7] mptcp: don't sleep on ssk with msk lock held
This series reworks mptcp_sendmsg logic to avoid blocking on the subflow socket in an attempt to address/resolve:
https://github.com/multipath-tcp/mptcp_net-next/issues/7
It does so by removing the wait loop from mptcp_sendmsg_frag helper.
In order to do that, it moves prerequisites into the callers.
The worker can just reschedule in case no subflow socket is ready.
The sendmsg path can use the existing wait logic.
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 ATOMIC allocations for extension allocation, so allow to pass gfp_t arg to the helper instead of hard-coded ATOMIC in the core.
Comments welcome.
Florian Westphal (7):
mptcp: avoid blocking in tcp_sendpages
mptcp: make sure timer is inited/started once data is pending for transmission
mptcp: avoid blocking in tcp_sendpages due to skb alloc
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 | 100 ++++++++++++++++++++++++++++++++++++------------- 3 files changed, 81 insertions(+), 29 deletions(-)