From: David Rientjes <rientjes@google.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Christoph Lameter <cl@linux.com>, linux-mm@kvack.org
Subject: [patch 4/4] slub: remove gfp_flags argument from create_kmalloc_cache
Date: Tue, 8 Jun 2010 23:49:14 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.00.1006082348450.30606@chino.kir.corp.google.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1006082347440.30606@chino.kir.corp.google.com>
create_kmalloc_cache() is always passed a gfp_t of GFP_NOWAIT, so it may
be hardwired into the function itself instead of passed.
Cc: Christoph Lameter <cl@linux.com>
Signed-off-by: David Rientjes <rientjes@google.com>
---
mm/slub.c | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2572,7 +2572,7 @@ static int __init setup_slub_nomerge(char *str)
__setup("slub_nomerge", setup_slub_nomerge);
static struct kmem_cache *create_kmalloc_cache(struct kmem_cache *s,
- const char *name, int size, gfp_t gfp_flags)
+ const char *name, int size)
{
unsigned int flags = 0;
@@ -2582,14 +2582,11 @@ static struct kmem_cache *create_kmalloc_cache(struct kmem_cache *s,
return s;
}
- if (gfp_flags & SLUB_DMA)
- flags = SLAB_CACHE_DMA;
-
/*
* This function is called with IRQs disabled during early-boot on
* single CPU so there's no need to take slub_lock here.
*/
- if (!kmem_cache_open(s, gfp_flags, name, size, ARCH_KMALLOC_MINALIGN,
+ if (!kmem_cache_open(s, GFP_NOWAIT, name, size, ARCH_KMALLOC_MINALIGN,
flags, NULL))
goto panic;
@@ -3077,7 +3074,7 @@ void __init kmem_cache_init(void)
*/
i = kmalloc_index(sizeof(struct kmem_cache_node));
create_kmalloc_cache(&kmalloc_caches[i], "bootstrap",
- sizeof(struct kmem_cache_node), GFP_NOWAIT);
+ sizeof(struct kmem_cache_node));
kmalloc_caches[i].refcount = -1;
caches++;
@@ -3089,19 +3086,16 @@ void __init kmem_cache_init(void)
/* Caches that are not of the two-to-the-power-of size */
if (KMALLOC_MIN_SIZE <= 32) {
- create_kmalloc_cache(&kmalloc_caches[1],
- "kmalloc-96", 96, GFP_NOWAIT);
+ create_kmalloc_cache(&kmalloc_caches[1], "kmalloc-96", 96);
caches++;
}
if (KMALLOC_MIN_SIZE <= 64) {
- create_kmalloc_cache(&kmalloc_caches[2],
- "kmalloc-192", 192, GFP_NOWAIT);
+ create_kmalloc_cache(&kmalloc_caches[2], "kmalloc-192", 192);
caches++;
}
for (i = KMALLOC_SHIFT_LOW; i < SLUB_PAGE_SHIFT; i++) {
- create_kmalloc_cache(&kmalloc_caches[i],
- "kmalloc", 1 << i, GFP_NOWAIT);
+ create_kmalloc_cache(&kmalloc_caches[i], "kmalloc", 1 << i);
caches++;
}
--
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>
next prev parent reply other threads:[~2010-06-09 6:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-09 6:49 [patch 1/4] slub: replace SLAB_NODE_UNSPECIFIED with NUMA_NO_NODE David Rientjes
2010-06-09 6:49 ` [patch 2/4] slub: rename debug_on to cache_debug_on David Rientjes
2010-06-09 16:20 ` Christoph Lameter
2010-06-09 6:49 ` [patch 3/4] slub: use is_kmalloc_cache in dma_kmalloc_cache David Rientjes
2010-06-09 16:24 ` Christoph Lameter
2010-06-09 19:47 ` David Rientjes
2010-06-09 6:49 ` David Rientjes [this message]
2010-06-09 16:24 ` [patch 4/4] slub: remove gfp_flags argument from create_kmalloc_cache Christoph Lameter
2010-06-09 16:44 ` Pekka Enberg
2010-06-15 17:33 ` Christoph Lameter
2010-06-15 21:39 ` David Rientjes
2010-06-16 15:26 ` Christoph Lameter
2010-06-09 16:18 ` [patch 1/4] slub: replace SLAB_NODE_UNSPECIFIED with NUMA_NO_NODE Christoph Lameter
2010-06-09 16:44 ` 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.1006082348450.30606@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=cl@linux.com \
--cc=linux-mm@kvack.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox