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

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

From: Shakeel Butt <shakeel.butt@linux.dev>
Date: 2025-10-14 14:38:16
Also in: linux-doc, linux-mm, lkml

On Tue, Oct 14, 2025 at 06:19:05PM +0800, Barry Song wrote:
quoted
quoted
quoted
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
# cat /proc/sys/net/ipv4/tcp_wmem
524288  1048576 6710886
Ouch. That is insane tcp_wmem[0] .

Please stick to 4096, or risk OOM of various sorts.
quoted
# cat /proc/sys/net/ipv4/tcp_notsent_lowat
4294967295

Any thoughts on these settings?
Please look at
https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt

tcp_notsent_lowat - UNSIGNED INTEGER
A TCP socket can control the amount of unsent bytes in its write queue,
thanks to TCP_NOTSENT_LOWAT socket option. poll()/select()/epoll()
reports POLLOUT events if the amount of unsent bytes is below a per
socket value, and if the write queue is not full. sendmsg() will
also not add new buffers if the limit is hit.

This global variable controls the amount of unsent data for
sockets not using TCP_NOTSENT_LOWAT. For these sockets, a change
to the global variable has immediate effect.


Setting this sysctl to 2MB can effectively reduce the amount of memory
in TCP write queues by 66 %,
or allow you to increase tcp_wmem[2] so that only flows needing big
BDP can get it.
We obtained these settings from our hardware vendors.

It might be worth exploring these settings further, but I can’t quite see
their connection to high-order allocations,
I don't think there is a connection between them. Is there a reason you
are expecting a connection/relation between them?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help