[Devel] [PATCH RHEL7 COMMIT] mm/migrate: add missing memcg charge
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Aug 30 14:24:48 MSK 2017
The commit is pushed to "branch-rh7-3.10.0-693.1.1.vz7.37.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.1.1.el7
------>
commit 1c1c763d7424c872265d60007d6050cf3a394386
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date: Wed Aug 30 14:24:48 2017 +0300
mm/migrate: add missing memcg charge
Fixes: b3c711a7287f ("ms/mm: memcontrol: rewrite uncharge API")
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
mm/migrate.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/migrate.c b/mm/migrate.c
index 6b7349c..c629762f 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -2383,6 +2383,9 @@ static void migrate_vma_insert_page(struct migrate_vma *migrate,
inc_mm_counter(mm, MM_ANONPAGES);
page_add_new_anon_rmap(page, vma, addr);
+ mem_cgroup_commit_charge(page, memcg, false);
+ if (!is_zone_device_page(page))
+ lru_cache_add_active_or_unevictable(page, vma);
set_pte_at(mm, addr, ptep, entry);
/* Take a reference on the page */
More information about the Devel
mailing list