]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
mm: rmap: fix huge file mmap accounting in the memcg stats
authorJohannes Weiner <hannes@cmpxchg.org>
Fri, 31 Mar 2017 22:11:50 +0000 (15:11 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 21 Apr 2017 08:11:46 +0000 (10:11 +0200)
commitfac9b95a2b000336eca46ee2d195a936ad88e991
tree4379563340ac2573184359c40a3adbd22b5bcb3f
parentfa5039c2582789fc0377057452e4b991e23ee38e
mm: rmap: fix huge file mmap accounting in the memcg stats

BugLink: http://bugs.launchpad.net/bugs/1681875
commit 553af430e7c981e6e8fa5007c5b7b5773acc63dd upstream.

Huge pages are accounted as single units in the memcg's "file_mapped"
counter.  Account the correct number of base pages, like we do in the
corresponding node counter.

Link: http://lkml.kernel.org/r/20170322005111.3156-1-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
include/linux/memcontrol.h
mm/rmap.c