Skip to contentSkip to conversation

slob: sparsemem support.

PATCH In review Paul Mundt 4 participants 4 messages Jul 13, 2007 – Jul 17, 2007 Memory management

lore
Share & tools
lore

Paul Mundt

author
#0 lore raw

PATCH 1/1 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.

--

 init/Kconfig |    2 +-
 mm/slob.c    |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
init/Kconfig +1 -1
diff -urN linux-2.6.22-rc6-mm1.orig/init/Kconfig linux-2.6.22-rc6-mm1/init/Kconfig
@@ -625,7 +625,7 @@
 	   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
mm/slob.c +8 -0
diff -urN linux-2.6.22-rc6-mm1.orig/mm/slob.c linux-2.6.22-rc6-mm1/mm/slob.c
@@ -606,6 +606,14 @@
 	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;
 }

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Paul Mundt

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.

Looks good to me.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

Acked-by on v1 1/1
#2 lore raw
In reply to Paul Mundt
Quoted 34 lines · Paul Mundt

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.

--

 init/Kconfig |    2 +-
 mm/slob.c    |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff -urN linux-2.6.22-rc6-mm1.orig/init/Kconfig linux-2.6.22-rc6-mm1/init/Kconfig

init/Kconfig +1 -1
@@ -625,7 +625,7 @@
 	   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

diff -urN linux-2.6.22-rc6-mm1.orig/mm/slob.c linux-2.6.22-rc6-mm1/mm/slob.c

mm/slob.c +1 -0
@@ -606,6 +606,14 @@
 	return 0;
 }
 
+static unsigned int slob_ready __read_mostly;

mm/slob.c line 619

Quoted 10 lines
mm/slob.c +7 -0
+
+int slab_is_available(void)
+{
+	return slob_ready;
+}
+
 void __init kmem_cache_init(void)
 {
+	slob_ready = 1;
 }

Looks fine. Thanks, Paul.

Signature · 7 lines
Mathematics is the supreme nostalgia of our time.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Acked-by on v1 1/1
#3 lore raw
In reply to Paul Mundt

Looks good to me too.
Thanks.

Quoted 44 lines

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.

--

 init/Kconfig |    2 +-
 mm/slob.c    |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff -urN linux-2.6.22-rc6-mm1.orig/init/Kconfig linux-2.6.22-rc6-mm1/init/Kconfig

init/Kconfig +1 -1
@@ -625,7 +625,7 @@
 	   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

diff -urN linux-2.6.22-rc6-mm1.orig/mm/slob.c linux-2.6.22-rc6-mm1/mm/slob.c

mm/slob.c +8 -0
@@ -606,6 +606,14 @@
 	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;
 }
Signature · 8 lines
Yasunori Goto 


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>