From: mengkanglai <mengkanglai2@huawei.com>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Kuniyuki Iwashima <kuniyu@amazon.com>,
Stanislav Fomichev <stfomichev@gmail.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "Yanan (Euler)" <yanan@huawei.com>,
"Fengtao (fengtao, Euler)" <fengtao40@huawei.com>
Subject: skb defer free casues a lot of memory not released in hugepages
Date: Thu, 5 Jun 2025 13:43:46 +0000 [thread overview]
Message-ID: <42c422c6cc99497586a4a678dfe8ba34@huawei.com> (raw)
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!
reply other threads:[~2025-06-05 13:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42c422c6cc99497586a4a678dfe8ba34@huawei.com \
--to=mengkanglai2@huawei.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fengtao40@huawei.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@amazon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stfomichev@gmail.com \
--cc=yanan@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®