Linux cgroups development
 help / color / mirror / Atom feed
From: Vishal Chourasia <vishalc@linux.ibm.com>
To: tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com,
	corbet@lwn.net, cgroups@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Vishal Chourasia <vishalc@linux.ibm.com>
Subject: [PATCH] doc,cgroup-v2: memory.max is reported in multiples of page size
Date: Thu, 10 Apr 2025 19:04:40 +0530	[thread overview]
Message-ID: <20250410133439.4028817-2-vishalc@linux.ibm.com> (raw)

Update documentation for memory.max to clarify that the reported value
is in multiples of the system page_size. The following example
demonstrates this behavior:

  # cd /sys/fs/cgroup/
  # cat cgroup.subtree_control
  cpu io memory pids
  # mkdir mem
  # cd mem
  # echo 8000000 > memory.max
  # cat memory.max
  7995392

  # getconf PAGESIZE
  65536

  # echo $((8000000/65536*65536))
  7995392

Signed-off-by: Vishal Chourasia <vishalc@linux.ibm.com>
---
 Documentation/admin-guide/cgroup-v2.rst | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index 1a16ce68a4d7..577d05c03ffa 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -1316,6 +1316,9 @@ PAGE_SIZE multiple when read back.
 	Caller could retry them differently, return into userspace
 	as -ENOMEM or silently ignore in cases like disk readahead.
 
+        Note that the value set for memory.max is reported in units
+        corresponding to the system's page size.
+
   memory.reclaim
 	A write-only nested-keyed file which exists for all cgroups.
 
-- 
2.49.0


             reply	other threads:[~2025-04-10 13:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10 13:34 Vishal Chourasia [this message]
2025-04-10 13:47 ` [PATCH] doc,cgroup-v2: memory.max is reported in multiples of page size Michal Koutný
2025-04-10 13:58   ` Vishal Chourasia

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=20250410133439.4028817-2-vishalc@linux.ibm.com \
    --to=vishalc@linux.ibm.com \
    --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=mkoutny@suse.com \
    --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