[Devel] [PATCH rh7 1/4] vmalloc: account to memcg/kmem

Vladimir Davydov vdavydov at parallels.com
Wed Aug 26 09:28:13 PDT 2015


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

Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
 mm/vmalloc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 7fbc92aa03bc..9ce5142b44cb 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1497,7 +1497,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)
@@ -1630,9 +1630,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() */
-- 
2.1.4




More information about the Devel mailing list