Skip to contentSkip to conversation

mm-vmscan-protect-shrinker-idr-replace-with-config_memcg.patch removed from -mm tree

merged [email protected] 1 participant 1 message Dec 23, 2019 Stable branch

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm: vmscan: protect shrinker idr replace with CONFIG_MEMCG
has been removed from the -mm tree. Its filename was
mm-vmscan-protect-shrinker-idr-replace-with-config_memcg.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Yang Shi <[email protected]>
Subject: mm: vmscan: protect shrinker idr replace with CONFIG_MEMCG

Since commit 0a432dcbeb32edc ("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.

And in the CONFIG_MEMCG && CONFIG_SLOB case, shrinker_idr contains only shrinker, and it is deferred_split_shrinker. But it is never actually called, since idr_replace() is never compiled due to the wrong #ifdef. The deferred_split_shrinker all the time is staying in half-registered state, and it's never called for subordinate mem cgroups.

Fixes 0a432dcbeb32 ("mm: shrinker: make shrinker not depend on memcg kmem")
Cc Johannes Weiner <[email protected]>
Cc Shakeel Butt <[email protected]>
Cc Roman Gushchin <[email protected]>
Cc <[email protected]> [5.4+]

---

 mm/vmscan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/vmscan.c renamed from mm/vmscan.c~mm-vmscan-protect-shrinker-idr-replace-with-config_memcg +1 -1
@@ -387,7 +387,7 @@ void register_shrinker_prepared(struct s
 {
 	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

_

Patches currently in -mm which might be from [email protected] are

mm-move_pages-return-valid-node-id-in-status-if-the-page-is-already-on-the-target-node.patch