[Devel] [PATCH RHEL7 COMMIT] vmalloc: account to memcg/kmem

Vladimir Davydov vdavydov at odin.com
Mon Sep 7 03:15:46 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-229.7.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.6.7
------>
commit ea41708879ed7a545039011df08f01ea720e137d
Author: Vladimir Davydov <vdavydov at parallels.com>
Date:   Mon Sep 7 14:15:46 2015 +0400

    vmalloc: account to memcg/kmem
    
    https://jira.sw.ru/browse/PSBM-33839
    
    Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
    Reviewed-by: Kirill Tkhai <ktkhai at odin.com>
---
 mm/vmalloc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index cbe6af4bf1d3..e29fe5ec27d1 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1496,7 +1496,7 @@ static void __vunmap(const void *addr, int deallocate_pages)
 			struct page *page = area->pages[i];
 
 			BUG_ON(!page);
-			__free_page(page);
+			__free_kmem_pages(page, 0);
 		}
 
 		if (area->flags & VM_VPAGES)
@@ -1629,9 +1629,9 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
 		gfp_t tmp_mask = gfp_mask | __GFP_NOWARN;
 
 		if (node < 0)
-			page = alloc_page(tmp_mask);
+			page = alloc_kmem_pages(tmp_mask, order);
 		else
-			page = alloc_pages_node(node, tmp_mask, order);
+			page = alloc_kmem_pages_node(node, tmp_mask, order);
 
 		if (unlikely(!page)) {
 			/* Successfully allocated i pages, free them in __vunmap() */



More information about the Devel mailing list