diff options
author | Rik van Riel <riel@redhat.com> | 2011-01-13 18:47:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 20:32:46 -0500 |
commit | 2c888cfbc1b45508a44763d85ba2e8ac43faff5f (patch) | |
tree | 9a7f2214e5d6a01d5724ae63d4d50cddeb2293ff /mm/memcontrol.c | |
parent | 97562cd243298acf573620c764a1037bd545c9bc (diff) |
thp: fix anon memory statistics with transparent hugepages
Count each transparent hugepage as HPAGE_PMD_NR pages in the LRU
statistics, so the Active(anon) and Inactive(anon) statistics in
/proc/meminfo are correct.
Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index a1bb59d4c9d0..f4ea3410fb4d 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -1091,7 +1091,7 @@ unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, | |||
1091 | case 0: | 1091 | case 0: |
1092 | list_move(&page->lru, dst); | 1092 | list_move(&page->lru, dst); |
1093 | mem_cgroup_del_lru(page); | 1093 | mem_cgroup_del_lru(page); |
1094 | nr_taken++; | 1094 | nr_taken += hpage_nr_pages(page); |
1095 | break; | 1095 | break; |
1096 | case -EBUSY: | 1096 | case -EBUSY: |
1097 | /* we don't affect global LRU but rotate in our LRU */ | 1097 | /* we don't affect global LRU but rotate in our LRU */ |