diff options
author | David Rientjes <rientjes@google.com> | 2010-08-22 19:16:06 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2010-10-02 03:24:28 -0400 |
commit | 8df275af8db8220d7e3f1bf97b6ac7aad05f96f0 (patch) | |
tree | 7f61075da7730d615724e791f6d63e193443bb76 /mm/slob.c | |
parent | c1d508365ea07f9f8849c7da5b02186601570f8b (diff) |
slob: fix gfp flags for order-0 page allocations
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>
Diffstat (limited to 'mm/slob.c')
-rw-r--r-- | mm/slob.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -500,7 +500,9 @@ void *__kmalloc_node(size_t size, gfp_t gfp, int node) | |||
500 | } else { | 500 | } else { |
501 | unsigned int order = get_order(size); | 501 | unsigned int order = get_order(size); |
502 | 502 | ||
503 | ret = slob_new_pages(gfp | __GFP_COMP, get_order(size), node); | 503 | if (likely(order)) |
504 | gfp |= __GFP_COMP; | ||
505 | ret = slob_new_pages(gfp, order, node); | ||
504 | if (ret) { | 506 | if (ret) { |
505 | struct page *page; | 507 | struct page *page; |
506 | page = virt_to_page(ret); | 508 | page = virt_to_page(ret); |