Skip to content

Commit

Permalink
slob: fix gfp flags for order-0 page allocations
Browse files Browse the repository at this point in the history
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.

Acked-by: Matt Mackall <mpm@selenic.com>
Reviewed-by: Christoph Lameter <cl@linux.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
  • Loading branch information
rientjes authored and penberg committed Oct 2, 2010
1 parent c1d5083 commit 8df275a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mm/slob.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8df275a

Please sign in to comment.