All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: append __GFP_COMP flag for trace_malloc
@ 2021-04-27  2:43 Xiongwei Song
  2021-04-27  2:53 ` Matthew Wilcox
  0 siblings, 1 reply; 15+ messages in thread
From: Xiongwei Song @ 2021-04-27  2:43 UTC (permalink / raw)
  To: cl, penberg, rientjes, iamjoonsoo.kim, akpm, vbabka
  Cc: linux-mm, linux-kernel, Xiongwei Song

From: Xiongwei Song <sxwjean@gmail.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@gmail.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


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-05-07  5:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27  2:43 [PATCH] mm: append __GFP_COMP flag for trace_malloc Xiongwei Song
2021-04-27  2:53 ` Matthew Wilcox
2021-04-27  3:29   ` Xiongwei Song
2021-04-27  3:29     ` Xiongwei Song
2021-04-27  3:36     ` Matthew Wilcox
2021-04-27  4:11       ` Xiongwei Song
2021-04-27  4:11         ` Xiongwei Song
2021-04-27  5:30         ` Xiongwei Song
2021-04-27  5:30           ` Xiongwei Song
2021-04-27 11:25           ` Matthew Wilcox
2021-04-28  3:05             ` Xiongwei Song
2021-04-28  3:05               ` Xiongwei Song
2021-05-03 12:35               ` Vlastimil Babka
2021-05-07  5:41                 ` Xiongwei Song
2021-05-07  5:41                   ` Xiongwei Song

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.