]> err.no Git - linux-2.6/commitdiff
slob: sparsemem support
authorPaul Mundt <lethal@linux-sh.org>
Mon, 16 Jul 2007 06:38:24 +0000 (23:38 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 16 Jul 2007 16:05:36 +0000 (09:05 -0700)
Currently slob is disabled if we're using sparsemem, due to an earlier
patch from Goto-san.  Slob and static sparsemem work without any trouble as
it is, and the only hiccup is a missing slab_is_available() in the case of
sparsemem extreme.  With this, we're rid of the last set of restrictions
for slob usage.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Matt Mackall <mpm@selenic.com>
Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
init/Kconfig
mm/slob.c

index d9d878a3bb46835e1f2c4301620975e05757ee1d..63d52a089a9e72a50b33c1b1bbf52c1e19b1769f 100644 (file)
@@ -576,7 +576,7 @@ config SLUB
           and has enhanced diagnostics.
 
 config SLOB
-       depends on EMBEDDED && !SPARSEMEM
+       depends on EMBEDDED
        bool "SLOB (Simple Allocator)"
        help
           SLOB replaces the SLAB allocator with a drastically simpler
index b99b0ef2347e31e386eb69b7dc969eabee539296..b4899079d8b00e32660f8c36437c3b558bef4823 100644 (file)
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -634,6 +634,14 @@ int kmem_ptr_validate(struct kmem_cache *a, const void *b)
        return 0;
 }
 
+static unsigned int slob_ready __read_mostly;
+
+int slab_is_available(void)
+{
+       return slob_ready;
+}
+
 void __init kmem_cache_init(void)
 {
+       slob_ready = 1;
 }