mm/memcontrol: fix warning in mem_cgroup_page_lruvec()
A message that is not in the archive (sent off-list or not yet received): [email protected]
Roman Gushchin
Acked-byQuoted 9 lines
Boot a
CONFIG_MEMCG=ykernel with "cgroup_disabled=memory" and you are met by a series of warnings from theVM_WARN_ON_ONCE_PAGE(!memcg, page)recently added to the inlinemem_cgroup_page_lruvec().An earlier attempt to place that warning, in
mem_cgroup_lruvec(), had been careful to do so after weeding out themem_cgroup_disabled()case; but was itself invalid because of themem_cgroup_lruvec(NULL, pgdat)inclear_pgdat_congested()andage_active_anon().
Quoted 5 lines
Warning in
mem_cgroup_page_lruvec()was once useful in detecting a KSM charge bug, so may be worth keeping: but skip ifmem_cgroup_disabled().Fixes 9a1ac2288cf1 ("mm/memcontrol:rewrite mem_cgroup_page_lruvec()")Signed-off-by Hugh Dickins <[email protected]>
Acked-by Roman Gushchin <[email protected]>
Thanks!
Quoted 16 lines
---
include/linux/memcontrol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/memcontrol.h +1
-1@@ -665,7 +665,7 @@ static inline struct lruvec *mem_cgroup_ {struct mem_cgroup *memcg =page_memcg (page); -VM_WARN_ON_ONCE_PAGE (!memcg, page); +VM_WARN_ON_ONCE_PAGE (!memcg && !mem_cgroup_disabled (), page);return mem_cgroup_lruvec (memcg, pgdat); }