linux/Documentation/admin-guide/cgroup-v1
Shakeel Butt a3417097fb memcg: make the v1 soft limit knob inert
The v1 soft limit has been deprecated since v6.12 and nobody has reported
depending on it.  Start the removal by decoupling the interface from the
implementation: keep memory.soft_limit_in_bytes, but ignore writes to it
and always report the maximum value on read similar to what
memory.kmem.limit_in_bytes already does.

Writes are still parsed, so malformed input keeps returning -EINVAL.  The
knob now also behaves the same everywhere: it used to return -EOPNOTSUPP
on PREEMPT_RT, where soft limit reclaim has always been disabled.

This also fixes the syzbot report linked below.  Soft limit reclaim is the
only caller that runs shrink_lruvec() from kswapd against a specific
memcg, so it is the only way to reach lru_gen_shrink_lruvec() and in turn
set_mm_walk(), which warns when called from kswapd.

Link: https://lore.kernel.org/20260811203203.3456029-2-shakeel.butt@linux.dev
Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev>
Reported-by: syzbot+12ee2725d5fde63a9c96@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/6a7a6929.b50370da.49fe0.005e.GAE@google.com/
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Barry Song <baohua@kernel.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kairui Song <kasong@tencent.com>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-09-01 20:26:20 -07:00
..
blkio-controller.rst Documentation: admin-guide: correct spelling 2023-02-02 11:04:42 -07:00
cgroups.rst docs: cgroup: Fix stale source file paths 2026-05-31 06:27:30 -10:00
cpuacct.rst
cpusets.rst mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
devices.rst
freezer-subsystem.rst cgroup: Add deprecation message to legacy freezer controller 2025-03-11 09:22:54 -10:00
hugetlb.rst Documentation: Fix typos and grammatical errors 2026-01-16 11:13:45 -07:00
index.rst Documentation: use a source-read extension for the index link boilerplate 2026-01-23 11:59:34 -07:00
memcg_test.rst docs: cgroup: Fix bracket 2026-07-06 09:40:33 -10:00
memory.rst memcg: make the v1 soft limit knob inert 2026-09-01 20:26:20 -07:00
misc.rst cgroup: Miscellaneous cgroup documentation. 2021-04-04 13:34:46 -04:00
net_cls.rst
net_prio.rst
pids.rst cgroup/pids: Separate semantics of pids.events related to pids.max 2024-05-26 08:45:09 -10:00
rdma.rst RDMA v7.3 merge window pull 2026-08-21 11:48:54 -07:00