On Thu, Jul 17, 2025 at 8:31 AM Daniel Sedlak [off-list ref] wrote:
On 7/16/25 8:07 PM, Kuniyuki Iwashima wrote:
quoted
quoted
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!