From 28a24883f704043a65439eec1a2c801556ccac43 Mon Sep 17 00:00:00 2001 From: Vlastimil Babka Date: Jul 27 2023 15:04:26 +0000 Subject: Delete patches.suse/memcg-drop-kmem-limit_in_bytes.patch. Drop the patch in order to fix bsc#1213705. --- diff --git a/patches.suse/memcg-drop-kmem-limit_in_bytes.patch b/patches.suse/memcg-drop-kmem-limit_in_bytes.patch deleted file mode 100644 index cb540dd..0000000 --- a/patches.suse/memcg-drop-kmem-limit_in_bytes.patch +++ /dev/null @@ -1,80 +0,0 @@ -From b1bbc63b6baff9c5aaf30393cec29112b3abca25 Mon Sep 17 00:00:00 2001 -From: Michal Hocko -Date: Tue, 4 Jul 2023 13:38:11 +0200 -Subject: [PATCH] memcg: drop kmem.limit_in_bytes -Patch-mainline: Submitted, http://lkml.kernel.org/r/20230704115240.14672-1-mhocko@kernel.org -References: bsc#1208788, bsc#1212905 - -kmem.limit_in_bytes (v1 way to limit kernel memory usage) has been -deprecated since 58056f77502f ("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 -https://github.com/opencontainers/runc/commit/52390d68040637dfc77f9fda6bbe70952423d380 -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 -58056f77502f ("memcg, kmem: further deprecate kmem.limit_in_bytes"). - -Cc: stable -Signed-off-by: Michal Hocko ---- - Documentation/admin-guide/cgroup-v1/memory.rst | 2 -- - mm/memcontrol.c | 10 ---------- - 2 files changed, 12 deletions(-) - -diff --git a/Documentation/admin-guide/cgroup-v1/memory.rst b/Documentation/admin-guide/cgroup-v1/memory.rst -index fabaad3fd9c2..8d3afeede10e 100644 ---- a/Documentation/admin-guide/cgroup-v1/memory.rst -+++ b/Documentation/admin-guide/cgroup-v1/memory.rst -@@ -92,8 +92,6 @@ Brief summary of control files. - memory.oom_control set/show oom controls. - memory.numa_stat show the number of memory usage per numa - node -- memory.kmem.limit_in_bytes This knob is deprecated and writing to -- it will return -ENOTSUPP. - memory.kmem.usage_in_bytes show current kernel memory allocation - memory.kmem.failcnt show the number of kernel memory usage - hits limits -diff --git a/mm/memcontrol.c b/mm/memcontrol.c -index e8ca4bdcb03c..ab99503c9ff2 100644 ---- a/mm/memcontrol.c -+++ b/mm/memcontrol.c -@@ -3871,10 +3871,6 @@ static ssize_t mem_cgroup_write(struct kernfs_open_file *of, - case _MEMSWAP: - ret = mem_cgroup_resize_max(memcg, nr_pages, true); - break; -- case _KMEM: -- /* kmem.limit_in_bytes is deprecated. */ -- ret = -EOPNOTSUPP; -- break; - case _TCP: - ret = memcg_update_tcp_max(memcg, nr_pages); - break; -@@ -5085,12 +5081,6 @@ static struct cftype mem_cgroup_legacy_files[] = { - .seq_show = memcg_numa_stat_show, - }, - #endif -- { -- .name = "kmem.limit_in_bytes", -- .private = MEMFILE_PRIVATE(_KMEM, RES_LIMIT), -- .write = mem_cgroup_write, -- .read_u64 = mem_cgroup_read_u64, -- }, - { - .name = "kmem.usage_in_bytes", - .private = MEMFILE_PRIVATE(_KMEM, RES_USAGE), --- -2.30.2 diff --git a/series.conf b/series.conf index 5b08b37..ccd21d2 100644 --- a/series.conf +++ b/series.conf @@ -21445,9 +21445,6 @@ patches.suse/binfmt_elf-takethe-mmap_lock-when-walking-the-VMA-list.patch - # bsc#1208788, bsc#1212905 - patches.suse/memcg-drop-kmem-limit_in_bytes.patch - ######################################################## # Filesystems ########################################################