mm: memcontrol: correct the NR_ANON_THPS counter of hierarchical memcg
authorzhongjiang-ali <zhongjiang-ali@linux.alibaba.com>
Mon, 2 Nov 2020 01:07:30 +0000 (17:07 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 2 Nov 2020 20:14:18 +0000 (12:14 -0800)
commit7de2e9f195b9cb27583c5c64deaaf5e6afcc163e
treec77ba8eb8d9b084834375b62405f39e2a29cbc45
parent79aa925bf239c234be8586780e482872dc4690dd
mm: memcontrol: correct the NR_ANON_THPS counter of hierarchical memcg

memcg_page_state will get the specified number in hierarchical memcg, It
should multiply by HPAGE_PMD_NR rather than an page if the item is
NR_ANON_THPS.

[akpm@linux-foundation.org: fix printk warning]
[akpm@linux-foundation.org: use u64 cast, per Michal]

Fixes: 468c398233da ("mm: memcontrol: switch to native NR_ANON_THPS counter")
Signed-off-by: zhongjiang-ali <zhongjiang-ali@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Link: https://lkml.kernel.org/r/1603722395-72443-1-git-send-email-zhongjiang-ali@linux.alibaba.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c