linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul Menage" <menage@google.com>
To: vatsa@in.ibm.com
Cc: xemul@sw.ru, dev@sw.ru, pj@sgi.com, sam@vilain.net,
	ebiederm@xmission.com, winget@google.com, serue@us.ibm.com,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	ckrm-tech@lists.sourceforge.net, containers@lists.osdl.org
Subject: Re: Summary of resource management discussion
Date: Thu, 15 Mar 2007 12:12:50 -0700	[thread overview]
Message-ID: <6599ad830703151212o524af40es6cc6893c4304175f@mail.gmail.com> (raw)
In-Reply-To: <20070315170435.GA28692@in.ibm.com>

On 3/15/07, Srivatsa Vaddagiri <vatsa@in.ibm.com> wrote:
> On Thu, Mar 15, 2007 at 04:24:37AM -0700, Paul Menage wrote:
> > If there really was a grouping that was always guaranteed to match the
> > way you wanted to group tasks for e.g. resource control, then yes, it
> > would be great to use it. But I don't see an obvious candidate. The
> > pid namespace is not it, IMO.
>
> In vserver context, what is the "normal" case then? Atleast for Linux
> Vserver pid namespace seems to be normal unit of resource control (as per
> Herbert).

Yes, for vserver the pid namespace is a good proxy for resource
control groupings. But my point was that it's not universally
suitable.

>
> (the best I could draw using ASCII art!)

Right, I think those diagrams agree with the point I wanted to make -
that resource control shouldn't be tied to the pid namespace.

>
> The benefit I see of this approach is it will avoid introduction of
> additional pointers in struct task_struct and also additional structures
> (struct container etc) in the kernel, but we will still be able to retain
> same user interfaces you had in your patches.
>
> Do you see any drawbacks of doing like this? What will break if we do
> this?

There are some things that benefit from having an abstract
container-like object available to store state, e.g. "is this
container deleted?", "should userspace get a callback when this
container is empty?". But this indirection object wouldn't need to be
on the fast path for subsystem access to their per-taskgroup state.

> > >a. Paul Menage's patches:
> > >
> > >        (tsk->containers->container[cpu_ctlr.subsys_id] - X)->cpu_limit
> >
> > So what's the '-X' that you're referring to
>
> Oh ..that's to seek pointer to begining of the cpulimit structure (subsys
> pointer in 'struct container' points to a structure embedded in a larger
> structure. -X gets you to point to the larger structure).

OK, so shouldn't that be listed as an overhead for your rcfs version
too? In practice, most subsystems that I've written tend to have the
subsys object at the beginning of the per-subsys state, so X = 0 and
is optimized out by the compiler. Even if it wasn't, X is constant and
so won't hurt much or at all.

>
> Yes me too. But maybe to keep in simple in initial versions, we should
> avoid that optimisation and at the same time get statistics on duplicates?.

That's an implementation detail - we have more important points to
agree on right now ...

Paul

  reply	other threads:[~2007-03-15 19:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-12 12:42 Summary of resource management discussion Srivatsa Vaddagiri
2007-03-13 16:24 ` Herbert Poetzl
2007-03-13 17:58   ` Srivatsa Vaddagiri
2007-03-13 23:50     ` Herbert Poetzl
2007-03-15 11:24 ` Paul Menage
2007-03-15 17:04   ` Srivatsa Vaddagiri
2007-03-15 19:12     ` Paul Menage [this message]
2007-03-16  1:40       ` Srivatsa Vaddagiri
2007-03-16 20:03         ` Eric W. Biederman
2007-03-16 14:26       ` Herbert Poetzl
2007-03-16 14:19     ` Herbert Poetzl
2007-03-16 14:57       ` Srivatsa Vaddagiri
2007-03-16 21:23       ` Paul Jackson

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=6599ad830703151212o524af40es6cc6893c4304175f@mail.gmail.com \
    --to=menage@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=ckrm-tech@lists.sourceforge.net \
    --cc=containers@lists.osdl.org \
    --cc=dev@sw.ru \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.com \
    --cc=sam@vilain.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).