[Devel] Re: Creating tasks on restart: userspace vs kernel

2009-04-14 Thread Ingo Molnar
* Oren Laadan or...@cs.columbia.edu wrote: 3 Clone with pid: To restart processes from userspace, there needs to be a way to request a specific pid--in the current pid_ns--for the child process (clearly, if it isn't in use). Why is it a disadvantage ? to Linus, a syscall

[Devel] Re: Creating tasks on restart: userspace vs kernel

2009-04-14 Thread Oren Laadan
Ingo Molnar wrote: * Oren Laadan or...@cs.columbia.edu wrote: 3 Clone with pid: To restart processes from userspace, there needs to be a way to request a specific pid--in the current pid_ns--for the child process (clearly, if it isn't in use). Why is it a disadvantage ? to Linus, a

[Devel] Re: Creating tasks on restart: userspace vs kernel

2009-04-14 Thread Serge E. Hallyn
Quoting Oren Laadan (or...@cs.columbia.edu): For #1, we need to create a new container to begin with. This already requires CAP_SYS_ADMIN. Yes, for now we can use some setuid() to create a new pid_ns and then do the restart. This is why I like tagging a pidns with a userid, and requiring that

[Devel] Re: Creating tasks on restart: userspace vs kernel

2009-04-14 Thread Alexey Dobriyan
On Mon, Apr 13, 2009 at 11:43:30PM -0400, Oren Laadan wrote: For checkpoint/restart (c/r) we need a method to (re)create the tasks tree during restart. There are basically two approaches: in userspace (zap approach) or in the kernel (openvz approach). Once tasks have been created both

[Devel] Re: Creating tasks on restart: userspace vs kernel

2009-04-14 Thread Alexey Dobriyan
1) somebody should write registers before final jump to userspace. Task itself can't generally do it: struct pt_regs is in the same place as kernel stack. cr_load_cpu_regs() does exactly this: as current writes to it's own pt_regs. Oren, why don't you see crashes? I first

[Devel] Re: Creating tasks on restart: userspace vs kernel

2009-04-14 Thread Oren Laadan
Alexey Dobriyan wrote: On Mon, Apr 13, 2009 at 11:43:30PM -0400, Oren Laadan wrote: For checkpoint/restart (c/r) we need a method to (re)create the tasks tree during restart. There are basically two approaches: in userspace (zap approach) or in the kernel (openvz approach). Once tasks have

[Devel] Re: Creating tasks on restart: userspace vs kernel

2009-04-14 Thread Alexey Dobriyan
In the end correctness of chopping will be equal to how good user understands that two task_struct's are independent of each other. But it will still be a useful tool for many use cases, like batch cpu jobs, some servers, vnc sessions (if you want graphics) etc. Imagine you run

[Devel] Re: Creating tasks on restart: userspace vs kernel

2009-04-14 Thread Oren Laadan
Alexey Dobriyan wrote: In the end correctness of chopping will be equal to how good user understands that two task_struct's are independent of each other. But it will still be a useful tool for many use cases, like batch cpu jobs, some servers, vnc sessions (if you want graphics) etc.

[Devel] Re: Creating tasks on restart: userspace vs kernel

2009-04-14 Thread Alexey Dobriyan
On Tue, Apr 14, 2009 at 04:10:53PM -0400, Oren Laadan wrote: Alexey Dobriyan wrote: In the end correctness of chopping will be equal to how good user understands that two task_struct's are independent of each other. But it will still be a useful tool for many use cases, like batch cpu