[Devel,rh7,4/7] mm/memcg: make __memcg_activate_kmem() to actually activate kmem

Submitted by Andrey Ryabinin on March 31, 2017, 1:51 p.m.

Details

Message ID 20170331135111.16715-4-aryabinin@virtuozzo.com
State New
Series "Series without cover letter"
Headers show

Commit Message

Andrey Ryabinin March 31, 2017, 1:51 p.m.
Commit 5e049077fce3 ("ms/memcg: rework memcg_update_kmem_limit synchronization")
which is actually reapplied after rebase commit d0abbfb74b16
forget to set active bit on kmem_account_flags.
This leaves kmem accounting disabled.

Fix that by calling memcg_kmem_set_active(memcg) from __memcg_activate_kmem();

https://jira.sw.ru/browse/PSBM-62827

Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
---
 mm/memcontrol.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 13d4205..bc72a26 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4351,6 +4351,8 @@  static int __memcg_activate_kmem(struct mem_cgroup *memcg,
 	 * patched.
 	 */
 	memcg->kmemcg_id = memcg_id;
+	set_bit(KMEM_ACCOUNTED_ACTIVE, &memcg->kmem_account_flags);
+	set_bit(KMEM_ACCOUNTED_ACTIVATED, &memcg->kmem_account_flags);
 out:
 	return err;
 }