All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Matt Mackall <mpm@selenic.com>,
	Christoph Lameter <cl@linux-foundation.org>,
	linux-mm@kvack.org
Subject: [patch] slob: fix gfp flags for order-0 page allocations
Date: Sun, 22 Aug 2010 16:16:06 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1008221615350.29062@chino.kir.corp.google.com> (raw)

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>

             reply	other threads:[~2010-08-22 23:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-22 23:16 David Rientjes [this message]
2010-08-23  0:51 ` [patch] slob: fix gfp flags for order-0 page allocations 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-25 20:59         ` DRM-related kmalloc-32 memory leak in 2.6.35 Matt Mackall
2010-09-27 18:52           ` Andrew Morton
2010-09-27 20:08             ` [PATCH] drm: Prune GEM vma entries Chris Wilson
2010-09-27 20:08               ` Andrew Morton
2010-09-27 20:08                 ` Andrew Morton
2010-09-27 20:28                 ` Chris Wilson
2010-10-02  0:09               ` Matt Mackall
2010-10-03 18:59                 ` Paul Rolland
2010-10-04  7:07               ` Paul Rolland
2010-10-04  7:07                 ` Paul Rolland
2010-09-27 20:40             ` DRM-related kmalloc-32 memory leak in 2.6.35 David Rientjes
2010-08-24 17:44       ` [patch] slob: fix gfp flags for order-0 page allocations Pekka Enberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.00.1008221615350.29062@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=cl@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mpm@selenic.com \
    --cc=penberg@cs.helsinki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.