public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 00/14] mptcp: memcg accounting for passive sockets & backlog processing
@ 2025-11-21 17:01 Matthieu Baerts (NGI0)
  2025-11-21 17:02 ` [PATCH net-next 01/14] net: factor-out _sk_charge() helper Matthieu Baerts (NGI0)
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Matthieu Baerts (NGI0) @ 2025-11-21 17:01 UTC (permalink / raw)
  To: Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
	David S. Miller, Jakub Kicinski, Simon Horman, David Ahern,
	Mat Martineau, Geliang Tang, Peter Krystad, Florian Westphal,
	Christoph Paasch
  Cc: netdev, linux-kernel, mptcp, Davide Caratti,
	Matthieu Baerts (NGI0)

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@kernel.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@kernel.org>


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

end of thread, other threads:[~2025-11-25  4:41 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-21 17:01 [PATCH net-next 00/14] mptcp: memcg accounting for passive sockets & backlog processing Matthieu Baerts (NGI0)
2025-11-21 17:02 ` [PATCH net-next 01/14] net: factor-out _sk_charge() helper Matthieu Baerts (NGI0)
2025-11-21 17:02 ` [PATCH net-next 02/14] mptcp: factor-out cgroup data inherit helper Matthieu Baerts (NGI0)
2025-11-21 17:02 ` [PATCH net-next 03/14] mptcp: grafting MPJ subflow earlier Matthieu Baerts (NGI0)
2025-11-21 17:02 ` [PATCH net-next 04/14] mptcp: fix memcg accounting for passive sockets Matthieu Baerts (NGI0)
2025-11-21 17:02 ` [PATCH net-next 05/14] mptcp: cleanup fallback data fin reception Matthieu Baerts (NGI0)
2025-11-21 17:02 ` [PATCH net-next 06/14] mptcp: cleanup fallback dummy mapping generation Matthieu Baerts (NGI0)
2025-11-21 17:02 ` [PATCH net-next 07/14] mptcp: ensure the kernel PM does not take action too late Matthieu Baerts (NGI0)
2025-11-21 17:02 ` [PATCH net-next 08/14] mptcp: do not miss early first subflow close event notification Matthieu Baerts (NGI0)
2025-11-21 17:02 ` [PATCH net-next 09/14] mptcp: make mptcp_destroy_common() static Matthieu Baerts (NGI0)
2025-11-21 17:02 ` [PATCH net-next 10/14] mptcp: drop the __mptcp_data_ready() helper Matthieu Baerts (NGI0)
2025-11-21 17:02 ` [PATCH net-next 11/14] mptcp: handle first subflow closing consistently Matthieu Baerts (NGI0)
2025-11-21 17:02 ` [PATCH net-next 12/14] mptcp: borrow forward memory from subflow Matthieu Baerts (NGI0)
2025-11-21 17:02 ` [PATCH net-next 13/14] mptcp: introduce mptcp-level backlog Matthieu Baerts (NGI0)
2025-11-21 17:02 ` [PATCH net-next 14/14] mptcp: leverage the backlog for RX packet processing Matthieu Baerts (NGI0)
2025-11-25  4:40 ` [PATCH net-next 00/14] mptcp: memcg accounting for passive sockets & backlog processing patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox