From: David Miller <davem@davemloft.net>
From: Christoph Lameter <clameter@sgi.com>
To: clameter@sgi.com
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: SLUB: The unqueued Slab allocator
Date: Thu, 22 Feb 2007 00:58:24 -0800 (PST) [thread overview]
Date: Wed, 21 Feb 2007 23:00:30 -0800 (PST) [thread overview]
Message-ID: <20070222.005824.34601725.davem@davemloft.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0702212250271.30485@schroedinger.engr.sgi.com>
> +#ifdef CONFIG_ZONE_DMA
> +static struct kmem_cache *kmalloc_caches_dma[KMALLOC_NR_CACHES];
> +#endif
Therefore.
> +static struct kmem_cache *get_slab(size_t size, gfp_t flags)
> +{
...
> + s = kmalloc_caches_dma[index];
> + if (s)
> + return s;
> +
> + /* Dynamically create dma cache */
> + x = kmalloc(sizeof(struct kmem_cache), flags & ~(__GFP_DMA));
> +
> + if (!x)
> + panic("Unable to allocate memory for dma cache\n");
> +
> +#ifdef KMALLOC_EXTRA
> + if (index <= KMALLOC_SHIFT_HIGH - KMALLOC_SHIFT_LOW)
> +#endif
> + realsize = 1 << index;
> +#ifdef KMALLOC_EXTRA
> + else if (index == KMALLOC_EXTRAS)
> + realsize = 96;
> + else
> + realsize = 192;
> +#endif
> +
> + s = create_kmalloc_cache(x, "kmalloc_dma", realsize);
> + kmalloc_caches_dma[index] = s;
> + return s;
> +}
All of that logic needs to be protected by CONFIG_ZONE_DMA too.
I noticed this due to a build failure on sparc64 with this patch.
--
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:[~2007-02-22 8:58 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-22 7:00 Christoph Lameter
2007-02-22 8:34 ` Peter Zijlstra
2007-02-22 15:25 ` Christoph Lameter
2007-02-22 8:58 ` David Miller, Christoph Lameter [this message]
2007-02-22 15:26 ` Christoph Lameter
2007-02-22 10:49 ` Pekka Enberg
2007-02-22 15:15 ` Christoph Lameter
2007-02-22 17:54 ` Andi Kleen
2007-02-22 18:42 ` Christoph Lameter
2007-02-23 0:16 ` Andi Kleen
2007-02-23 4:55 ` Christoph Lameter
2007-02-24 5:28 ` KAMEZAWA Hiroyuki
2007-02-24 5:47 ` Christoph Lameter
2007-02-24 5:54 ` David Miller, Christoph Lameter
2007-02-24 17:32 ` Christoph Lameter
2007-02-24 19:33 ` Jörn Engel
2007-02-25 0:14 ` Christoph Lameter
2007-02-25 12:23 ` Jörn Engel
2007-02-25 0:53 ` David Miller, Christoph Lameter
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=20070222.005824.34601725.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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