From 83044726c5a70ebaf7ef749c2b9900db32db8b0c Mon Sep 17 00:00:00 2001 From: Caspar Zhang Date: Mon, 23 Sep 2019 15:34:55 -0700 Subject: [PATCH] alinux: mm, memcg: add missing memory stall section in mem_cgroup_handle_over_high When backporting commit 0e4b01df8659 ("mm, memcg: throttle allocators when failing reclaim over memory.high"), memory stall section was inadvertently missing. Fix this issue by adding it back. Fixes: eda29cc0ce0f ("mm, memcg: throttle allocators when failing reclaim over memory.high") Signed-off-by: Caspar Zhang Acked-by: Joseph Qi --- mm/memcontrol.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 8d509a10decd..71a0be7051a9 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -65,6 +65,7 @@ #include #include #include +#include #include "internal.h" #include #include @@ -2235,6 +2236,7 @@ static void high_work_func(struct work_struct *work) void mem_cgroup_handle_over_high(void) { unsigned long usage, high, clamped_high; + unsigned long pflags; unsigned long penalty_jiffies, overage; unsigned int nr_pages = current->memcg_nr_pages_over_high; struct mem_cgroup *memcg; @@ -2307,7 +2309,9 @@ void mem_cgroup_handle_over_high(void) * schedule_timeout_killable sets TASK_KILLABLE). This means we don't * need to account for any ill-begotten jiffies to pay them off later. */ + psi_memstall_enter(&pflags); schedule_timeout_killable(penalty_jiffies); + psi_memstall_leave(&pflags); out: css_put(&memcg->css); -- GitLab