[Devel] [RFC v14-rc2][PATCH 16/29] A new file type (CR_FD_OBJREF) for a file descriptor already setup

2009-03-31 Thread Oren Laadan
While file pointers are shared objects, they may share an underlying object themselves. For instance, file pointers of both ends of a pipe that share the same pipe inode. In this case, the shared entity to handle is the inode that is shared among two file pointers (e.g read- and write- ends). In

[Devel] [RFC v14-rc2][PATCH 19/29] Record 'struct file' object instead of the file name for VMAs

2009-03-31 Thread Oren Laadan
The vma-vm_file can be an arbitrary file pointer, including one that is in use by a process as well and provided originally via the mmap() syscall. Thus, when dumping the state of a VMA, save a file object instead of only the file name. As with other file objects, if it's seen for the first time

[Devel] [RFC v14-rc2][PATCH 20/29] Prepare to support shared memory

2009-03-31 Thread Oren Laadan
Export functionality to retrieve specific pages from shared memory given an inode in shmem-fs; this will be used in the next two patches to provide support for c/r of shared memory. Handling of shared memory depends on the type of a vma; to classify a vma we extend the 'struct

[Devel] [RFC v14-rc2][PATCH 18/29] Restore open pipes

2009-03-31 Thread Oren Laadan
When seeing a CR_FD_PIPE file type, we create a new pipe and thus have two file pointers (read- and write- ends). We only use one of them, depending on which side was checkpointed first. We register the file pointer of the other end in the hash table, with the 'objref' given for this pipe from the

[Devel] [RFC v14-rc2][PATCH 15/29] Restart multiple processes

2009-03-31 Thread Oren Laadan
Restarting of multiple processes expects all restarting tasks to call sys_restart(). Once inside the system call, each task will restart itself at the same order that they were saved. The internals of the syscall will take care of in-kernel synchronization bewteen tasks. This patch does _not_

[Devel] [RFC v14-rc2][PATCH 21/29] Dump anonymous- and file-mapped- shared memory

2009-03-31 Thread Oren Laadan
We now handle anonymous and file-mapped shared memory. Support for IPC shared memory requires support for IPC first. We extend cr_write_vma() to detect shared memory VMAs and handle it separately than private memory. There is not much to do for file-mapped shared memory, except to force msync()

[Devel] [RFC v14-rc2][PATCH 29/29] powerpc: enable checkpoint support in Kconfig

2009-03-31 Thread Oren Laadan
From: Nathan Lynch n...@pobox.com Signed-off-by: Nathan Lynch n...@pobox.com --- arch/powerpc/Kconfig |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 74cc312..ff7d598 100644 --- a/arch/powerpc/Kconfig +++

[Devel] [RFC v14-rc2][PATCH 26/29] powerpc: provide APIs for validating and updating DABR

2009-03-31 Thread Oren Laadan
From: Nathan Lynch n...@pobox.com A checkpointed task image may specify a value for the DABR (Data Access Breakpoint Register). The restart code needs to validate this value before making any changes to the current task. ptrace_set_debugreg encapsulates the bounds checking and platform

[Devel] [RFC v14-rc2][PATCH 27/29] powerpc: checkpoint/restart implementation

2009-03-31 Thread Oren Laadan
From: Nathan Lynch n...@pobox.com Support for checkpointing and restarting GPRs, FPU state, DABR, and Altivec state. The portion of the checkpoint image manipulated by this code begins with a bitmask of features indicating the various contexts saved. Fields in image that can vary depending on

[Devel] [RFC v14-rc2][PATCH 25/29] s390: define s390-specific checkpoint-restart code (v7)

2009-03-31 Thread Oren Laadan
From: Dan Smith da...@us.ibm.com Implement the s390 arch-specific checkpoint/restart helpers. This is on top of Oren Laadan's c/r code. With these, I am able to checkpoint and restart simple programs as per Oren's patch intro. While on x86 I never had to freeze a single task to checkpoint it,

[Devel] Re: [PATCH 1/7] [RFC] Support named cgroups hierarchies

2009-03-31 Thread Paul Menage
On Mon, Mar 16, 2009 at 11:44 PM, Li Zefan l...@cn.fujitsu.com wrote: - should the specification be via a name= option as in this patch, or should we simply use the device name as passed to the mount() system call? Using the device name is more conceptually clean and consistent with

[Devel] Re: [PATCH 4/7] [RFC] Allow cgroup hierarchies to be created with no bound subsystems

2009-03-31 Thread Paul Menage
On Mon, Mar 16, 2009 at 11:45 PM, Li Zefan l...@cn.fujitsu.com wrote: +static void init_root_id(struct cgroupfs_root *root) +{ + BUG_ON(!ida_pre_get(hierarchy_ida, GFP_KERNEL)); we should return -errno, BUG_ON() on this is wrong Hmm. Fair enough in the new root case, since it's possible

[Devel] Re: [PATCH 6/7] [RFC] Support multiply-bindable cgroup subsystems

2009-03-31 Thread Paul Menage
On Tue, Mar 17, 2009 at 8:09 PM, Li Zefan l...@cn.fujitsu.com wrote: I don't see what's wrong with this behavior: multi subsys sits in rootnode if it's unbound, and is removed from rootnode if it's binded at least in one hierarchy. You mean just for the purposes of /proc/cgroup, or in

[Devel] Re: mktree.c does not compile with v14 ?

2009-03-31 Thread Oren Laadan
Yes, the version I uploaded was broken :( Please try v14-rc2 from the same tree. Oren. Sukadev Bhattiprolu wrote: I am trying to compile mktree.c with [v14-rc1] but get this: $ make mktree cc -g -Wall -Wstrict-prototypes -Wno-trigraphs -I/home/suka/src/linux-cr/include

[Devel] Re: [RFC v14-rc2][PATCH 5/7] Infrastructure for work postponed to the end of checkpoint/restart

2009-03-31 Thread Dave Hansen
On Tue, 2009-03-31 at 01:32 -0400, Oren Laadan wrote: Add a interface to postpone an action until the end of the entire checkpoint or restart operation. This is useful when during the scan of tasks an operation cannot be performed in place, to avoid the need for a second scan. Why aren't we

[Devel] Re: [RFC v14-rc2][PATCH 5/7] Infrastructure for work postponed to the end of checkpoint/restart

2009-03-31 Thread Oren Laadan
Dave Hansen wrote: On Tue, 2009-03-31 at 01:32 -0400, Oren Laadan wrote: Add a interface to postpone an action until the end of the entire checkpoint or restart operation. This is useful when during the scan of tasks an operation cannot be performed in place, to avoid the need for a second

[Devel] Re: [RFC v14-rc2][PATCH 10/29] actually use f_op in checkpoint code

2009-03-31 Thread Oren Laadan
If ext2/3/4 is compiled as a kernel module, apply this patch to successfully compile this c/r patchset. Oren. diff --git a/checkpoint/ckpt_file.c b/checkpoint/ckpt_file.c index 0fe68bf..df6bb3d 100644 --- a/checkpoint/ckpt_file.c +++ b/checkpoint/ckpt_file.c @@ -109,6 +109,8 @@ int

[Devel] Re: [RFC v14-rc2][PATCH 3/7] sysvipc-shm: checkpoint

2009-03-31 Thread Serge E. Hallyn
Quoting Oren Laadan (or...@cs.columbia.edu): ... int cr_write_ipc(struct cr_ctx *ctx, struct nsproxy *nsproxy) { - return 0; + return cr_write_ipc_shm(ctx, nsproxy-ipc_ns); } What is the plan for implementing support for nested ipc namespaces, since all ipc data is currently

[Devel] Re: [RFC v14-rc2][PATCH 3/7] sysvipc-shm: checkpoint

2009-03-31 Thread Oren Laadan
Serge E. Hallyn wrote: Quoting Oren Laadan (or...@cs.columbia.edu): ... int cr_write_ipc(struct cr_ctx *ctx, struct nsproxy *nsproxy) { -return 0; +return cr_write_ipc_shm(ctx, nsproxy-ipc_ns); } What is the plan for implementing support for nested ipc namespaces, since all

[Devel] [PATCH 1/3] Make cr_may_checkpoint_task() check each namespace individually

2009-03-31 Thread Dan Smith
Cc: or...@cs.columbia.edu Signed-off-by: Dan Smith da...@us.ibm.com --- checkpoint/checkpoint.c | 15 +-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/checkpoint/checkpoint.c b/checkpoint/checkpoint.c index ef35754..c2f0e16 100644 --- a/checkpoint/checkpoint.c +++

[Devel] [PATCH 3/3] Stub implementation of IPC namespace c/r (v2)

2009-03-31 Thread Dan Smith
Changes: - Update to match UTS changes Signed-off-by: Dan Smith da...@us.ibm.com --- checkpoint/checkpoint.c| 26 + checkpoint/objhash.c |7 + checkpoint/restart.c | 49

[Devel] c/r: Add UTS support

2009-03-31 Thread Dan Smith
This is the latest version of my UTS patch set. It has been re-modified to do restart in the kernel after much ponderage of the required algorithm to do nested restart in userspace. Thus, it no longer requires the modified mktree.c from earlier sets. The namespace information has been moved to

[Devel] [PATCH 2/3] c/r: Add UTS support (v6)

2009-03-31 Thread Dan Smith
This patch adds a phase of checkpoint that saves out information about any namespaces the task(s) may have. Do this by tracking the namespace objects of the tasks and making sure that tasks with the same namespace that follow get properly referenced in the checkpoint stream. I tested this with