path: root/mm/vmpressure.c
diff options
authorVladimir Davydov <>2016-02-02 16:57:49 -0800
committerLinus Torvalds <>2016-02-03 08:28:43 -0800
commit3c1da7beeee02560cd0f0c66c5a59fce3c6746e3 (patch)
tree2fc9b86f2fc86e7a720b4088aa0a46d4ae1cf909 /mm/vmpressure.c
parent30bdbb78009e67767983085e302bec6d97afc679 (diff)
mm/vmpressure.c: fix subtree pressure detection
When vmpressure is called for the entire subtree under pressure we mistakenly use vmpressure->scanned instead of vmpressure->tree_scanned when checking if vmpressure work is to be scheduled. This results in suppressing all vmpressure events in the legacy cgroup hierarchy. Fix it. Fixes: 8e8ae645249b ("mm: memcontrol: hook up vmpressure to socket pressure") Signed-off-by: Vladimir Davydov <> Acked-by: Johannes Weiner <> Acked-by: Michal Hocko <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'mm/vmpressure.c')
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/vmpressure.c b/mm/vmpressure.c
index 9a6c0704211c..149fdf6c5c56 100644
--- a/mm/vmpressure.c
+++ b/mm/vmpressure.c
@@ -248,9 +248,8 @@ void vmpressure(gfp_t gfp, struct mem_cgroup *memcg, bool tree,
if (tree) {
- vmpr->tree_scanned += scanned;
+ scanned = vmpr->tree_scanned += scanned;
vmpr->tree_reclaimed += reclaimed;
- scanned = vmpr->scanned;
if (scanned < vmpressure_win)