All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use KMEM_CACHE macro to create the nsproxy cache
@ 2007-09-26 13:22 ` Pavel Emelyanov
  0 siblings, 0 replies; 5+ messages in thread
From: Pavel Emelyanov @ 2007-09-26 13:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Containers, Linux Kernel Mailing List

The blessed way for standard caches is to use it.
Besides, this may give this cache a better alignment.

Signed-off-by: Pavel Emelyanov <xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>

---

diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index ee68964..31351cc 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -222,8 +222,7 @@ void exit_task_namespaces(struct task_st
 
 static int __init nsproxy_cache_init(void)
 {
-	nsproxy_cachep = kmem_cache_create("nsproxy", sizeof(struct nsproxy),
-					   0, SLAB_PANIC, NULL);
+	nsproxy_cachep = KMEM_CACHE(nsproxy, SLAB_PANIC);
 	return 0;
 }

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

* [PATCH] Use KMEM_CACHE macro to create the nsproxy cache
@ 2007-09-26 13:22 ` Pavel Emelyanov
  0 siblings, 0 replies; 5+ messages in thread
From: Pavel Emelyanov @ 2007-09-26 13:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Serge Hallyn, Linux Containers, Linux Kernel Mailing List

The blessed way for standard caches is to use it.
Besides, this may give this cache a better alignment.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

---

diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index ee68964..31351cc 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -222,8 +222,7 @@ void exit_task_namespaces(struct task_st
 
 static int __init nsproxy_cache_init(void)
 {
-	nsproxy_cachep = kmem_cache_create("nsproxy", sizeof(struct nsproxy),
-					   0, SLAB_PANIC, NULL);
+	nsproxy_cachep = KMEM_CACHE(nsproxy, SLAB_PANIC);
 	return 0;
 }
 

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

* Re: [PATCH] Use KMEM_CACHE macro to create the nsproxy cache
  2007-09-26 13:22 ` Pavel Emelyanov
  (?)
@ 2007-09-26 13:37 ` Cedric Le Goater
  -1 siblings, 0 replies; 5+ messages in thread
From: Cedric Le Goater @ 2007-09-26 13:37 UTC (permalink / raw)
  To: Pavel Emelyanov
  Cc: Andrew Morton, Linux Containers, Linux Kernel Mailing List

Pavel Emelyanov wrote:
> The blessed way for standard caches is to use it.
> Besides, this may give this cache a better alignment.
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

yes of course. thanks. 

Acked-by: Cedric Le Goater <clg@fr.ibm.com>

> ---
> 
> diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
> index ee68964..31351cc 100644
> --- a/kernel/nsproxy.c
> +++ b/kernel/nsproxy.c
> @@ -222,8 +222,7 @@ void exit_task_namespaces(struct task_st
> 
>  static int __init nsproxy_cache_init(void)
>  {
> -	nsproxy_cachep = kmem_cache_create("nsproxy", sizeof(struct nsproxy),
> -					   0, SLAB_PANIC, NULL);
> +	nsproxy_cachep = KMEM_CACHE(nsproxy, SLAB_PANIC);
>  	return 0;
>  }
> 
> _______________________________________________
> Containers mailing list
> Containers@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/containers
> 

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

* Re: [PATCH] Use KMEM_CACHE macro to create the nsproxy cache
  2007-09-26 13:22 ` Pavel Emelyanov
@ 2007-09-26 13:39     ` Serge E. Hallyn
  -1 siblings, 0 replies; 5+ messages in thread
From: Serge E. Hallyn @ 2007-09-26 13:39 UTC (permalink / raw)
  To: Pavel Emelyanov; +Cc: Linux Containers, Linux Kernel Mailing List

Quoting Pavel Emelyanov (xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org):
> The blessed way for standard caches is to use it.
> Besides, this may give this cache a better alignment.
> 
> Signed-off-by: Pavel Emelyanov <xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>

Acked-by: Serge Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

> ---
> 
> diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
> index ee68964..31351cc 100644
> --- a/kernel/nsproxy.c
> +++ b/kernel/nsproxy.c
> @@ -222,8 +222,7 @@ void exit_task_namespaces(struct task_st
> 
>  static int __init nsproxy_cache_init(void)
>  {
> -	nsproxy_cachep = kmem_cache_create("nsproxy", sizeof(struct nsproxy),
> -					   0, SLAB_PANIC, NULL);
> +	nsproxy_cachep = KMEM_CACHE(nsproxy, SLAB_PANIC);
>  	return 0;
>  }

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

* Re: [PATCH] Use KMEM_CACHE macro to create the nsproxy cache
@ 2007-09-26 13:39     ` Serge E. Hallyn
  0 siblings, 0 replies; 5+ messages in thread
From: Serge E. Hallyn @ 2007-09-26 13:39 UTC (permalink / raw)
  To: Pavel Emelyanov
  Cc: Andrew Morton, Serge Hallyn, Linux Containers,
	Linux Kernel Mailing List

Quoting Pavel Emelyanov (xemul@openvz.org):
> The blessed way for standard caches is to use it.
> Besides, this may give this cache a better alignment.
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

Acked-by: Serge Hallyn <serue@us.ibm.com>

> ---
> 
> diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
> index ee68964..31351cc 100644
> --- a/kernel/nsproxy.c
> +++ b/kernel/nsproxy.c
> @@ -222,8 +222,7 @@ void exit_task_namespaces(struct task_st
> 
>  static int __init nsproxy_cache_init(void)
>  {
> -	nsproxy_cachep = kmem_cache_create("nsproxy", sizeof(struct nsproxy),
> -					   0, SLAB_PANIC, NULL);
> +	nsproxy_cachep = KMEM_CACHE(nsproxy, SLAB_PANIC);
>  	return 0;
>  }

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

end of thread, other threads:[~2007-09-26 13:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-26 13:22 [PATCH] Use KMEM_CACHE macro to create the nsproxy cache Pavel Emelyanov
2007-09-26 13:22 ` Pavel Emelyanov
2007-09-26 13:37 ` Cedric Le Goater
     [not found] ` <46FA5D0F.2090604-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2007-09-26 13:39   ` Serge E. Hallyn
2007-09-26 13:39     ` Serge E. Hallyn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.