[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1605864603-49118-1-git-send-email-alex.shi@linux.alibaba.com>
Date: Fri, 20 Nov 2020 17:30:03 +0800
From: Alex Shi <alex.shi@...ux.alibaba.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Johannes Weiner <hannes@...xchg.org>,
Shakeel Butt <shakeelb@...gle.com>,
Roman Gushchin <guro@...com>, Michal Hocko <mhocko@...e.com>,
Yafang Shao <laoar.shao@...il.com>,
Alexander Duyck <alexander.h.duyck@...ux.intel.com>,
Hui Su <sh_def@....com>, Wei Yang <richard.weiyang@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH next-akpm] mm/memcg: add missed warning in mem_cgroup_lruvec
commit "(mm/memcontrol:rewrite mem_cgroup_page_lruvec())" on mm tree use
mem_cgroup_lruvec to rewrite mem_cgroup_page_lruvec, but it missed a
DEBUG_VM warning as following, since we always charge a page before
return from allocation. Add back this warning is helpful:
VM_WARN_ON_ONCE_PAGE(!memcg, page);
Signed-off-by: Alex Shi <alex.shi@...ux.alibaba.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Johannes Weiner <hannes@...xchg.org>
Cc: Shakeel Butt <shakeelb@...gle.com>
Cc: Roman Gushchin <guro@...com>
Cc: Michal Hocko <mhocko@...e.com>
Cc: Yafang Shao <laoar.shao@...il.com>
Cc: Alexander Duyck <alexander.h.duyck@...ux.intel.com>
Cc: Hui Su <sh_def@....com>
Cc: Wei Yang <richard.weiyang@...il.com>
Cc: linux-kernel@...r.kernel.org
---
include/linux/memcontrol.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 925b09ace986..7809020ef7bd 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -618,6 +618,7 @@ static inline struct lruvec *mem_cgroup_lruvec(struct mem_cgroup *memcg,
goto out;
}
+ VM_WARN_ON_ONCE_PAGE(!memcg, page);
if (!memcg)
memcg = root_mem_cgroup;
--
2.29.GIT
Powered by blists - more mailing lists