[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1619491400-1904-1-git-send-email-sxwjean@me.com>
Date:   Tue, 27 Apr 2021 10:43:20 +0800
From:   Xiongwei Song <sxwjean@...com>
To:     cl@...ux.com, penberg@...nel.org, rientjes@...gle.com,
        iamjoonsoo.kim@....com, akpm@...ux-foundation.org, vbabka@...e.cz
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Xiongwei Song <sxwjean@...il.com>
Subject: [PATCH] mm: append __GFP_COMP flag for trace_malloc
From: Xiongwei Song <sxwjean@...il.com>
When calling kmalloc_order, the flags should include __GFP_COMP here,
so that trace_malloc can trace the precise flags.
Signed-off-by: Xiongwei Song <sxwjean@...il.com>
---
 mm/slab_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 585a6f9..c23e1e8 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -928,7 +928,7 @@ EXPORT_SYMBOL(kmalloc_order);
 void *kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order)
 {
 	void *ret = kmalloc_order(size, flags, order);
-	trace_kmalloc(_RET_IP_, ret, size, PAGE_SIZE << order, flags);
+	trace_kmalloc(_RET_IP_, ret, size, PAGE_SIZE << order, flags | __GFP_COMP);
 	return ret;
 }
 EXPORT_SYMBOL(kmalloc_order_trace);
-- 
2.7.4
Powered by blists - more mailing lists