linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kratochvil <jkratochvil@azul.com>
To: Roman Gushchin <roman.gushchin@linux.dev>
Cc: "Michal Koutný" <mkoutny@suse.com>,
	cgroups@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	"Tejun Heo" <tj@kernel.org>, "Zefan Li" <lizefan.x@bytedance.com>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Michal Hocko" <mhocko@kernel.org>,
	"Shakeel Butt" <shakeel.butt@linux.dev>,
	"Muchun Song" <muchun.song@linux.dev>,
	"Andrew Morton" <akpm@linux-foundation.org>
Subject: Re: [RFC PATCH v5 0/3] Add memory.max.effective for application's allocators
Date: Sat, 17 Aug 2024 14:00:15 +0800	[thread overview]
Message-ID: <ZsA8b9806Xl8AxLZ@host2.jankratochvil.net> (raw)
In-Reply-To: <ZmH8pNkk2MHvvCzb@P9FQF9L96D>

On Fri, 07 Jun 2024 02:15:00 +0800, Roman Gushchin wrote:
> If the goal is to detect how much memory would it be possible to allocate,
> I'm not sure that knowing all memory.max limits upper in the hierarchy
> really buys anything without knowing actual usages and a potential
> for memory reclaim across the entire tree.
> 
> E.g.:
> 
> A (max = 100G)
> | \
> B  C
> 
> C's effective max will come out as 100G, but if B.anon_usage = 100G and
> there is no swap, the actual number is 0.

Yes, it would be better to subtract the used memory from ancestor (and thus
even current) cgroups. The original use case of this feature is for cloud
nodes running a single Java JVM where the sibling cgroups are not an issue.


Jan Kratochvil


  reply	other threads:[~2024-08-17  6:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06 15:22 Michal Koutný
2024-06-06 15:22 ` [RFC PATCH v5 1/3] memcg: Add memory.max.effective attribute Michal Koutný
2024-06-06 15:22 ` [RFC PATCH v5 2/3] memcg: Add memory.swap.max.effective like hierarchical_memsw_limit Michal Koutný
2024-06-06 15:22 ` [RFC PATCH v5 3/3] memcg: Notify on memory.max.effective changes Michal Koutný
2024-06-06 18:15 ` [RFC PATCH v5 0/3] Add memory.max.effective for application's allocators Roman Gushchin
2024-08-17  6:00   ` Jan Kratochvil [this message]
2024-08-19 16:42     ` Michal Koutný

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=ZsA8b9806Xl8AxLZ@host2.jankratochvil.net \
    --to=jkratochvil@azul.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=corbet@lwn.net \
    --cc=hannes@cmpxchg.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizefan.x@bytedance.com \
    --cc=mhocko@kernel.org \
    --cc=mkoutny@suse.com \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=tj@kernel.org \
    /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