All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: vmscan: protect shrinker idr replace with CONFIG_MEMCG
@ 2019-12-04 19:16 Yang Shi
  2019-12-05  8:23 ` Kirill Tkhai
  2019-12-05  9:44 ` Michal Hocko
  0 siblings, 2 replies; 8+ messages in thread
From: Yang Shi @ 2019-12-04 19:16 UTC (permalink / raw)
  To: ktkhai, hannes, mhocko, shakeelb, guro, akpm
  Cc: yang.shi, linux-mm, linux-kernel

Since commit 0a432dcbeb32edcd211a5d8f7847d0da7642a8b4 ("mm: shrinker:
make shrinker not depend on memcg kmem"), shrinkers' idr is protected by
CONFIG_MEMCG instead of CONFIG_MEMCG_KMEM, so it makes no sense to
protect shrinker idr replace with CONFIG_MEMCG_KMEM.

Cc: Kirill Tkhai <ktkhai@virtuozzo.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Roman Gushchin <guro@fb.com>
Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
---
 mm/vmscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index ee4eecc..e7f10c4 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -422,7 +422,7 @@ void register_shrinker_prepared(struct shrinker *shrinker)
 {
 	down_write(&shrinker_rwsem);
 	list_add_tail(&shrinker->list, &shrinker_list);
-#ifdef CONFIG_MEMCG_KMEM
+#ifdef CONFIG_MEMCG
 	if (shrinker->flags & SHRINKER_MEMCG_AWARE)
 		idr_replace(&shrinker_idr, shrinker, shrinker->id);
 #endif
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-12-05 17:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-04 19:16 [PATCH] mm: vmscan: protect shrinker idr replace with CONFIG_MEMCG Yang Shi
2019-12-05  8:23 ` Kirill Tkhai
2019-12-05  9:43   ` Michal Hocko
2019-12-05 10:00     ` Kirill Tkhai
2019-12-05 10:11       ` Kirill Tkhai
2019-12-05 17:05         ` Yang Shi
2019-12-05 11:45       ` Michal Hocko
2019-12-05  9:44 ` Michal Hocko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.