linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: akpm@osdl.org, linux-mm@kvack.org, mpm@selenic.com,
	Manfred Spraul <manfred@colorfullife.com>
Subject: Re: Re: [RFC] Extract kmalloc.h and slob.h from slab.h
Date: Tue, 28 Nov 2006 16:30:31 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0611281629250.11531@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <84144f020611281132p5f3f042dq36728c78521efb57@mail.gmail.com>

Patch on top of the other to remove the #ifdefs. Also add some annotation
on the other ifdefs.

Signed-off-by: Christoph Lameter <clameter@sgi.com>

Index: linux-2.6.19-rc6-mm1/include/linux/kmalloc.h
===================================================================
--- linux-2.6.19-rc6-mm1.orig/include/linux/kmalloc.h	2006-11-28 15:28:50.000000000 -0800
+++ linux-2.6.19-rc6-mm1/include/linux/kmalloc.h	2006-11-28 15:31:26.000000000 -0800
@@ -5,8 +5,6 @@
 #include <asm/page.h>		/* kmalloc_sizes.h needs PAGE_SIZE */
 #include <asm/cache.h>		/* kmalloc_sizes.h needs L1_CACHE_BYTES */
 
-#ifdef __KERNEL__
-
 /* Size description struct for general caches. */
 struct cache_sizes {
 	size_t		 cs_size;
@@ -201,8 +199,8 @@
 #define kmalloc_node_track_caller(size, flags, node) \
 	__kmalloc_node_track_caller(size, flags, node, \
 				__builtin_return_address(0))
-#endif
-#else
+#endif /* CONFIG_DEBUG_SLAB */
+#else /* CONFIG_NUMA */
 static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
 {
 	return kmalloc(size, flags);
@@ -210,12 +208,10 @@
 
 #define kmalloc_node_track_caller(size, flags, node) \
 	kmalloc_track_caller(size, flags)
-#endif
+#endif /* CONFIG_NUMA */
 
 extern void __init kmem_cache_init(void);
 extern int slab_is_available(void);
 extern int kmem_cache_reap(int);
 
-#endif	/* __KERNEL__ */
-
 #endif	/* _LINUX_KMALLOC_H */
Index: linux-2.6.19-rc6-mm1/include/linux/slob.h
===================================================================
--- linux-2.6.19-rc6-mm1.orig/include/linux/slob.h	2006-11-28 15:28:50.000000000 -0800
+++ linux-2.6.19-rc6-mm1/include/linux/slob.h	2006-11-28 15:31:26.000000000 -0800
@@ -1,8 +1,6 @@
 #ifndef _LINUX_SLOB_H
 #define	_LINUX_SLOB_H
 
-#if	defined(__KERNEL__)
-
 #include <linux/slab.h>
 
 /* SLOB allocator routines */
@@ -42,6 +40,4 @@
 static inline void kmem_set_shrinker(kmem_cache_t *cachep,
 				struct shrinker *shrinker) {}
 
-#endif	/* __KERNEL__ */
-
 #endif	/* _LINUX_SLOB_H */

--
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>

  parent reply	other threads:[~2006-11-29  0:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-28  6:33 Christoph Lameter
2006-11-28  8:00 ` Pekka Enberg
2006-11-28 18:05   ` Christoph Lameter
2006-11-28 19:07     ` Pekka J Enberg
2006-11-28 19:11       ` Christoph Lameter
2006-11-28 19:19         ` Pekka J Enberg
2006-11-28 19:24           ` Pekka Enberg
2006-11-28 19:27             ` Christoph Lameter
2006-11-28 19:25           ` Christoph Lameter
2006-11-28 19:32             ` Pekka Enberg
2006-11-28 19:53               ` Christoph Lameter
2006-11-29  0:30               ` Christoph Lameter [this message]
2006-11-29  7:08                 ` Pekka Enberg
2006-11-29 19:18                   ` Christoph Lameter
2006-11-29  8:26 ` Christoph Hellwig
2006-11-29  8:38   ` Nick Piggin
2006-11-29 19:24     ` Christoph Lameter
2006-11-30  1:58       ` Nick Piggin
2006-11-30  2:43         ` Christoph Lameter
2006-11-30  3:04           ` Nick Piggin
2006-11-30  3:39             ` Christoph Lameter
2006-11-30  3:44               ` Nick Piggin
2006-11-30  3:50                 ` Christoph Lameter
2006-11-30  4:18                   ` Nick Piggin
2006-11-30  4:28                     ` Christoph Lameter
2006-11-30  5:01                       ` Nick Piggin
2006-11-30  7:12         ` 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=Pine.LNX.4.64.0611281629250.11531@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@osdl.org \
    --cc=linux-mm@kvack.org \
    --cc=manfred@colorfullife.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox