[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251121-net-next-mptcp-memcg-backlog-imp-v1-0-1f34b6c1e0b1@kernel.org>
Date: Fri, 21 Nov 2025 18:01:59 +0100
From: "Matthieu Baerts (NGI0)" <matttbe@...nel.org>
To: Eric Dumazet <edumazet@...gle.com>,
Kuniyuki Iwashima <kuniyu@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Willem de Bruijn <willemb@...gle.com>,
"David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Simon Horman <horms@...nel.org>, David Ahern <dsahern@...nel.org>,
Mat Martineau <martineau@...nel.org>, Geliang Tang <geliang@...nel.org>,
Peter Krystad <peter.krystad@...ux.intel.com>,
Florian Westphal <fw@...len.de>, Christoph Paasch <cpaasch@...le.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
mptcp@...ts.linux.dev, Davide Caratti <dcaratti@...hat.com>,
"Matthieu Baerts (NGI0)" <matttbe@...nel.org>
Subject: [PATCH net-next 00/14] mptcp: memcg accounting for passive sockets
& backlog processing
This series is split in two: the 4 first patches are linked to memcg
accounting for passive sockets, and the rest introduce the backlog
processing. They are sent together, because the first one appeared to be
needed to get the second one fully working.
The second part includes RX path improvement built around backlog
processing. The main goals are improving the RX performances _and_
increase the long term maintainability.
- Patches 1-3: preparation work to ease the introduction of the next
patch.
- Patch 4: fix memcg accounting for passive sockets. Note that this is a
(non-urgent) fix, but it depends on material that is currently only in
net-next, e.g. commit 4a997d49d92a ("tcp: Save lock_sock() for memcg
in inet_csk_accept().").
- Patches 5-6: preparation of the stack for backlog processing, removing
assumptions that will not hold true any more after the backlog
introduction.
- Patches 7,8,10,11,12 are more cleanups that will make the backlog
patch a little less huge.
- Patch 9: somewhat an unrelated cleanup, included here not to forget
about it.
- Patches 13-14: The real work is done by them. Patch 13 introduces the
helpers needed to manipulate the msk-level backlog, and the data
struct itself, without any actual functional change. Patch 14 finally
uses the backlog for RX skb processing. Note that MPTCP can't use the
sk_backlog, as the MPTCP release callback can also release and
re-acquire the msk-level spinlock and core backlog processing works
under the assumption that such event is not possible.
A relevant point is memory accounts for skbs in the backlog. It's
somewhat "original" due to MPTCP constraints. Such skbs use space from
the incoming subflow receive buffer, do not use explicitly any forward
allocated memory, as we can't update the msk fwd mem while enqueuing,
nor we want to acquire again the ssk socket lock while processing the
skbs. Instead the msk borrows memory from the subflow and reserve it
for the backlog, see patch 5 and 14 for the gory details.
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@...nel.org>
---
Paolo Abeni (14):
net: factor-out _sk_charge() helper
mptcp: factor-out cgroup data inherit helper
mptcp: grafting MPJ subflow earlier
mptcp: fix memcg accounting for passive sockets
mptcp: cleanup fallback data fin reception
mptcp: cleanup fallback dummy mapping generation
mptcp: ensure the kernel PM does not take action too late
mptcp: do not miss early first subflow close event notification
mptcp: make mptcp_destroy_common() static
mptcp: drop the __mptcp_data_ready() helper
mptcp: handle first subflow closing consistently
mptcp: borrow forward memory from subflow
mptcp: introduce mptcp-level backlog
mptcp: leverage the backlog for RX packet processing
include/net/sock.h | 2 +
net/core/sock.c | 18 +++
net/ipv4/af_inet.c | 17 +-
net/mptcp/fastopen.c | 4 +-
net/mptcp/mib.c | 1 -
net/mptcp/mib.h | 1 -
net/mptcp/mptcp_diag.c | 3 +-
net/mptcp/pm.c | 4 +-
net/mptcp/pm_kernel.c | 2 +
net/mptcp/protocol.c | 428 +++++++++++++++++++++++++++++++++++--------------
net/mptcp/protocol.h | 51 +++++-
net/mptcp/subflow.c | 42 +++--
12 files changed, 417 insertions(+), 156 deletions(-)
---
base-commit: e2c20036a8879476c88002730d8a27f4e3c32d4b
change-id: 20251121-net-next-mptcp-memcg-backlog-imp-33568c609094
Best regards,
--
Matthieu Baerts (NGI0) <matttbe@...nel.org>
Powered by blists - more mailing lists