linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* skb defer free casues a lot of memory not released in hugepages
@ 2025-06-05 13:43 mengkanglai
  0 siblings, 0 replies; only message in thread
From: mengkanglai @ 2025-06-05 13:43 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Kuniyuki Iwashima, Stanislav Fomichev,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
  Cc: Yanan (Euler), Fengtao (fengtao, Euler)

Hello:
In my virtualization scenario, physical host enable hugepages feature and share hugepages to the virtual machine running on it.
A large amount of data is exchanged between the host and the vm through TCP local communication.Later, the vm is no longer needed and is destroyed, but the hugepages shared to the vm was not fully released back to the host. 
Tracing showed that the hugepages are occupied by skbs in host due to commit 68822bdf76f10 ("net: generalize skb freeing deferral to per-cpu lists").
it will remain some skbs in cpu skb_defer_list to defer free, it seems that may cause infinite delay if there is no triggering for net_rx_action(). 
A large amount of memory is not released because there are many CPUs and hugepages feature. Host can't recycle memory fast enough will affect the subsequent VM hugepages allocation.
Maybe we need a general method to release skb immediately or a timeout mechanism for skbs in defer list to release?
Best wishes!


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-06-05 13:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-05 13:43 skb defer free casues a lot of memory not released in hugepages mengkanglai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).