summaryrefslogtreecommitdiffstats
path: root/recipes-containers/docker/files/0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/docker/files/0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch')
-rw-r--r--recipes-containers/docker/files/0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/recipes-containers/docker/files/0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch b/recipes-containers/docker/files/0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch
new file mode 100644
index 00000000..30b1a7d8
--- /dev/null
+++ b/recipes-containers/docker/files/0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch
@@ -0,0 +1,56 @@
1From 28c115da3c6c2e6edda08c30a779f1ffaab2fbc7 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Fri, 18 Oct 2024 18:27:16 +0000
4Subject: [PATCH] check-config: make CONFIG_MEMCG_SWAP conditional
5
6Kernel's equal to or greater than 6.1 no longer have this
7option. See this kernel commit:
8
9 commit e55b9f96860f6c6026cff97966a740576285e07b
10 Author: Johannes Weiner <hannes@cmpxchg.org>
11 Date: Mon Sep 26 09:57:04 2022 -0400
12
13 mm: memcontrol: drop dead CONFIG_MEMCG_SWAP config symbol
14
15 Since 2d1c498072de ("mm: memcontrol: make swap tracking an integral part
16 of memory control"), CONFIG_MEMCG_SWAP hasn't been a user-visible config
17 option anymore, it just means CONFIG_MEMCG && CONFIG_SWAP.
18
19 Update the sites accordingly and drop the symbol.
20
21 [ While touching the docs, remove two references to CONFIG_MEMCG_KMEM,
22 which hasn't been a user-visible symbol for over half a decade. ]
23
24 Link: https://lkml.kernel.org/r/20220926135704.400818-5-hannes@cmpxchg.org
25 Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
26 Acked-by: Shakeel Butt <shakeelb@google.com>
27 Cc: Hugh Dickins <hughd@google.com>
28 Cc: Michal Hocko <mhocko@suse.com>
29 Cc: Roman Gushchin <roman.gushchin@linux.dev>
30 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
31
32Upstream-Status: Inappropriate [embedded specific]
33
34Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
35---
36 contrib/check-config.sh | 4 +++-
37 1 file changed, 3 insertions(+), 1 deletion(-)
38
39diff --git a/contrib/check-config.sh b/contrib/check-config.sh
40index b9cc6bf87d..3124548d99 100755
41--- a/contrib/check-config.sh
42+++ b/contrib/check-config.sh
43@@ -266,7 +266,9 @@ echo 'Optional Features:'
44 check_flags CGROUP_PIDS
45 }
46 {
47- check_flags MEMCG_SWAP
48+ if [ "$kernelMajor" -lt 6 ] || [ "$kernelMajor" -eq 6 -a "$kernelMinor" -le 1 ]; then
49+ check_flags MEMCG_SWAP
50+ fi
51 # Kernel v5.8+ removes MEMCG_SWAP_ENABLED.
52 if [ "$kernelMajor" -lt 5 ] || [ "$kernelMajor" -eq 5 -a "$kernelMinor" -le 8 ]; then
53 CODE=${EXITCODE}
54--
552.39.2
56