From: sukadev@us.ibm.com
To: Pavel Emelianov <xemul@openvz.org>
Cc: Andrew Morton <akpm@osdl.org>, Cedric Le Goater <clg@fr.ibm.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Containers <containers@lists.osdl.org>,
Kirill Korotaev <dev@openvz.org>
Subject: Re: [PATCH 3/3] Dynamic kmem cache allocator for pid namespaces
Date: Fri, 13 Jul 2007 18:22:25 -0700 [thread overview]
Message-ID: <20070714012225.GA29647@us.ibm.com> (raw)
In-Reply-To: <4693977A.5030501@openvz.org>
Pavel Emelianov [xemul@openvz.org] wrote:
| Add kmem_cache to pid_namespace to allocate pids from.
|
| Since booth implementations expand the struct pid to carry
| more numerical values each namespace should have separate
| cache to store pids of different sizes.
|
| Each kmem cache is names "pid_<NR>", where <NR> is the number
| of numerical ids on the pid. Different namespaces with same
| level of nesting will have same caches.
|
| This patch has two FIXMEs that are to be fixed after we reach
| the consensus about the struct pid itself.
|
| The first one is that the namespace to free the pid from in
| free_pid() must be taken from pid. Now the init_pid_ns is
| used.
|
| The second FIXME is about the cache allocation. When we do know
| how long the object will be then we'll have to calculate this
| size in create_pid_cachep. Right now the sizeof(struct pid)
| value is used.
|
| Signed-off-by: Pavel Emelianov <xemul@openvz.org>
| Acked-by: Cedric Le Goater <clg@fr.ibm.com>
| Acked-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
|
| ---
|
| diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h
| index ddb9a4c..27cfad3 100644
| --- a/include/linux/pid_namespace.h
| +++ b/include/linux/pid_namespace.h
| @@ -20,6 +20,7 @@ struct pid_namespace {
| struct pidmap pidmap[PIDMAP_ENTRIES];
| int last_pid;
| struct task_struct *child_reaper;
| + struct kmem_cache_t *pid_cachep;
Shouldn't this be 'struct kmem_cache *' ?
next prev parent reply other threads:[~2007-07-14 1:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 14:19 [PATCH 0/3] Parts of pid namespaces approved by all the Pavel Emelianov
2007-07-10 14:21 ` [PATCH 1/3] Round up the API Pavel Emelianov
2007-07-10 14:23 ` [PATCH 2/3] Make get_pid_ns() return the namespace itself Pavel Emelianov
2007-07-10 14:28 ` [PATCH 3/3] Dynamic kmem cache allocator for pid namespaces Pavel Emelianov
2007-07-12 22:47 ` Andrew Morton
2007-07-14 1:22 ` sukadev [this message]
2007-07-10 14:30 ` [PATCH 0/3] Parts of pid namespaces approved by all the Pavel Emelianov
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=20070714012225.GA29647@us.ibm.com \
--to=sukadev@us.ibm.com \
--cc=akpm@osdl.org \
--cc=clg@fr.ibm.com \
--cc=containers@lists.osdl.org \
--cc=dev@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xemul@openvz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome