mirror_ubuntu-kernels/Documentation/admin-guide/cgroup-v1
Michal Hocko 86327e8eb9 memcg: drop kmem.limit_in_bytes
kmem.limit_in_bytes (v1 way to limit kernel memory usage) has been
deprecated since 58056f7750 ("memcg, kmem: further deprecate
kmem.limit_in_bytes") merged in 5.16.  We haven't heard about any serious
users since then but it seems that the mere presence of the file is
causing more harm thatn good.  We (SUSE) have had several bug reports from
customers where Docker based containers started to fail because a write to
kmem.limit_in_bytes has failed.

This was unexpected because runc code only expects ENOENT (kmem disabled)
or EBUSY (tasks already running within cgroup).  So a new error code was
unexpected and the whole container startup failed.  This has been later
addressed by
52390d6804
so current Docker runtimes do not suffer from the problem anymore.  There
are still older version of Docker in use and likely hard to get rid of
completely.

Address this by wiping out the file completely and effectively get back to
pre 4.5 era and CONFIG_MEMCG_KMEM=n configuration.

I would recommend backporting to stable trees which have picked up
58056f7750 ("memcg, kmem: further deprecate kmem.limit_in_bytes").

[mhocko@suse.com: restore _KMEM switch case]
  Link: https://lkml.kernel.org/r/ZKe5wxdbvPi5Cwd7@dhcp22.suse.cz
Link: https://lkml.kernel.org/r/20230704115240.14672-1-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Acked-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Tejun Heo <tj@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-08-18 10:12:11 -07:00
..
blkio-controller.rst Documentation: admin-guide: correct spelling 2023-02-02 11:04:42 -07:00
cgroups.rst docs: cgroup-v1: use numbered lists for user interface setup 2023-01-05 07:38:11 -10:00
cpuacct.rst
cpusets.rst docs: cgroup-v1/cpusets: update libcgroup project link 2023-04-14 06:55:48 -10:00
devices.rst
freezer-subsystem.rst
hugetlb.rst hugetlb: add hugetlb.*.numa_stat file 2022-01-15 16:30:29 +02:00
index.rst cgroup: Miscellaneous cgroup documentation. 2021-04-04 13:34:46 -04:00
memcg_test.rst filemap: Remove add_to_page_cache() and add_to_page_cache_locked() 2022-06-29 08:51:05 -04:00
memory.rst memcg: drop kmem.limit_in_bytes 2023-08-18 10:12:11 -07:00
misc.rst cgroup: Miscellaneous cgroup documentation. 2021-04-04 13:34:46 -04:00
net_cls.rst
net_prio.rst
pids.rst
rdma.rst Documentation/admin-guide: cgroup-v1/rdma: drop doubled word 2020-07-05 14:01:48 -06:00