From: Pavel Emelyanov <xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
To: Andrew Morton <akpm-3NddpPZAyC0@public.gmane.org>
Cc: Linux Containers
<containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>,
Linux Kernel Mailing List
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH] Use KMEM_CACHE macro to create the nsproxy cache
Date: Wed, 26 Sep 2007 17:22:23 +0400 [thread overview]
Message-ID: <46FA5D0F.2090604@openvz.org> (raw)
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;
}
WARNING: multiple messages have this Message-ID (diff)
From: Pavel Emelyanov <xemul@openvz.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Serge Hallyn <serue@us.ibm.com>,
Linux Containers <containers@lists.osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Use KMEM_CACHE macro to create the nsproxy cache
Date: Wed, 26 Sep 2007 17:22:23 +0400 [thread overview]
Message-ID: <46FA5D0F.2090604@openvz.org> (raw)
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;
}
next reply other threads:[~2007-09-26 13:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-26 13:22 Pavel Emelyanov [this message]
2007-09-26 13:22 ` [PATCH] Use KMEM_CACHE macro to create the nsproxy cache 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46FA5D0F.2090604@openvz.org \
--to=xemul-gefaqzzx7r8dnm+yrofe0a@public.gmane.org \
--cc=akpm-3NddpPZAyC0@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.