linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Pekka Enberg" <penberg@cs.helsinki.fi>
To: Christoph Lameter <clameter@sgi.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	akpm@osdl.org, mpm@selenic.com,
	Manfred Spraul <manfred@colorfullife.com>
Subject: Re: [RFC] Cleanup slab headers / API to allow easy addition of new slab allocators
Date: Sat, 9 Dec 2006 16:02:53 +0200	[thread overview]
Message-ID: <84144f020612090602w5c7f3f9ay8e771763ea8843cf@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0612081106320.16873@schroedinger.engr.sgi.com>

Hi Christoph,

On 12/8/06, Christoph Lameter <clameter@sgi.com> wrote:
> +#define        SLAB_POISON             0x00000800UL    /* DEBUG: Poison objects */
> +#define        SLAB_HWCACHE_ALIGN      0x00002000UL    /* Align objs on cache lines */
> +#define SLAB_CACHE_DMA         0x00004000UL    /* Use GFP_DMA memory */
> +#define SLAB_MUST_HWCACHE_ALIGN        0x00008000UL    /* Force alignment even if debuggin is active */

Please fix formatting while you're at it.

> +#ifdef CONFIG_SLAB
> +#include <linux/slab_def.h>
> +#else
> +
> +/*
> + * Fallback definitions for an allocator not wanting to provide
> + * its own optimized kmalloc definitions (like SLOB).
> + */
> +
> +#if defined(CONFIG_NUMA) || defined(CONFIG_DEBUG_SLAB)
> +#error "SLAB fallback definitions not usable for NUMA or Slab debug"

Do we need this? Shouldn't we just make sure no one can enable
CONFIG_NUMA and CONFIG_DEBUG_SLAB for non-compatible allocators?

> -static inline void *kmalloc(size_t size, gfp_t flags)
> +void *kmalloc(size_t size, gfp_t flags)

static inline?

> +void *kzalloc(size_t size, gfp_t flags)
> +{
> +       return __kzalloc(size, flags);
> +}

same here.

--
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:[~2006-12-09 14:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-08 19:11 Christoph Lameter
2006-12-09 14:02 ` Pekka Enberg [this message]
2006-12-09 19:01   ` 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=84144f020612090602w5c7f3f9ay8e771763ea8843cf@mail.gmail.com \
    --to=penberg@cs.helsinki.fi \
    --cc=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=manfred@colorfullife.com \
    --cc=mpm@selenic.com \
    --cc=nickpiggin@yahoo.com.au \
    /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