From: Daniel Sedlak <daniel.sedlak@cdn77.com>
To: Shakeel Butt <shakeel.butt@linux.dev>
Cc: "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>,
"Jonathan Corbet" <corbet@lwn.net>,
"Neal Cardwell" <ncardwell@google.com>,
"Kuniyuki Iwashima" <kuniyu@google.com>,
"David Ahern" <dsahern@kernel.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Yosry Ahmed" <yosry.ahmed@linux.dev>,
linux-mm@kvack.org, netdev@vger.kernel.org,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Hocko" <mhocko@kernel.org>,
"Roman Gushchin" <roman.gushchin@linux.dev>,
"Muchun Song" <muchun.song@linux.dev>,
cgroups@vger.kernel.org, "Tejun Heo" <tj@kernel.org>,
"Michal Koutný" <mkoutny@suse.com>,
"Matyas Hurtik" <matyas.hurtik@cdn77.com>
Subject: Re: [PATCH v4] memcg: expose socket memory pressure in a cgroup
Date: Thu, 7 Aug 2025 12:42:23 +0200 [thread overview]
Message-ID: <5e32aded-bcff-40d2-aef1-20a1cf6f4f8e@cdn77.com> (raw)
In-Reply-To: <fcnlbvljynxu5qlzmnjeagll7nf5mje7rwkimbqok6doso37gl@lwepk3ztjga7>
On 8/6/25 1:02 AM, Shakeel Butt wrote:
> On Tue, Aug 05, 2025 at 08:44:29AM +0200, Daniel Sedlak wrote:
>> This patch is a result of our long-standing debug sessions, where it all
>> started as "networking is slow", and TCP network throughput suddenly
>> dropped from tens of Gbps to few Mbps, and we could not see anything in
>> the kernel log or netstat counters.
>>
>> Currently, we have two memory pressure counters for TCP sockets [1],
>> which we manipulate only when the memory pressure is signalled through
>> the proto struct [2]. However, the memory pressure can also be signaled
>> through the cgroup memory subsystem, which we do not reflect in the
>> netstat counters. In the end, when the cgroup memory subsystem signals
>> that it is under pressure, we silently reduce the advertised TCP window
>> with tcp_adjust_rcv_ssthresh() to 4*advmss, which causes a significant
>> throughput reduction.
>>
>> Keep in mind that when the cgroup memory subsystem signals the socket
>> memory pressure, it affects all sockets used in that cgroup.
>>
>> This patch exposes a new file for each cgroup in sysfs which signals
>> the cgroup socket memory pressure. The file is accessible in
>> the following path.
>>
>> /sys/fs/cgroup/**/<cgroup name>/memory.net.socket_pressure
>
> let's keep the name concise. Maybe memory.net.pressure?
>
Sure, I can rename it for v5.
Thanks!
Daniel
next prev parent reply other threads:[~2025-08-07 10:42 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-05 6:44 Daniel Sedlak
2025-08-05 15:54 ` Kuniyuki Iwashima
2025-08-05 23:02 ` Shakeel Butt
2025-08-06 19:20 ` Kuniyuki Iwashima
2025-08-06 21:54 ` Shakeel Butt
2025-08-06 22:01 ` Kuniyuki Iwashima
2025-08-06 23:34 ` Shakeel Butt
2025-08-06 23:40 ` Kuniyuki Iwashima
2025-08-06 23:51 ` Shakeel Butt
2025-08-07 10:22 ` Daniel Sedlak
2025-08-07 20:52 ` Shakeel Butt
2025-08-14 16:27 ` Matyas Hurtik
2025-08-14 17:31 ` Shakeel Butt
2025-08-14 17:43 ` Shakeel Butt
2025-08-07 10:42 ` Daniel Sedlak [this message]
2025-08-09 18:32 ` Tejun Heo
2025-08-11 21:31 ` Shakeel Butt
2025-08-13 12:03 ` Michal Koutný
2025-08-13 18:03 ` Tejun Heo
2025-08-20 16:51 ` Matyas Hurtik
2025-08-20 19:03 ` Tejun Heo
2025-08-20 19:31 ` Shakeel Butt
2025-08-20 20:37 ` Matyas Hurtik
2025-08-20 21:34 ` Shakeel Butt
2025-08-21 18:44 ` Matyas Hurtik
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=5e32aded-bcff-40d2-aef1-20a1cf6f4f8e@cdn77.com \
--to=daniel.sedlak@cdn77.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=hannes@cmpxchg.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-mm@kvack.org \
--cc=matyas.hurtik@cdn77.com \
--cc=mhocko@kernel.org \
--cc=mkoutny@suse.com \
--cc=muchun.song@linux.dev \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=tj@kernel.org \
--cc=yosry.ahmed@linux.dev \
/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