FAILED: patch "[PATCH] mm: workingset: fix premature shadow node shrinking with" failed to apply to 4.9-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
0cefabdaf757a6455d75f00cb76874e62703ed18Mon Sep 17 00:00:00 2001
From: Johannes Weiner <[email protected]>
Date: Fri, 31 Mar 2017 15:11:52 -0700
Subject: [PATCH] mm: workingset: fix premature shadow node shrinking with
cgroups
Commit 0a6b76dd23fa ("mm: workingset: make shadow node shrinker memcg aware") enabled cgroup-awareness in the shadow node shrinker, but forgot to also enable cgroup-awareness in the list_lru the shadow nodes sit on.
Consequently, all shadow nodes are sitting on a global (per-NUMA node) list, while the shrinker applies the limits according to the amount of cache in the cgroup its shrinking. The result is excessive pressure on the shadow nodes from cgroups that have very little cache.
Enable memcg-mode on the shadow node LRUs, such that per-cgroup limits are applied to per-cgroup lists.
mm/workingset.c +1 -1
@@ -532,7 +532,7 @@ static int __init workingset_init(void)pr_info ("workingset: timestamp_bits=%d max_order=%d bucket_order=%u\n" , timestamp_bits, max_order, bucket_order); - ret =list_lru_init_key (&shadow_nodes, &shadow_nodes_key); + ret =__list_lru_init (&shadow_nodes, true, &shadow_nodes_key);if (ret) goto err; ret =register_shrinker (&workingset_shadow_shrinker);
Johannes Weiner
maintainerPATCH 1/1 mm: workingset: fix premature shadow node shrinking with cgroups
commit 0cefabdaf757a6455d75f00cb76874e62703ed18 upstream.
Commit 0a6b76dd23fa ("mm: workingset: make shadow node shrinker memcg aware") enabled cgroup-awareness in the shadow node shrinker, but forgot to also enable cgroup-awareness in the list_lru the shadow nodes sit on.
Consequently, all shadow nodes are sitting on a global (per-NUMA node) list, while the shrinker applies the limits according to the amount of cache in the cgroup its shrinking. The result is excessive pressure on the shadow nodes from cgroups that have very little cache.
Enable memcg-mode on the shadow node LRUs, such that per-cgroup limits are applied to per-cgroup lists.
--- mm/workingset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/workingset.c +1 -1
@@ -492,7 +492,7 @@ static int __init workingset_init(void)pr_info ("workingset: timestamp_bits=%d max_order=%d bucket_order=%u\n" , timestamp_bits, max_order, bucket_order); - ret =list_lru_init_key (&workingset_shadow_nodes, &shadow_nodes_key); + ret =__list_lru_init (&workingset_shadow_nodes, true, &shadow_nodes_key);if (ret) goto err; ret =register_shrinker (&workingset_shadow_shrinker);
Signature · 1 line
2.12.1