Re: [ckrm-tech] [PATCH 3/9] Containers (V9): Add tasks file interface

2007-05-10 Thread Balbir Singh
Paul Menage wrote: > On 5/8/07, Balbir Singh <[EMAIL PROTECTED]> wrote: >> >> I now have a use case for maintaining a per-container task list. >> I am trying to build a per-container stats similar to taskstats. >> I intend to support container accounting of >> >> 1. Tasks running >> 2. Tasks stoppe

Re: [ckrm-tech] [PATCH 3/9] Containers (V9): Add tasks file interface

2007-05-10 Thread Paul Menage
On 5/8/07, Balbir Singh <[EMAIL PROTECTED]> wrote: I now have a use case for maintaining a per-container task list. I am trying to build a per-container stats similar to taskstats. I intend to support container accounting of 1. Tasks running 2. Tasks stopped 3. Tasks un-interruptible 4. Tasks b

Re: [ckrm-tech] [PATCH 3/9] Containers (V9): Add tasks file interface

2007-05-08 Thread Balbir Singh
Paul Menage wrote: > On 5/1/07, Srivatsa Vaddagiri <[EMAIL PROTECTED]> wrote: >> For the CPU controller I was working on, (a fast access to) such a list would >> have been valuable. Basically each task has a weight associated with it >> (p->load_weight) which is made to depend upon its class limit.

Re: [ckrm-tech] [PATCH 3/9] Containers (V9): Add tasks file interface

2007-05-01 Thread Balbir Singh
Paul Menage wrote: On 5/1/07, Balbir Singh <[EMAIL PROTECTED]> wrote: > + if (container_is_removed(cont)) { > + retval = -ENODEV; > + goto out2; > + } Can't we make this check prior to kmalloc() and copy_from_user()? We could but I'm not sure what it would buy

Re: [ckrm-tech] [PATCH 3/9] Containers (V9): Add tasks file interface

2007-05-01 Thread Srivatsa Vaddagiri
On Tue, May 01, 2007 at 08:25:35PM -0700, Paul Menage wrote: > >- Walk the task table and find relevant members > > That doesn't seem like a terrible solution to me, unless you expect > the class limit to be changing incredibly frequently. yeah i agree. Group limit(s) should not be changi

Re: [ckrm-tech] [PATCH 3/9] Containers (V9): Add tasks file interface

2007-05-01 Thread Paul Menage
On 5/1/07, Srivatsa Vaddagiri <[EMAIL PROTECTED]> wrote: For the CPU controller I was working on, (a fast access to) such a list would have been valuable. Basically each task has a weight associated with it (p->load_weight) which is made to depend upon its class limit. Whenever the class limit c

Re: [ckrm-tech] [PATCH 3/9] Containers (V9): Add tasks file interface

2007-05-01 Thread Srivatsa Vaddagiri
On Tue, May 01, 2007 at 01:37:24PM -0700, Paul Menage wrote: > > Any chance we could get a per-container task list? It will > > help subsystem writers as well. > > It would be possible, yes - but we probably wouldn't want the overhead > (additional ref counts and list manipulations on every fork/e

Re: [ckrm-tech] [PATCH 3/9] Containers (V9): Add tasks file interface

2007-05-01 Thread Paul Menage
On 5/1/07, Balbir Singh <[EMAIL PROTECTED]> wrote: > + if (container_is_removed(cont)) { > + retval = -ENODEV; > + goto out2; > + } Can't we make this check prior to kmalloc() and copy_from_user()? We could but I'm not sure what it would buy us - we'd be optimiz