[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <pvygtpy4b7napeudlk5dtbacgvqf6j4lrr5nhye6obrwv2ss2o@ubxpyqwf56pz>
Date: Thu, 31 Jul 2025 15:39:06 +0200
From: Michal Koutný <mkoutny@...e.com>
To: Kuniyuki Iwashima <kuniyu@...gle.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Neal Cardwell <ncardwell@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Willem de Bruijn <willemb@...gle.com>, Matthieu Baerts <matttbe@...nel.org>,
Mat Martineau <martineau@...nel.org>, Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>, Roman Gushchin <roman.gushchin@...ux.dev>,
Shakeel Butt <shakeel.butt@...ux.dev>, Andrew Morton <akpm@...ux-foundation.org>,
Simon Horman <horms@...nel.org>, Geliang Tang <geliang@...nel.org>,
Muchun Song <muchun.song@...ux.dev>, Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org,
mptcp@...ts.linux.dev, cgroups@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v1 net-next 11/13] net-memcg: Add memory.socket_isolated
knob.
Hello Kuniyuki.
On Mon, Jul 21, 2025 at 08:35:30PM +0000, Kuniyuki Iwashima <kuniyu@...gle.com> wrote:
> --- a/Documentation/admin-guide/cgroup-v2.rst
> +++ b/Documentation/admin-guide/cgroup-v2.rst
> @@ -1878,6 +1878,22 @@ The following nested keys are defined.
> Shows pressure stall information for memory. See
> :ref:`Documentation/accounting/psi.rst <psi>` for details.
>
> + memory.socket_isolated
> + A read-write single value file which exists on non-root cgroups.
> + The default value is "0".
Such attributes don't fit well into hierarchy.
What are expectations in non-root non-leaf cgroups?
Also the global limit is not so much different from a memcg limit
configured on ancestors. This provision thus looks like handling only
one particular case.
> +
> + Some networking protocols (e.g., TCP, UDP) implement their own memory
> + accounting for socket buffers.
> +
> + This memory is also charged to a non-root cgroup as sock in memory.stat.
> +
> + Since per-protocol limits such as /proc/sys/net/ipv4/tcp_mem and
> + /proc/sys/net/ipv4/udp_mem are global, memory allocation for socket
> + buffers may fail even when the cgroup has available memory.
> +
> + Sockets created with socket_isolated set to 1 are no longer subject
> + to these global protocol limits.
What happens when it's changed during lifetime of cgroup?
Thanks,
Michal
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists