linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [patch] slob: fix gfp flags for order-0 page allocations
@ 2010-08-22 23:16 David Rientjes
  2010-08-23  0:51 ` Christoph Lameter
  2010-08-24  4:26 ` Matt Mackall
  0 siblings, 2 replies; 8+ messages in thread
From: David Rientjes @ 2010-08-22 23:16 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: Matt Mackall, Christoph Lameter, linux-mm

kmalloc_node() may allocate higher order slob pages, but the __GFP_COMP
bit is only passed to the page allocator and not represented in the
tracepoint event.  The bit should be passed to trace_kmalloc_node() as
well.

Signed-off-by: David Rientjes <rientjes@google.com>
---
 mm/slob.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/mm/slob.c b/mm/slob.c
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -500,7 +500,9 @@ void *__kmalloc_node(size_t size, gfp_t gfp, int node)
 	} else {
 		unsigned int order = get_order(size);
 
-		ret = slob_new_pages(gfp | __GFP_COMP, get_order(size), node);
+		if (likely(order))
+			gfp |= __GFP_COMP;
+		ret = slob_new_pages(gfp, order, node);
 		if (ret) {
 			struct page *page;
 			page = virt_to_page(ret);

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2010-08-24 20:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-22 23:16 [patch] slob: fix gfp flags for order-0 page allocations David Rientjes
2010-08-23  0:51 ` Christoph Lameter
2010-08-24  4:26 ` Matt Mackall
2010-08-24  4:36   ` David Rientjes
2010-08-24 15:20     ` Matt Mackall
2010-08-24 15:37       ` Christoph Lameter
2010-08-24 20:24         ` David Rientjes
2010-08-24 17:44       ` Pekka Enberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox