linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Roman Gushchin <roman.gushchin@linux.dev>
To: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	 Johannes Weiner <hannes@cmpxchg.org>,
	 Michal Hocko <mhocko@kernel.org>,
	 Muchun Song <muchun.song@linux.dev>,  Tejun Heo <tj@kernel.org>,
	 Eric Dumazet <edumazet@google.com>,
	 Kuniyuki Iwashima <kuniyu@google.com>,
	 Paolo Abeni <pabeni@redhat.com>,
	 Willem de Bruijn <willemb@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	 "David S . Miller" <davem@davemloft.net>,
	Matyas Hurtik <matyas.hurtik@cdn77.com>,
	 Daniel Sedlak <daniel.sedlak@cdn77.com>,
	 Simon Horman <horms@kernel.org>,
	 Neal Cardwell <ncardwell@google.com>,
	 Wei Wang <weibunny@meta.com>,
	netdev@vger.kernel.org,  linux-mm@kvack.org,
	 cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Meta kernel team <kernel-team@meta.com>
Subject: Re: [PATCH] memcg: net: track network throttling due to memcg memory pressure
Date: Wed, 15 Oct 2025 18:40:12 -0700	[thread overview]
Message-ID: <87o6q77hfn.fsf@linux.dev> (raw)
In-Reply-To: <20251016013116.3093530-1-shakeel.butt@linux.dev> (Shakeel Butt's message of "Wed, 15 Oct 2025 18:31:16 -0700")

Shakeel Butt <shakeel.butt@linux.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@linux.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@linux.dev>

Thanks!


  reply	other threads:[~2025-10-16  1:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-16  1:31 Shakeel Butt
2025-10-16  1:40 ` Roman Gushchin [this message]
2025-10-16  5:46   ` Kuniyuki Iwashima
2025-10-16 15:19     ` Shakeel Butt
2025-10-16 10:42 ` Daniel Sedlak
2025-10-16 16:02   ` Shakeel Butt
2025-10-17 14:15     ` Daniel Sedlak
2025-10-17 21:21       ` Shakeel Butt

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=87o6q77hfn.fsf@linux.dev \
    --to=roman.gushchin@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=daniel.sedlak@cdn77.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=horms@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=matyas.hurtik@cdn77.com \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shakeel.butt@linux.dev \
    --cc=tj@kernel.org \
    --cc=weibunny@meta.com \
    --cc=willemb@google.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