提交 84a01c2f 编写于 作者: P Paul Mundt 提交者: Linus Torvalds

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: NPaul Mundt <lethal@linux-sh.org>
Acked-by: NPekka Enberg <penberg@cs.helsinki.fi>
Acked-by: NMatt Mackall <mpm@selenic.com>
Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 5dc4ac63
...@@ -576,7 +576,7 @@ config SLUB ...@@ -576,7 +576,7 @@ config SLUB
and has enhanced diagnostics. and has enhanced diagnostics.
config SLOB config SLOB
depends on EMBEDDED && !SPARSEMEM depends on EMBEDDED
bool "SLOB (Simple Allocator)" bool "SLOB (Simple Allocator)"
help help
SLOB replaces the SLAB allocator with a drastically simpler 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,6 +634,14 @@ int kmem_ptr_validate(struct kmem_cache *a, const void *b)
return 0; return 0;
} }
static unsigned int slob_ready __read_mostly;
int slab_is_available(void)
{
return slob_ready;
}
void __init kmem_cache_init(void) void __init kmem_cache_init(void)
{ {
slob_ready = 1;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册