mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul Menage" <menage@google.com>
To: "Paul Jackson" <pj@sgi.com>
Cc: akpm@osdl.org, ckrm-tech@lists.sourceforge.net,
	mbligh@google.com, rohitseth@google.com, winget@google.com,
	dev@sw.ru, sekharan@us.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH 1/4] Generic container system abstracted from cpusets code
Date: Sun, 1 Oct 2006 23:48:16 -0700	[thread overview]
Message-ID: <6599ad830610012348p1059f424ua48b62dd30a6c3fd@mail.gmail.com> (raw)
In-Reply-To: <20060928164536.84039937.pj@sgi.com>

On 9/28/06, Paul Jackson <pj@sgi.com> wrote:
>
> Be sure to spell out, if you haven't already, that there is just a
> single container hierarchy, with each task attached to a single
> container in that hierarchy, and each subsystem (e.g. cpusets)
> adding its own special files to the common container hierarchy
> directories.
>
> It is not the case that each subsystem using containers gets to
> concoct its own hierarchy, independent of any other subsystem.

Well, it wouldn't be too hard to have the container code manage
multiple container hierarchies in parallel if people wanted the
ability to do this. You'd just replace the

    struct container *container;

field in task_struct with

    struct container *containers[MAX_CONTAINER_HIERARCHIES]

and have each instance of the container filesystem manage a different
hierarchy. Perhaps to configure this from userspace you could do
something like

mount -t container xxx -octype=cpuset /dev/cpuset
mount -t container yyy -octype=resgroup,ctype=cpuacct /mnt/rescontainer

i.e. mount one container hierarchy on /dev/cpuset with just the cpuset
container type, and mount an independent hierarchy on
/mnt/rescontainer with the resgroup and cpuacct container types
attached to it. You'd probably want to enforce a rule that each
container type could only be attached to a single hierarchy at a time.

Anyone have any thoughts on the usefulness/insanity of such an idea?
The most useful part of it may be the ability to e.g. create a
container hierarchy that explicitly doesn't cause e.g. multiple
cpusets to be created, if you want to avoid the overhead that kicks in
when there are multiple cpusets in use. That could be approximated
without the overhead of multiple container hierarchy support by having
a control file(s) in the top container dir that lets you configure
which container subsystems are actually in use. So e.g. if you turned
cpusets off before creating any subcontainers, all containers would
actually share the same cpuset instance, and we could avoid any of the
overheads associated with having multiple cpusets.

This would be somewhere in between the existing state of a single
hierarchy with multiple fixed container types, and the full-blown
multiple hierarchies with configurably-attachable container types that
I outlined above.

>
> If someone configures in one or more of the subsystems, such as
> cpusets, that requires CONTAINERS, then we need to enable containers.
> Otherwise we don't need to enable CONTAINERS.  I don't see what
> user input we need here specific to CONTAINERS.

Fair enough - so have the various container types do "select
CONTAINERS" rather than "depends on CONTAINERS"?

>
> > + *  Copyright (C) 2003 BULL SA.
> > + *  Copyright (C) 2004-2006 Silicon Graphics, Inc.
>
> Perhaps you want to add a Google or Menage copyright here?
>
> > + *  2003-10-22 Updates by Stephen Hemminger.
> > + *  2004 May-July Rework by Paul Jackson.
>
> Perhaps time for another log line here, such as:
>   + *  2006 Generalized to containers by Paul Menage.

I already had something like that at the top - I've now made it
clearer that these copyright statements came from the cpuset.c code
from which this code was abstracted.

Paul

  reply	other threads:[~2006-10-02  6:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-28 10:40 [RFC][PATCH 0/4] Generic container system menage
2006-09-28 10:40 ` [RFC][PATCH 1/4] Generic container system abstracted from cpusets code menage
2006-09-28 23:45   ` Paul Jackson
2006-10-02  6:48     ` Paul Menage [this message]
2006-10-02  8:46       ` [ckrm-tech] " Paul Jackson
2006-10-02  8:48       ` Paul Jackson
2006-09-28 10:40 ` [RFC][PATCH 2/4] Cpusets hooked into containers menage
2006-09-28 23:48   ` Paul Jackson
2006-09-28 10:40 ` [RFC][PATCH 3/4] Add generic multi-subsystem API to containers menage
2006-09-28 10:40 ` [RFC][PATCH 4/4] Simple CPU accounting container subsystem menage
2006-09-28 18:49 ` [RFC][PATCH 0/4] Generic container system Paul Jackson
2006-09-28 19:00   ` Paul Menage
2006-09-29  4:31 ` Paul Jackson
2006-09-29 15:43   ` [ckrm-tech] " Paul Menage
2006-10-02  9:53 Paul Menage
2006-10-02  9:53 ` [RFC][PATCH 1/4] Generic container system abstracted from cpusets code Paul Menage

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=6599ad830610012348p1059f424ua48b62dd30a6c3fd@mail.gmail.com \
    --to=menage@google.com \
    --cc=akpm@osdl.org \
    --cc=ckrm-tech@lists.sourceforge.net \
    --cc=dev@sw.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@google.com \
    --cc=pj@sgi.com \
    --cc=rohitseth@google.com \
    --cc=sekharan@us.ibm.com \
    --cc=winget@google.com \
    /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®