From: Andrew Morton <akpm@linux-foundation.org>
To: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: menage@google.com, dev@sw.ru, xemul@sw.ru, vatsa@in.ibm.com,
ebiederm@xmission.com, haveblue@us.ibm.com,
svaidy@linux.vnet.ibm.com, balbir@in.ibm.com, pj@sgi.com,
cpw@sgi.com, ckrm-tech@lists.sourceforge.net,
linux-kernel@vger.kernel.org, containers@lists.osdl.org,
mbligh@google.com, rohitseth@google.com, devel@openvz.org
Subject: Re: [PATCH 1/2][RFC] containers: improve automatic container naming
Date: Fri, 1 Jun 2007 15:23:34 -0700 [thread overview]
Message-ID: <20070601152334.b1452ed5.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070601214809.GA20897@sergelap.austin.ibm.com>
On Fri, 1 Jun 2007 16:48:09 -0500
"Serge E. Hallyn" <serue@us.ibm.com> wrote:
> This compiles and boots, but is not intended for inclusion in -mm (yet),
> just as an RFC for the naming scheme to fix the bug Andrew pointed out.
>
> Seem ok overall?
>
> thanks,
> -serge
>
> >From 8e9b972f7482415777e982d3bc9a0d55cbaf862b Mon Sep 17 00:00:00 2001
> From: Serge E. Hallyn <serue@us.ibm.com>
> Date: Fri, 1 Jun 2007 15:32:15 -0400
> Subject: [PATCH 1/2] containers: improve automatic container naming
>
> The automatic naming of containers created using container_clone()
> is currently broken (not protected from wraparound) and inconvenient.
>
> Add a per-container counter for use in naming children of the container.
> Before two unshares in a row by one process, and a third in another,
> would result in
>
> /node1/node2
> /node3
>
> The current scheme should result in
>
> /node1/node1
> /node2
>
> Also, keep a hash table populated with used names, to protect
> against counter wrap-around.
>
> ...
>
> include/linux/container.h | 8 +++
> kernel/container.c | 116 +++++++++++++++++++++++++++++++++++++++++++--
gad, what's all this stuff?
I think an IDR tree would get you what you're after in much less code.
Although it means that container IDs would get recycled quickly across a
remove+add.
Be aware that there are IDR enhancements in Greg's driver tree (and hence
in -mm) which are relevant to this application.
> + if (cont->auto_cnt_set) {
Can we please stop using "cnt" and "cont" to refer to containers? Let's
use "container", OK?
next prev parent reply other threads:[~2007-06-01 22:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-01 21:48 Serge E. Hallyn
2007-06-01 21:49 ` [PATCH 2/2][RFC] containers interface to nsproxy subsystem Serge E. Hallyn
2007-06-01 22:23 ` Andrew Morton [this message]
2007-06-01 22:38 ` [PATCH 1/2][RFC] containers: improve automatic container naming 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=20070601152334.b1452ed5.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=balbir@in.ibm.com \
--cc=ckrm-tech@lists.sourceforge.net \
--cc=containers@lists.osdl.org \
--cc=cpw@sgi.com \
--cc=dev@sw.ru \
--cc=devel@openvz.org \
--cc=ebiederm@xmission.com \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@google.com \
--cc=menage@google.com \
--cc=pj@sgi.com \
--cc=rohitseth@google.com \
--cc=serue@us.ibm.com \
--cc=svaidy@linux.vnet.ibm.com \
--cc=vatsa@in.ibm.com \
--cc=xemul@sw.ru \
/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
all inboxes | Powered by JetHome®