[Devel] Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic container system abstracted from cpusets code

2007-03-24 Thread Paul Jackson
vatsa wrote: > Not just this, continuing further we have more trouble: > > > CPU0 (attach_task T1 to CS2) CPU1 (T1 is exiting) > > > synchroni

[Devel] Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic container system abstracted from cpusets code

2007-03-24 Thread Paul Jackson
> I will try to send out a patch later today to fix Thanks! > Agreed, but good to keep code clean isn't it? :) Definitely. -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson <[EMAIL PROTECTED]> 1.925.600.0401

[Devel] Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic container system abstracted from cpusets code

2007-03-24 Thread Srivatsa Vaddagiri
On Sat, Mar 24, 2007 at 09:45:50PM -0700, Paul Jackson wrote: > Nice work - thanks. Yes, both an extra cpuset count and a negative > cpuset count are bad news, opening the door to the usual catastrophes. > > Would you like the honor of submitting the patch to add a task_lock > to cpuset_exit()?

[Devel] Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic container system abstracted from cpusets code

2007-03-24 Thread Paul Jackson
vatsa wrote: > Now consider: Nice work - thanks. Yes, both an extra cpuset count and a negative cpuset count are bad news, opening the door to the usual catastrophes. Would you like the honor of submitting the patch to add a task_lock to cpuset_exit()? If you do, be sure to fix, or at least rem

[Devel] Re: Linux-VServer example results for sharing vs. separate mappings ...

2007-03-24 Thread Andrew Morton
On Sun, 25 Mar 2007 04:21:56 +0200 Herbert Poetzl <[EMAIL PROTECTED]> wrote: > > a) slice the machine into 128 fake NUMA nodes, use each node as the > >basic block of memory allocation, manage the binding between these > >memory hunks and process groups with cpusets. > > 128 sounds a litt

[Devel] Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic container system abstracted from cpusets code

2007-03-24 Thread Srivatsa Vaddagiri
On Sun, Mar 25, 2007 at 07:58:16AM +0530, Srivatsa Vaddagiri wrote: > Not just this, continuing further we have more trouble: > > > CPU0 (attach_task T1 to CS2) CPU1 (T1 is exiting) >

[Devel] Re: Linux-VServer example results for sharing vs. separate mappings ...

2007-03-24 Thread Herbert Poetzl
On Sat, Mar 24, 2007 at 12:19:06PM -0800, Andrew Morton wrote: > On Sat, 24 Mar 2007 19:38:06 +0100 Herbert Poetzl <[EMAIL PROTECTED]> wrote: > > > On Fri, Mar 23, 2007 at 09:42:35PM -0800, Andrew Morton wrote: > > > On Fri, 23 Mar 2007 20:30:00 +0100 Herbert Poetzl <[EMAIL PROTECTED]> > > > wrot

[Devel] Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic container system abstracted from cpusets code

2007-03-24 Thread Srivatsa Vaddagiri
On Sat, Mar 24, 2007 at 06:41:28PM -0700, Paul Jackson wrote: > > the following code becomes racy with cpuset_exit() ... > > > > atomic_inc(&cs->count); > > rcu_assign_pointer(tsk->cpuset, cs); > > task_unlock(tsk); > > eh ... so ... ? > > I don't know of any sequence whe

[Devel] Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic container system abstracted from cpusets code

2007-03-24 Thread Paul Jackson
vatsa wrote: > > if (tsk->flags & PF_EXITING) { > > What if PF_EXITING is set after this check? If that happens then, > > > task_unlock(tsk); > > mutex_unlock(&callback_mutex); > > put_task_struct(tsk); > > return -ESRCH; > >

[Devel] Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic container system abstracted from cpusets code

2007-03-24 Thread Srivatsa Vaddagiri
On Sat, Mar 24, 2007 at 12:25:59PM -0700, Paul Jackson wrote: > > P.S : cpuset.c checks for PF_EXITING twice in attach_task(), while this > > patch seems to be checking only once. Is that fine? > > I think the cpuset code is ok, because, as you note, it locks the task, > picks off the cpuset point

[Devel] Re: Linux-VServer example results for sharing vs. separate mappings ...

2007-03-24 Thread Andrew Morton
On Sat, 24 Mar 2007 19:38:06 +0100 Herbert Poetzl <[EMAIL PROTECTED]> wrote: > On Fri, Mar 23, 2007 at 09:42:35PM -0800, Andrew Morton wrote: > > On Fri, 23 Mar 2007 20:30:00 +0100 Herbert Poetzl <[EMAIL PROTECTED]> wrote: > > > > > > > > Hi Eric! > > > Hi Folks! > > > > > > here is a real worl

[Devel] Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic container system abstracted from cpusets code

2007-03-24 Thread Paul Jackson
> IMO, we need to use task_lock() in container_exit() to avoid this race. > > (I think this race already exists in mainline cpuset.c?) > > P.S : cpuset.c checks for PF_EXITING twice in attach_task(), while this > patch seems to be checking only once. Is that fine? I think the cpuset code is ok,

[Devel] Re: Linux-VServer example results for sharing vs. separate mappings ...

2007-03-24 Thread Herbert Poetzl
On Fri, Mar 23, 2007 at 09:42:35PM -0800, Andrew Morton wrote: > On Fri, 23 Mar 2007 20:30:00 +0100 Herbert Poetzl <[EMAIL PROTECTED]> wrote: > > > > > Hi Eric! > > Hi Folks! > > > > here is a real world example result from one of my tests > > regarding the benefit of sharing over separate memor

[Devel] Re: [ckrm-tech] [PATCH 7/7] containers (V7): Container interface to nsproxy subsystem

2007-03-24 Thread Srivatsa Vaddagiri
On Sat, Mar 24, 2007 at 10:35:37AM +0530, Srivatsa Vaddagiri wrote: > > +static int ns_create(struct container_subsys *ss, struct container *cont) > > +{ > > + struct nscont *ns; > > + > > + if (!capable(CAP_SYS_ADMIN)) > > + return -EPERM; > > Does this check break existing namespac

[Devel] Re: [ckrm-tech] [PATCH 1/7] containers (V7): Generic container system abstracted from cpusets code

2007-03-24 Thread Srivatsa Vaddagiri
On Mon, Feb 12, 2007 at 12:15:22AM -0800, [EMAIL PROTECTED] wrote: > +static int attach_task(struct container *cont, char *pidbuf, char **ppathbuf) > +{ > + pid_t pid; > + struct task_struct *tsk; > + struct container *oldcont; > + int retval; > + > + if (sscanf(pidbuf, "%d", &p

[Devel] Re: [ckrm-tech] [PATCH 3/7] containers (V7): Add generic multi-subsystem API to containers

2007-03-24 Thread Srivatsa Vaddagiri
On Mon, Feb 12, 2007 at 12:15:24AM -0800, [EMAIL PROTECTED] wrote: > +static int attach_task(struct container *cont, struct task_struct *tsk) > { [snip] > + for_each_subsys(h, ss) { > + if (ss->can_attach) { > + retval = ss->can_attach(ss, cont, tsk); > +