All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul Menage" <menage@google.com>
To: vatsa@in.ibm.com
Cc: sekharan@us.ibm.com, ckrm-tech@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, xemul@sw.ru,
	containers@lists.osdl.org, pj@sgi.com,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	mbligh@google.com, winget@google.com, rohitseth@google.com,
	"Serge E. Hallyn" <serue@us.ibm.com>,
	dev@sw.ru, devel@openvz.org
Subject: Re: [ckrm-tech] [PATCH 7/7] containers (V7): Container interface to nsproxy subsystem
Date: Wed, 4 Apr 2007 00:00:07 -0700	[thread overview]
Message-ID: <6599ad830704040000of7f1197ica543e14d290509e@mail.gmail.com> (raw)
In-Reply-To: <20070404051526.GA16562@in.ibm.com>

On 4/3/07, Srivatsa Vaddagiri <vatsa@in.ibm.com> wrote:
> On Tue, Apr 03, 2007 at 09:04:59PM -0700, Paul Menage wrote:
> > Have you posted the cpuset implementation over your system yet?
>
> Yep, here:
>
> http://lists.linux-foundation.org/pipermail/containers/2007-March/001497.html
>
> For some reason, the above mail didnt make it into lkml (maybe it
> exceeded the max size allowed). I also have a updated version of that
> which I hope to post as soon as I am done with something else I am
> working on (sigh ..)

OK, looking at that, I see a few problems related to the use of
nsproxy and lack of a container object:

- your find_nsproxy() function can return an nsproxy object that's
correct in its set of resource controllers but not in its other
nsproxy pointers.

- rcfs_rmdir() checks the count on the dentry's nsproxy pointer. But
it doesn't check for any of the other nsproxy objects that tasks in
the same grouping in this hierarchy might have.

- rcfs_rmdir() sets ns->count to 0. But it doesn't stop anyone else
from picking up a reference to that nsproxy from the list. Which could
happen if someone else has opened the container's tasks file and is
trying to write into it (but is blocked on manage_mutex). You can
possibly get around this by completely freeing the namespace and
setting dentry->fsdata to NULL before you release manage_mutex (and
treat a NULL fsdata as a dead container).

- how do you handle additional reference counts on subsystems? E.g.
beancounters wants to be able to associate each file with the
container that owns it. You need to be able to lock out subsystems
from taking new reference counts on an unreferenced container that
you're deleting, without making the refcount operation too
heavyweight.

- I think there's value in being able to mount a containerfs with no
attached subsystems, simply for secure task grouping (e.g. job
tracking). My latest patch set didn't support that, but it's a trivial
small change to allow it. How would you do that with no container-like
object?

You could have a null subsystem that does nothing other than let you
attach processes to it, but then you'd be limited to one such
grouping. (Since a given subsystem can only be instantiated in one
hierarchy).

>
> > The drawback to that is that every subsystem has to add a dentry to
> > its state, and handle the processing.
>
> Again this depends on whether every subsystem need to be able to support
> the user-space query you pointed out.

Well, if more than one wants to support it, it means duplicating code
that could equally easily be generically provided.

>
> > >Do you see similar queries coming in for every resource controller object
> > >(show me the path of cpu_acct, cpu_ctl, rss_ctl ... objects to which this
> > >task belongs)? IMO that will not be the case, in which case we can avoid
> > >adding N pointers (N = max hierarchies) in nsproxy just to support queries
> > >of
> > >those sort.
> >
> > OK, I see your argument that putting it in the aggregator probably
> > isn't the best thing to do from a space point of view in the case when
> > the number of aggregators
>
> Sorry that sentence seems to be garbled by some mail router :)

Nope, it got garbled because I didn't proof-read my email sufficiently ...

>
> Did you mean to say "when the number of aggregators sharing the same
> container object are more" ?

Yes. Although having thought about the possibility of null groupings
that I described above, I'm no longer convinced that argument is
valid. It would depend a lot on how people used containers in practice
- whether the number of aggregators was very small (when all
subsystems are in one hierarchy, or in different hierarchies with
isomorphic groupings) or very large (when all subsystems are in
different hierarchies, with orthogonal groupings).

>
> I agree ..Putting N pointers in container_group object just to support
> queries isn't justified at this point, because we don't know whether all
> subsystems need to support such queries.

It's not just to support such queries - that's just one example. There
are definitely other uses to having the container pointer directly in
the aggregator, including those that I mentioned above.

Paul

  reply	other threads:[~2007-04-04  7:00 UTC|newest]

Thread overview: 132+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-12  8:15 [PATCH 0/7] containers (V7): Generic Process Containers menage
2007-02-12  8:15 ` [PATCH 1/7] containers (V7): Generic container system abstracted from cpusets code menage
2007-02-12 12:33   ` Srivatsa Vaddagiri
2007-02-12 19:26     ` Paul Menage
2007-02-12 19:46       ` Paul Menage
2007-02-13  5:48         ` Srivatsa Vaddagiri
2007-02-13  8:16           ` [ckrm-tech] " Srivatsa Vaddagiri
2007-03-07 12:21   ` Srivatsa Vaddagiri
2007-03-07 14:06     ` [ckrm-tech] " Srivatsa Vaddagiri
2007-03-07 20:50     ` Paul Menage
2007-03-08 10:38       ` [ckrm-tech] " Srivatsa Vaddagiri
2007-03-08 10:40         ` Paul Menage
2007-03-11 19:38         ` Paul Jackson
2007-03-12 14:19           ` Srivatsa Vaddagiri
2007-03-22  9:56   ` Srivatsa Vaddagiri
2007-03-22 10:20     ` Srivatsa Vaddagiri
2007-03-24 15:05   ` Srivatsa Vaddagiri
2007-03-24 19:25     ` Paul Jackson
2007-03-25  0:45       ` Srivatsa Vaddagiri
2007-03-25  1:41         ` Paul Jackson
2007-03-25  2:28           ` Srivatsa Vaddagiri
2007-03-25  4:16             ` Srivatsa Vaddagiri
2007-03-25  5:43               ` Paul Jackson
2007-03-25  8:21                 ` Srivatsa Vaddagiri
2007-03-25  4:45             ` Paul Jackson
2007-03-25  5:05               ` Srivatsa Vaddagiri
2007-03-25  4:59                 ` Paul Jackson
2007-02-12  8:15 ` [PATCH 2/7] containers (V7): Cpusets hooked into containers menage
2007-02-15 20:35   ` Serge E. Hallyn
2007-02-15 20:49     ` Paul Menage
2007-03-07 14:34   ` Srivatsa Vaddagiri
2007-03-07 16:01     ` Paul Menage
2007-03-07 16:31       ` [ckrm-tech] " Srivatsa Vaddagiri
2007-03-07 16:31         ` Paul Menage
2007-03-07 14:52   ` Srivatsa Vaddagiri
2007-03-07 16:12     ` Paul Menage
2007-02-12  8:15 ` [PATCH 4/7] containers (V7): Simple CPU accounting container subsystem menage
2007-02-12  8:15 ` [PATCH 5/7] containers (V7): Resource Groups over generic containers menage
2007-02-12  8:15 ` [PATCH 6/7] containers (V7): BeanCounters over generic process containers menage
2007-02-12 15:34   ` Srivatsa Vaddagiri
2007-02-12 18:49     ` Paul Menage
2007-02-13  8:52   ` Pavel Emelianov
2007-02-13  9:03     ` Paul Menage
2007-02-13  9:18       ` Pavel Emelianov
2007-02-13  9:37         ` Paul Menage
2007-02-13  9:49           ` Pavel Emelianov
2007-02-12  8:15 ` [PATCH 7/7] containers (V7): Container interface to nsproxy subsystem menage
2007-03-24  5:05   ` [ckrm-tech] " Srivatsa Vaddagiri
2007-03-24 16:23     ` Srivatsa Vaddagiri
2007-03-26 21:57       ` Serge E. Hallyn
2007-03-28 14:55         ` Srivatsa Vaddagiri
2007-03-28 15:26           ` Serge E. Hallyn
2007-03-26 21:55     ` Serge E. Hallyn
2007-03-31  2:47   ` Srivatsa Vaddagiri
2007-04-02 14:09     ` Serge E. Hallyn
2007-04-02 14:27       ` Srivatsa Vaddagiri
2007-04-02 18:02         ` Eric W. Biederman
2007-04-03 14:16           ` Srivatsa Vaddagiri
2007-04-03 15:32           ` Serge E. Hallyn
2007-04-03 15:45             ` Paul Menage
2007-04-03 15:54               ` Serge E. Hallyn
2007-04-03 16:16               ` Srivatsa Vaddagiri
2007-04-03 16:26               ` Kirill Korotaev
2007-04-03 16:46               ` Srivatsa Vaddagiri
2007-04-03 16:52                 ` Paul Menage
2007-04-03 17:11                   ` Srivatsa Vaddagiri
2007-04-03 17:10                     ` Paul Menage
2007-04-03 17:30                       ` Srivatsa Vaddagiri
2007-04-03 17:30                         ` Paul Menage
2007-04-03 17:51                           ` Srivatsa Vaddagiri
2007-04-03 17:49                             ` Paul Menage
2007-04-04  3:07                               ` Srivatsa Vaddagiri
2007-04-04  3:44                                 ` Paul Jackson
2007-04-04  4:04                                 ` Paul Menage
2007-04-04  5:15                                   ` Srivatsa Vaddagiri
2007-04-04  7:00                                     ` Paul Menage [this message]
2007-04-04 17:26                                       ` Srivatsa Vaddagiri
2007-04-04 17:42                                         ` Srivatsa Vaddagiri
2007-04-04 18:57                                         ` Paul Menage
2007-04-04 23:02                                           ` Eric W. Biederman
2007-04-05  1:35                                             ` Paul Menage
2007-04-05  1:37                                               ` Paul Menage
2007-04-05 16:57                                           ` Srivatsa Vaddagiri
2007-04-05 17:14                                             ` Srivatsa Vaddagiri
2007-04-06 21:54                                             ` Paul Menage
2007-04-05  2:57                                         ` Paul Menage
2007-04-05  6:39                                           ` Srivatsa Vaddagiri
2007-04-05  6:46                                             ` Srivatsa Vaddagiri
2007-04-05  6:48                                             ` Paul Menage
2007-04-05  8:49                                               ` Srivatsa Vaddagiri
2007-04-05  9:29                                                 ` Paul Menage
2007-04-05 12:43                                                   ` Srivatsa Vaddagiri
2007-04-05 14:13                                                     ` Srivatsa Vaddagiri
2007-04-05 14:13                                                     ` Paul Menage
2007-04-05 14:46                                                       ` Srivatsa Vaddagiri
2007-04-03 17:34                       ` Srivatsa Vaddagiri
2007-04-03 17:29                         ` Paul Menage
2007-04-03 16:10             ` Srivatsa Vaddagiri
2007-04-03 15:41           ` Serge E. Hallyn
2007-02-12  9:18 ` [PATCH 0/7] containers (V7): Generic Process Containers Paul Jackson
2007-02-12  9:32   ` Paul Menage
2007-02-12  9:52     ` Paul Jackson
     [not found] ` <20070212085104.485337000@menage.corp.google.com>
2007-02-12 15:27   ` [PATCH 3/7] containers (V7): Add generic multi-subsystem API to containers Srivatsa Vaddagiri
2007-02-12 18:40     ` Paul Menage
2007-02-13 13:19       ` Srivatsa Vaddagiri
2007-02-15  1:17         ` Paul Menage
2007-02-12 15:39   ` Serge E. Hallyn
2007-02-12 15:56     ` Cedric Le Goater
2007-02-12 18:31       ` Paul Menage
2007-02-14  8:49   ` Balbir Singh
2007-03-08 17:52   ` Srivatsa Vaddagiri
2007-03-24 12:51   ` [ckrm-tech] " Srivatsa Vaddagiri
2007-02-12 22:38 ` [PATCH 0/7] containers (V7): Generic Process Containers Sam Vilain
2007-02-12 22:47   ` Serge E. Hallyn
2007-02-12 23:18     ` Paul Menage
2007-02-12 23:15   ` Paul Menage
2007-02-13  0:30     ` Sam Vilain
2007-02-13  0:42       ` [ckrm-tech] " Paul Menage
2007-02-13  1:13         ` Sam Vilain
2007-02-13  1:47           ` Paul Menage
2007-02-20 17:34     ` Eric W. Biederman
2007-02-20 17:55       ` Paul Menage
2007-02-20 19:29         ` Eric W. Biederman
2007-02-20 22:47           ` Paul Menage
2007-02-20 23:08             ` Sam Vilain
2007-02-20 23:36               ` Paul Menage
2007-02-20 23:32             ` Serge E. Hallyn
2007-02-20 21:58         ` Sam Vilain
2007-02-20 22:19           ` Paul Menage
2007-02-20 22:58             ` Sam Vilain
2007-02-20 23:28               ` Paul Menage
2007-02-20 23:37               ` 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=6599ad830704040000of7f1197ica543e14d290509e@mail.gmail.com \
    --to=menage@google.com \
    --cc=ckrm-tech@lists.sourceforge.net \
    --cc=containers@lists.osdl.org \
    --cc=dev@sw.ru \
    --cc=devel@openvz.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@google.com \
    --cc=pj@sgi.com \
    --cc=rohitseth@google.com \
    --cc=sekharan@us.ibm.com \
    --cc=serue@us.ibm.com \
    --cc=vatsa@in.ibm.com \
    --cc=winget@google.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 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.