linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@google.com>
To: Daniel Sedlak <daniel.sedlak@cdn77.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>,
	"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>,
	 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,
	 Matyas Hurtik <matyas.hurtik@cdn77.com>
Subject: Re: [PATCH v2 net-next 1/2] tcp: account for memory pressure signaled by cgroup
Date: Thu, 17 Jul 2025 10:26:33 -0700	[thread overview]
Message-ID: <CAAVpQUDSnDLxjL2O0xbOJTuV9CSNTE4XMZQ1Z5wxNteeyiCMwg@mail.gmail.com> (raw)
In-Reply-To: <924f57a8-deaa-4f7d-93ee-4030e2445a01@cdn77.com>

On Thu, Jul 17, 2025 at 8:31 AM Daniel Sedlak <daniel.sedlak@cdn77.com> wrote:
>
> On 7/16/25 8:07 PM, Kuniyuki Iwashima wrote:
> >> Incrementing it here will give a very different semantic to this stat
> >> compared to LINUX_MIB_TCPMEMORYPRESSURES. Here the increments mean the
> >> number of times the kernel check if a given socket is under memcg
> >> pressure for a net namespace. Is that what we want?
> >
> > I'm trying to decouple sk_memcg from the global tcp_memory_allocated
> > as you and Wei planned before, and the two accounting already have the
> > different semantics from day1 and will keep that, so a new stat having a
> > different semantics would be fine.
> >
> > But I think per-memcg stat like memory.stat.XXX would be a good fit
> > rather than pre-netns because one netns could be shared by multiple
> > cgroups and multiple sockets in the same cgroup could be spread across
> > multiple netns.
>
> I can move the counter to memory.stat.XXX in favor of this patch

Please do so.  Per-netns stats could be confusing in some setup above.

Thanks!


  reply	other threads:[~2025-07-17 17:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-14 14:36 [PATCH v2 net-next 0/2] account for TCP memory pressure signaled by cgroup Daniel Sedlak
2025-07-14 14:36 ` [PATCH v2 net-next 1/2] tcp: account for " Daniel Sedlak
2025-07-16 16:49   ` Shakeel Butt
2025-07-16 18:07     ` Kuniyuki Iwashima
2025-07-16 18:37       ` Shakeel Butt
2025-07-17 15:31       ` Daniel Sedlak
2025-07-17 17:26         ` Kuniyuki Iwashima [this message]
2025-07-14 14:36 ` [PATCH v2 net-next 2/2] mm/vmpressure: add tracepoint for socket pressure detection Daniel Sedlak
2025-07-14 18:02   ` Kuniyuki Iwashima
2025-07-15  7:01     ` Daniel Sedlak
2025-07-15 17:17       ` Kuniyuki Iwashima
2025-07-15 17:46         ` Kuniyuki Iwashima
2025-07-16  8:47           ` Daniel Sedlak

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=CAAVpQUDSnDLxjL2O0xbOJTuV9CSNTE4XMZQ1Z5wxNteeyiCMwg@mail.gmail.com \
    --to=kuniyu@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=daniel.sedlak@cdn77.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=matyas.hurtik@cdn77.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shakeel.butt@linux.dev \
    --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;
as well as URLs for NNTP newsgroup(s).