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
commit0aca3a04c71352dffa60598417e34e8e7d1a39fb (patch)
tree4663c17eb1ecce238c6eb565bbec760042222ba0
parent2a653f5003b700a425f1ecbd6513334ba6940dbe (diff)
Refreshstable
patches.suse/memcg-make-it-work-on-sparse-non-0-node-systems.patch. Update to a solution proposed by upstream. suse-commit: 53906c92a1af041e817ef709166c4bae693c2b79
-rw-r--r--include/linux/list_lru.h1
-rw-r--r--mm/list_lru.c4
2 files changed, 4 insertions, 1 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 7689910f1a91..d3b538146efd 100644
--- a/mm/list_lru.c
+++ b/mm/list_lru.c
@@ -37,7 +37,7 @@ static int lru_shrinker_id(struct list_lru *lru)
static inline bool list_lru_memcg_aware(struct list_lru *lru)
{
- return !!lru->node[first_online_node].memcg_lrus;
+ return lru->memcg_aware;
}
static inline struct list_lru_one *
@@ -447,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;