[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241025142025.3558051-1-leitao@debian.org>
Date: Fri, 25 Oct 2024 07:20:17 -0700
From: Breno Leitao <leitao@...ian.org>
To: kuba@...nel.org,
horms@...nel.org,
davem@...emloft.net,
edumazet@...gle.com,
pabeni@...hat.com
Cc: thepacketgeek@...il.com,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
davej@...emonkey.org.uk,
vlad.wing@...il.com,
max@...sevol.com,
kernel-team@...a.com,
jiri@...nulli.us,
jv@...sburgh.net,
andy@...yhouse.net,
aehkn@...hub.one
Subject: [PATCH net-next 0/3] net: netpoll: Improve SKB pool management
The netpoll subsystem pre-allocates 32 SKBs in a pool for emergency use
during out-of-memory conditions. However, the current implementation has
several inefficiencies:
* The SKB pool, once allocated, is never freed:
* Resources remain allocated even after netpoll users are removed
* Failed initialization can leave pool populated forever
* The global pool design makes resource tracking difficult
This series addresses these issues through three patches:
Patch 1 ("net: netpoll: Defer skb_pool population until setup success"):
- Defer SKB pool population until setup validation passes
Patch 2 ("net: netpoll: Individualize the skb pool"):
- Replace global pool with per-user pools in netpoll struct
Patch 3 ("net: netpoll: flush skb pool during cleanup"):
- Properly free pool resources during netconsole cleanup
These changes improve resource management and make the code more
maintainable. As a side benefit, the improved structure would allow
netpoll to be modularized if desired in the future.
What is coming next?
Once this patch is integrated, I am planning to have the SKBs being
refilled outside of hot (send) path, in a work thread.
Breno Leitao (3):
net: netpoll: Defer skb_pool population until setup success
net: netpoll: Individualize the skb pool
net: netpoll: flush skb pool during cleanup
include/linux/netpoll.h | 1 +
net/core/netpoll.c | 52 +++++++++++++++++++++++++----------------
2 files changed, 33 insertions(+), 20 deletions(-)
--
2.43.5
Powered by blists - more mailing lists