linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Michal Koutný" <mkoutny@suse.com>
To: "Jan Kratochvil (Azul)" <jkratochvil@azul.com>
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-mm@kvack.org, containers@lists.osdl.org,
	Waiman Long <longman@redhat.com>
Subject: Re: [PATCH v2] Port hierarchical_{memory,swap}_limit cgroup1->cgroup2
Date: Mon, 12 Feb 2024 16:00:36 +0100	[thread overview]
Message-ID: <ked455hccs23ghrqug3ieqck6qmmlip5htgszjvz7n3cvhvaeo@7kkg6faezy2a> (raw)
In-Reply-To: <ZcmaPqZ9HzoN0GFM@host1.jankratochvil.net>

[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]

Hello.

Something like this would come quite handy.

On Mon, Feb 12, 2024 at 12:10:38PM +0800, "Jan Kratochvil (Azul)" <jkratochvil@azul.com> wrote:
> which are useful for userland to easily and performance-wise find out the
> effective cgroup limits being applied.

And the only way to figure out inside cgroupns.

> But for cgroup2 it has been missing so far, this is just a copy-paste of the
> cgroup1 code while changing s/memsw/swap/ as that is what cgroup1 vs. cgroup2
> tracks. I have added it to the end of "memory.stat" to prevent possible
> compatibility problems with existing code parsing that file.

I was thinking of memory.max.effective (and others).

- no need to (possibly flush) stats when reading memory.stat
- can be generalized also for pids controller (and other "limiting" controllers) 
- analogous to precedent of cpuset.cpus.effective

Whereas, using v1 approach in v2:
- memory.stat mixes true stats and limits,
- memmory.stat is hierarchical by default, no need for the prefix.

What do you think of the separate .effective file(s)?

Thanks
Michal

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2024-02-12 15:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-12  4:10 Jan Kratochvil (Azul)
2024-02-12 15:00 ` Michal Koutný [this message]
2024-02-12 15:26   ` Waiman Long

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=ked455hccs23ghrqug3ieqck6qmmlip5htgszjvz7n3cvhvaeo@7kkg6faezy2a \
    --to=mkoutny@suse.com \
    --cc=cgroups@vger.kernel.org \
    --cc=containers@lists.osdl.org \
    --cc=jkratochvil@azul.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=longman@redhat.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