diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-07-16 02:38:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 12:05:36 -0400 |
commit | 84a01c2f8ea9bf210b961c6301e8e870a46505a6 (patch) | |
tree | cf61ff3302d5bfa339f1449bc3302eded09349fd | |
parent | 5dc4ac6324094cd52dc77ddf88296a94b90bbafc (diff) |
slob: sparsemem support
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>
-rw-r--r-- | init/Kconfig | 2 | ||||
-rw-r--r-- | mm/slob.c | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/init/Kconfig b/init/Kconfig index d9d878a3bb46..63d52a089a9e 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -576,7 +576,7 @@ config SLUB | |||
576 | and has enhanced diagnostics. | 576 | and has enhanced diagnostics. |
577 | 577 | ||
578 | config SLOB | 578 | config SLOB |
579 | depends on EMBEDDED && !SPARSEMEM | 579 | depends on EMBEDDED |
580 | bool "SLOB (Simple Allocator)" | 580 | bool "SLOB (Simple Allocator)" |
581 | help | 581 | help |
582 | SLOB replaces the SLAB allocator with a drastically simpler | 582 | SLOB replaces the SLAB allocator with a drastically simpler |
@@ -634,6 +634,14 @@ int kmem_ptr_validate(struct kmem_cache *a, const void *b) | |||
634 | return 0; | 634 | return 0; |
635 | } | 635 | } |
636 | 636 | ||
637 | static unsigned int slob_ready __read_mostly; | ||
638 | |||
639 | int slab_is_available(void) | ||
640 | { | ||
641 | return slob_ready; | ||
642 | } | ||
643 | |||
637 | void __init kmem_cache_init(void) | 644 | void __init kmem_cache_init(void) |
638 | { | 645 | { |
646 | slob_ready = 1; | ||
639 | } | 647 | } |