vmscan: fix sane_reclaim helper for legacy memcg
Subsystems (3)
PATCH 1/1 vmscan: fix sane_reclaim helper for legacy memcg
The sane_reclaim() helper is supposed to return false for memcg reclaim if the legacy hierarchy is used, because the latter lacks dirty throttling mechanism, and so it did before it was accidentally broken by commit 33398cf2f360c ("memcg: export struct mem_cgroup"). Fix it.
--- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/vmscan.c +1 -1
@@ -175,7 +175,7 @@ static bool sane_reclaim(struct scan_control *sc)if (!memcg)return true;#ifdef CONFIG_CGROUP_WRITEBACK -if (memcg->css.cgroup) +if (cgroup_on_dfl (memcg->css.cgroup))return true;#endif return false;
Signature · 7 lines
2.1.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · Vladimir Davydov
The
sane_reclaim()helper is supposed to return false for memcg reclaim if the legacy hierarchy is used, because the latter lacks dirty throttling mechanism, and so it did before it was accidentally broken by commit33398cf2f360c("memcg: export structmem_cgroup"). Fix it.Fixes 33398cf2f360c ("memcg: export struct mem_cgroup")Signed-off-by Vladimir Davydov <[email protected]>
Thanks.
Signature · 7 lines
tejun -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · Vladimir Davydov
The
sane_reclaim()helper is supposed to return false for memcg reclaim if the legacy hierarchy is used, because the latter lacks dirty throttling mechanism, and so it did before it was accidentally broken by commit33398cf2f360c("memcg: export structmem_cgroup"). Fix it.Fixes 33398cf2f360c ("memcg: export struct mem_cgroup")Signed-off-by Vladimir Davydov <[email protected]>
Thanks for catching this up!
Quoted 19 lines
--- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/vmscan.c +1
-1@@ -175,7 +175,7 @@ static bool sane_reclaim(struct scan_control *sc)if (!memcg)return true;#ifdef CONFIG_CGROUP_WRITEBACK -if (memcg->css.cgroup) +if (cgroup_on_dfl (memcg->css.cgroup))return true;#endif return false;Signature · 1 line
2.1.4
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Hello,
Quoted 16 lines · Vladimir Davydov
The
sane_reclaim()helper is supposed to return false for memcg reclaim if the legacy hierarchy is used, because the latter lacks dirty throttling mechanism, and so it did before it was accidentally broken by commit33398cf2f360c("memcg: export structmem_cgroup"). Fix it.Fixes 33398cf2f360c ("memcg: export struct mem_cgroup")Signed-off-by Vladimir Davydov <[email protected]>--- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/vmscan.c +0
-0
mm/vmscan.c static bool sane_reclaim(struct scan_control *sc) · line 178
Quoted 5 lines
mm/vmscan.c +1
-1@@ -175,7 +175,7 @@ static bool sane_reclaim(struct scan_control *sc)if (!memcg)return true;#ifdef CONFIG_CGROUP_WRITEBACK -if (memcg->css.cgroup) +if (cgroup_on_dfl (memcg->css.cgroup))
Just a heads-up. I'm applying a patch which replaces cgroup_on_dfl() with cgroup_subsys_on_dfl() to cgroup/for-4.4, so this patch would need to be adjusted to do cgroup_subsys_on_dfl(memory_cgrp_subsys) instead.
Thanks.
Signature · 7 lines
tejun -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>