Thread (34 messages) 34 messages, 9 authors, 2026-04-17

Re: [RFC PATCH] mm: net: disable kswapd for high-order network buffer allocation

From: Eric Dumazet <edumazet@google.com>
Date: 2025-10-14 05:04:40
Also in: linux-doc, linux-mm, lkml

On Mon, Oct 13, 2025 at 9:09 PM Barry Song [off-list ref] wrote:
On Tue, Oct 14, 2025 at 5:56 AM Matthew Wilcox [off-list ref] wrote:
quoted
On Mon, Oct 13, 2025 at 06:16:36PM +0800, Barry Song wrote:
quoted
On phones, we have observed significant phone heating when running apps
with high network bandwidth. This is caused by the network stack frequently
waking kswapd for order-3 allocations. As a result, memory reclamation becomes
constantly active, even though plenty of memory is still available for network
allocations which can fall back to order-0.
I think we need to understand what's going on here a whole lot more than
this!

So, we try to do an order-3 allocation.  kswapd runs and ... succeeds in
creating order-3 pages?  Or fails to?
Our team observed that most of the time we successfully obtain order-3
memory, but the cost is excessive memory reclamation, since we end up
over-reclaiming order-0 pages that could have remained in memory.
quoted
If it fails, that's something we need to sort out.

If it succeeds, now we have several order-3 pages, great.  But where do
they all go that we need to run kswapd again?
The network app keeps running and continues to issue new order-3 allocation
requests, so those few order-3 pages won’t be enough to satisfy the
continuous demand.
These pages are freed as order-3 pages, and should replenish the buddy
as if nothing happened.

I think you are missing something to control how much memory  can be
pushed on each TCP socket ?

What is tcp_wmem on your phones ? What about tcp_mem ?

Have you looked at /proc/sys/net/ipv4/tcp_notsent_lowat
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help