lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250410133439.4028817-2-vishalc@linux.ibm.com>
Date: Thu, 10 Apr 2025 19:04:40 +0530
From: Vishal Chourasia <vishalc@...ux.ibm.com>
To: tj@...nel.org, hannes@...xchg.org, mkoutny@...e.com, corbet@....net,
        cgroups@...r.kernel.org, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc: Vishal Chourasia <vishalc@...ux.ibm.com>
Subject: [PATCH] doc,cgroup-v2: memory.max is reported in multiples of page size

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@...ux.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ