lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o6q77hfn.fsf@linux.dev>
Date: Wed, 15 Oct 2025 18:40:12 -0700
From: Roman Gushchin <roman.gushchin@...ux.dev>
To: Shakeel Butt <shakeel.butt@...ux.dev>
Cc: Andrew Morton <akpm@...ux-foundation.org>,  Johannes Weiner
 <hannes@...xchg.org>,  Michal Hocko <mhocko@...nel.org>,  Muchun Song
 <muchun.song@...ux.dev>,  Tejun Heo <tj@...nel.org>,  Eric Dumazet
 <edumazet@...gle.com>,  Kuniyuki Iwashima <kuniyu@...gle.com>,  Paolo
 Abeni <pabeni@...hat.com>,  Willem de Bruijn <willemb@...gle.com>,  Jakub
 Kicinski <kuba@...nel.org>,  "David S . Miller" <davem@...emloft.net>,
  Matyas Hurtik <matyas.hurtik@...77.com>,  Daniel Sedlak
 <daniel.sedlak@...77.com>,  Simon Horman <horms@...nel.org>,  Neal
 Cardwell <ncardwell@...gle.com>,  Wei Wang <weibunny@...a.com>,
  netdev@...r.kernel.org,  linux-mm@...ck.org,  cgroups@...r.kernel.org,
  linux-kernel@...r.kernel.org,  Meta kernel team <kernel-team@...a.com>
Subject: Re: [PATCH] memcg: net: track network throttling due to memcg
 memory pressure

Shakeel Butt <shakeel.butt@...ux.dev> writes:

> The kernel can throttle network sockets if the memory cgroup associated
> with the corresponding socket is under memory pressure. The throttling
> actions include clamping the transmit window, failing to expand receive
> or send buffers, aggressively prune out-of-order receive queue, FIN
> deferred to a retransmitted packet and more. Let's add memcg metric to
> indicate track such throttling actions.
>
> At the moment memcg memory pressure is defined through vmpressure and in
> future it may be defined using PSI or we may add more flexible way for
> the users to define memory pressure, maybe through ebpf. However the
> potential throttling actions will remain the same, so this newly
> introduced metric will continue to track throttling actions irrespective
> of how memcg memory pressure is defined.
>
> Signed-off-by: Shakeel Butt <shakeel.butt@...ux.dev>
> ---
>  Documentation/admin-guide/cgroup-v2.rst | 4 ++++
>  include/linux/memcontrol.h              | 1 +
>  include/net/sock.h                      | 6 +++++-
>  kernel/cgroup/cgroup.c                  | 1 +
>  mm/memcontrol.c                         | 3 +++
>  5 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
> index 0e6c67ac585a..057ee95e43ef 100644
> --- a/Documentation/admin-guide/cgroup-v2.rst
> +++ b/Documentation/admin-guide/cgroup-v2.rst
> @@ -1515,6 +1515,10 @@ The following nested keys are defined.
>            oom_group_kill
>                  The number of times a group OOM has occurred.
>  
> +          socks_throttled
> +                The number of times network sockets associated with
> +                this cgroup are throttled.

I'd prefer sockets_throttled or sock_throttled. And same for the
constant name.

Otherwise,
Acked-by: Roman Gushchin <roman.gushchin@...ux.dev>

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ