linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] slob: sparsemem support.
@ 2007-07-13  9:35 Paul Mundt
  2007-07-13  9:54 ` Pekka Enberg
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paul Mundt @ 2007-07-13  9:35 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Yasunori Goto, Matt Mackall, linux-mm

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>

--

 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
--- linux-2.6.22-rc6-mm1.orig/init/Kconfig	2007-07-06 07:47:49.000000000 +0900
+++ linux-2.6.22-rc6-mm1/init/Kconfig	2007-07-06 09:50:29.000000000 +0900
@@ -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
--- linux-2.6.22-rc6-mm1.orig/mm/slob.c	2007-07-06 07:47:50.000000000 +0900
+++ linux-2.6.22-rc6-mm1/mm/slob.c	2007-07-06 09:56:16.000000000 +0900
@@ -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 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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] slob: sparsemem support.
  2007-07-13  9:35 [PATCH] slob: sparsemem support Paul Mundt
@ 2007-07-13  9:54 ` Pekka Enberg
  2007-07-13 16:54 ` Matt Mackall
  2007-07-17  6:09 ` Yasunori Goto
  2 siblings, 0 replies; 4+ messages in thread
From: Pekka Enberg @ 2007-07-13  9:54 UTC (permalink / raw)
  To: Paul Mundt, Andrew Morton, Yasunori Goto, Matt Mackall, linux-mm

On 7/13/07, Paul Mundt <lethal@linux-sh.org> wrote:
> 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.

Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] slob: sparsemem support.
  2007-07-13  9:35 [PATCH] slob: sparsemem support Paul Mundt
  2007-07-13  9:54 ` Pekka Enberg
@ 2007-07-13 16:54 ` Matt Mackall
  2007-07-17  6:09 ` Yasunori Goto
  2 siblings, 0 replies; 4+ messages in thread
From: Matt Mackall @ 2007-07-13 16:54 UTC (permalink / raw)
  To: Paul Mundt, Andrew Morton, Yasunori Goto, linux-mm

On Fri, Jul 13, 2007 at 06:35:57PM +0900, Paul Mundt wrote:
> 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>
> 
> --
> 
>  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
> --- linux-2.6.22-rc6-mm1.orig/init/Kconfig	2007-07-06 07:47:49.000000000 +0900
> +++ linux-2.6.22-rc6-mm1/init/Kconfig	2007-07-06 09:50:29.000000000 +0900
> @@ -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
> --- linux-2.6.22-rc6-mm1.orig/mm/slob.c	2007-07-06 07:47:50.000000000 +0900
> +++ linux-2.6.22-rc6-mm1/mm/slob.c	2007-07-06 09:56:16.000000000 +0900
> @@ -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;
>  }

Looks fine. Thanks, Paul.

Acked-by: Matt Mackall <mpm@selenic.com>

-- 
Mathematics is the supreme nostalgia of our time.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] slob: sparsemem support.
  2007-07-13  9:35 [PATCH] slob: sparsemem support Paul Mundt
  2007-07-13  9:54 ` Pekka Enberg
  2007-07-13 16:54 ` Matt Mackall
@ 2007-07-17  6:09 ` Yasunori Goto
  2 siblings, 0 replies; 4+ messages in thread
From: Yasunori Goto @ 2007-07-17  6:09 UTC (permalink / raw)
  To: Paul Mundt, Andrew Morton, Matt Mackall, linux-mm

Looks good to me too. 
Thanks.

Acked-by: Yasunori Goto <y-goto@jp.fujitsu.com>


> 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>
> 
> --
> 
>  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
> --- linux-2.6.22-rc6-mm1.orig/init/Kconfig	2007-07-06 07:47:49.000000000 +0900
> +++ linux-2.6.22-rc6-mm1/init/Kconfig	2007-07-06 09:50:29.000000000 +0900
> @@ -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
> --- linux-2.6.22-rc6-mm1.orig/mm/slob.c	2007-07-06 07:47:50.000000000 +0900
> +++ linux-2.6.22-rc6-mm1/mm/slob.c	2007-07-06 09:56:16.000000000 +0900
> @@ -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;
>  }

-- 
Yasunori Goto 


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-17  6:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-13  9:35 [PATCH] slob: sparsemem support Paul Mundt
2007-07-13  9:54 ` Pekka Enberg
2007-07-13 16:54 ` Matt Mackall
2007-07-17  6:09 ` Yasunori Goto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox