Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-05-17 13:37:31 +0200
committerJiri Slaby <jslaby@suse.cz>2019-05-17 13:37:31 +0200
commit53906c92a1af041e817ef709166c4bae693c2b79 (patch)
treeb469bdeb7168f64313615ed102b18d9d1d581153
parent07d2e253d2b388efd4d1cced9cc6fa3746f2ef78 (diff)
Refreshstable
patches.suse/memcg-make-it-work-on-sparse-non-0-node-systems.patch. Update to a solution proposed by upstream.
-rw-r--r--patches.suse/memcg-make-it-work-on-sparse-non-0-node-systems.patch38
1 files changed, 31 insertions, 7 deletions
diff --git a/patches.suse/memcg-make-it-work-on-sparse-non-0-node-systems.patch b/patches.suse/memcg-make-it-work-on-sparse-non-0-node-systems.patch
index 00d69dde88..7e4a11267d 100644
--- a/patches.suse/memcg-make-it-work-on-sparse-non-0-node-systems.patch
+++ b/patches.suse/memcg-make-it-work-on-sparse-non-0-node-systems.patch
@@ -1,7 +1,7 @@
From: Jiri Slaby <jslaby@suse.cz>
Date: Mon, 29 Apr 2019 12:39:10 +0200
Subject: memcg: make it work on sparse non-0-node systems
-Patch-mainline: submitted on 2019/04/29
+Patch-mainline: submitted on 2019/05/17
References: bnc#1133616
We have a single node system with node 0 disabled:
@@ -36,21 +36,36 @@ The root cause are list_lru_memcg_aware checks in the list_lru code.
The test in list_lru_memcg_aware is broken: it assumes node 0 is always
present, but it is not true on some systems as can be seen above.
-So fix this by checking the first online node instead of node 0.
+So fix this by avoiding checks on node 0. Remember the memcg-awareness
+by a bool flag in struct list_lru.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
-Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
+Suggested-by: Vladimir Davydov <vdavydov.dev@gmail.com>
+Acked-by: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: <cgroups@vger.kernel.org>
Cc: <linux-mm@kvack.org>
Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
---
- mm/list_lru.c | 6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
+ include/linux/list_lru.h | 1 +
+ mm/list_lru.c | 8 +++-----
+ 2 files changed, 4 insertions(+), 5 deletions(-)
+diff --git a/include/linux/list_lru.h b/include/linux/list_lru.h
+index aa5efd9351eb..d5ceb2839a2d 100644
+--- a/include/linux/list_lru.h
++++ b/include/linux/list_lru.h
+@@ -54,6 +54,7 @@ struct list_lru {
+ #ifdef CONFIG_MEMCG_KMEM
+ struct list_head list;
+ int shrinker_id;
++ bool memcg_aware;
+ #endif
+ };
+
diff --git a/mm/list_lru.c b/mm/list_lru.c
-index 0730bf8ff39f..7689910f1a91 100644
+index 0730bf8ff39f..d3b538146efd 100644
--- a/mm/list_lru.c
+++ b/mm/list_lru.c
@@ -37,11 +37,7 @@ static int lru_shrinker_id(struct list_lru *lru)
@@ -62,10 +77,19 @@ index 0730bf8ff39f..7689910f1a91 100644
- * in the systems supporting sparse numa ids.
- */
- return !!lru->node[0].memcg_lrus;
-+ return !!lru->node[first_online_node].memcg_lrus;
++ return lru->memcg_aware;
}
static inline struct list_lru_one *
+@@ -451,6 +447,8 @@ static int memcg_init_list_lru(struct list_lru *lru, bool memcg_aware)
+ {
+ int i;
+
++ lru->memcg_aware = memcg_aware;
++
+ if (!memcg_aware)
+ return 0;
+
--
2.21.0