From: Shakeel Butt <shakeel.butt@linux.dev>
To: Tao Cui <cui.tao@linux.dev>
Cc: tj@kernel.org, akpm@linux-foundation.org, mhocko@suse.com,
mhocko@kernel.org, mkoutny@suse.com, hannes@cmpxchg.org,
roman.gushchin@linux.dev, muchun.song@linux.dev,
linux-mm@kvack.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org, Tao Cui <cuitao@kylinos.cn>
Subject: Re: [PATCH v2] docs: cgroup: document empty-write behavior of memory limit knobs
Date: Wed, 26 Aug 2026 14:45:54 -0700 [thread overview]
Message-ID: <ao9eZmOucnSWS9ID@linux.dev> (raw)
In-Reply-To: <20260826021753.197871-1-cui.tao@linux.dev>
On Wed, Aug 26, 2026 at 10:17:53AM +0800, Tao Cui wrote:
> From: Tao Cui <cuitao@kylinos.cn>
>
> A maintenance script on a cluster wrote an unset variable into
> memory.max of a workload cgroup; the variable expanded to an empty
> string, the write succeeded, and the workload in the cgroup was
> OOM-killed. Nothing pointed back at the write, so it took quite
> some time to trace the OOM kills to that script.
>
> The memory controller documentation does not say what an empty
> write does; the cpuset controller documents its empty-value
> semantics. The actual behavior is that the empty string is
> accepted as 0. Reproduced on a k8s cluster (v1.29, cgroup v2,
> two-container pod, 384M limit):
>
> # LIMIT=
> # echo "$LIMIT" > $CG/memory.max
> # echo $?
> 0
>
> m6demo 0/2 OOMKilled 0
>
> Memory cgroup out of memory: Killed process 339529 (sleep) ... anon-rss:32kB
>
> State it where the interface files are introduced, alongside the
> existing notes on units and page rounding.
>
> Link: https://lore.kernel.org/all/aoVUlFdZYLFn_gvJ@tiehlicka/
> Signed-off-by: Tao Cui <cuitao@kylinos.cn>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
prev parent reply other threads:[~2026-08-26 21:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 2:17 [PATCH v2] docs: cgroup: document empty-write behavior of memory limit knobs Tao Cui
2026-08-26 19:57 ` Michal Hocko
2026-08-26 21:45 ` Shakeel Butt [this message]
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=ao9eZmOucnSWS9ID@linux.dev \
--to=shakeel.butt@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=cui.tao@linux.dev \
--cc=cuitao@kylinos.cn \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mhocko@suse.com \
--cc=mkoutny@suse.com \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.