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

2009-03-31 Thread Oren Laadan
_indices_ (page nr) into the backing inode. Changelog[v14]: - Introduce patch Signed-off-by: Oren Laadan or...@cs.columbia.edu --- checkpoint/ckpt_mem.c | 273 ++-- checkpoint/rstr_mem.c |4 + include/linux/checkpoint.h |2

[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
/include/asm/checkpoint_hdr.h @@ -0,0 +1,15 @@ +#ifndef __ASM_PPC_CKPT_HDR_H +#define __ASM_PPC_CKPT_HDR_H +/* + * Checkpoint/restart - architecture specific headers ppc + * + * Copyright (C) 2008 Oren Laadan + * + * This file is subject to the terms and conditions of the GNU General Public

[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: 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 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
2009, Oren Laadan wrote: From: Dave Hansen d...@linux.vnet.ibm.com Right now, we assume all normal files and directories can be checkpointed. However, as usual in the VFS, there are specialized places that will always need an ability to override these defaults. We could do this completely

[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] Re: [RFC v14-rc2][PATCH 16/29] A new file type (CR_FD_OBJREF) for a file descriptor already setup

2009-04-01 Thread Oren Laadan
Serge E. Hallyn wrote: Quoting Oren Laadan (or...@cs.columbia.edu): 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

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

2009-04-01 Thread Oren Laadan
Thanks for the review ... Serge E. Hallyn wrote: Quoting Oren Laadan (or...@cs.columbia.edu): 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

[Devel] Re: [C/R] sleepers don't wake up on restart

2009-04-02 Thread Oren Laadan
Suka, can you please post the entire test program so I can try to reproduce it here ? thanks, Oren. Sukadev Bhattiprolu wrote: Tried this with v14-rc2. This is probably not implemented yet... I created a simple 1-level process tree (parent with 10 children). The parent just waits for

[Devel] Re: [RFC v14-rc2][PATCH 1/7] ipc: allow allocation of an ipc object with desired identifier

2009-04-02 Thread Oren Laadan
Serge E. Hallyn wrote: Quoting Oren Laadan (or...@cs.columbia.edu): -int ipc_addid(struct ipc_ids* ids, struct kern_ipc_perm* new, int size) +int +ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size, int req_id) { uid_t euid; gid_t egid; +int lid = 0

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

2009-04-03 Thread Oren Laadan
Dan Smith wrote: OL @@ -86,46 +132,44 @@ static int cr_read_file(struct cr_ctx *ctx, int objref) OL goto out; OL ret = -EINVAL; OL + if (hh-fd_objref 0) OL + goto out; As far as I can tell, hh-fd_objref never gets set anywhere. On my system, this causes

[Devel] Re: [RFC v14-rc2][PATCH 24/29] c/r: Add CR_COPY() macro (v4)

2009-04-05 Thread Oren Laadan
ok, thanks. Dan Smith wrote: SH That's sucky... yeah i would say a comment, though of course it SH could be one of those cases where everyone but me already knows... Here's a nice fix brought to us by Mr. Lynch... ___ Containers mailing list

[Devel] Re: [PATCH 1/1] x86: c/r support (for now) requires compat_vdso

2009-04-05 Thread Oren Laadan
Ok, applied. Serge E. Hallyn wrote: Make x86 support depend on it (for now). Signed-off-by: Serge E. Hallyn se...@us.ibm.com --- arch/x86/Kconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 246e26b..efc462a 100644

[Devel] Re: [RFC v14-rc2][PATCH 6/7] sysvipc-shm: export interface from ipc/shm.c to delete ipc shm

2009-04-05 Thread Oren Laadan
Matt Helsley wrote: On Tue, Mar 31, 2009 at 01:32:31AM -0400, Oren Laadan wrote: Signed-off-by: Oren Laadan or...@cs.columbia.edu The description is empty and this patch is rather pointless without 7/7. Any reason you kept it separate from 7/7? At the very least this patch needs a brief

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

2009-04-05 Thread Oren Laadan
Dan Smith wrote: SH One thing to note is that this will drive the ns cgroup bananas. SH It might still be worthwhile collecting the flags for all the SH to-be-unshared namespaces, and then doing all of the unsharing at SH once. Okay, that's fair. SH Futhermore, you do sys_unshare here,

[Devel] Re: c/r: Add UTS support

2009-04-06 Thread Oren Laadan
Hmm.. I already integrated the previous version to the current dev branch (see branch ckpt-v14-rc3-dev ; there are several changed untested so I didn't release yet, but you can take a look at the three corresponding patches. BTW, in branch v14-rc3-dev of the userspace tool there is a version of

[Devel] Re: [RFC v14-rc2][PATCH 06/29] Dump memory address space

2009-04-06 Thread Oren Laadan
Sukadev Bhattiprolu wrote: One comment below. Thanks .. (and the other reviews as well - I fixed all of them) [...] | +static char * | +cr_fill_fname(struct path *path, struct path *root, char *buf, int *n) | +{ | + struct path tmp = *root; | + char *fname; | + | + BUG_ON(!buf);

[Devel] Re: [RFC v14-rc2][PATCH 14/29] Checkpoint multiple processes

2009-04-06 Thread Oren Laadan
Sukadev Bhattiprolu wrote: Oren Laadan [or...@cs.columbia.edu] wrote: | From ee2f3b5c8548136229cc2f41c5271b0a81ab8a4d Mon Sep 17 00:00:00 2001 | From: Oren Laadan or...@cs.columbia.edu | Date: Mon, 30 Mar 2009 15:06:13 -0400 | Subject: [PATCH 14/29] Checkpoint multiple processes

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

2009-04-06 Thread Oren Laadan
Sukadev Bhattiprolu wrote: Couple of nits and couple of not-so minor comments Oren Laadan [or...@cs.columbia.edu] wrote: | From 7162fef93ee3d9fd30a457dd7b0c7ad0200d5bcb Mon Sep 17 00:00:00 2001 | From: Oren Laadan or...@cs.columbia.edu | Date: Mon, 30 Mar 2009 15:06:13 -0400 | Subject

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

2009-04-06 Thread Oren Laadan
Sukadev Bhattiprolu wrote: A minor comment and a nit. Oren Laadan [or...@cs.columbia.edu] wrote: | From d832bfba9a50789fbfadf8486fbdfbd8b498a9ea Mon Sep 17 00:00:00 2001 | From: Dave Hansen d...@linux.vnet.ibm.com | Date: Fri, 27 Mar 2009 12:50:47 -0700 | Subject: [PATCH 10/29] actually

[Devel] [RFC v14-rc3][PATCH 03/36] Make file_pos_read/write() public

2009-04-07 Thread Oren Laadan
These two are used in the next patch when calling vfs_read/write() Signed-off-by: Oren Laadan or...@cs.columbia.edu --- fs/read_write.c| 10 -- include/linux/fs.h | 10 ++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/fs/read_write.c b/fs/read_write.c

[Devel] [RFC v14-rc3][PATCH 11/36] add generic checkpoint f_op to ext fses

2009-04-07 Thread Oren Laadan
From: Dave Hansen d...@linux.vnet.ibm.com This marks ext[234] as being checkpointable. There will be many more to do this to, but this is a start. Signed-off-by: Dave Hansen d...@linux.vnet.ibm.com --- fs/ext2/dir.c |1 + fs/ext2/file.c |2 ++ fs/ext3/dir.c |1 + fs/ext3/file.c |

[Devel] [RFC v14-rc3][PATCH 05/36] x86 support for checkpoint/restart

2009-04-07 Thread Oren Laadan
Changelog[v4]: - Fix header structure alignment Changelog[v2]: - Pad header structures to 64 bits to ensure compatibility - Follow Dave Hansen's refactoring of the original post Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com Signed-off-by: Dave Hansen d

[Devel] [RFC v14-rc3][PATCH 02/36] Checkpoint/restart: initial documentation

2009-04-07 Thread Oren Laadan
and comments from feedback Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com Signed-off-by: Dave Hansen d...@linux.vnet.ibm.com --- Documentation/checkpoint/ckpt.c| 32 ++ Documentation/checkpoint/internals.txt | 127 +++ Documentation

[Devel] [RFC v14-rc3][PATCH 00/36] Kernel based checkpoint/restart

2009-04-07 Thread Oren Laadan
Checkpoint-restart (c/r): * Part 1 of refactoring file-checkpoint to use f_ops (file operations) * Added code to c/r restat-blocks (restart timeout related syscalls) * Added code to c/r namespaces: uts, ipc stub (with Dan Smith) * Explicitly handle VDSO vma (and require compat mode) * Support for

[Devel] [RFC v14-rc3][PATCH 09/36] Dump open file descriptors

2009-04-07 Thread Oren Laadan
() with matching cr_hbuf_put() (even though it's not really needed) Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com Signed-off-by: Dave Hansen d...@linux.vnet.ibm.com --- arch/x86/include/asm/checkpoint_hdr.h |2 +- checkpoint/Makefile |3

[Devel] [RFC v14-rc3][PATCH 01/36] Create syscalls: sys_checkpoint, sys_restart

2009-04-07 Thread Oren Laadan
self. Changelog[v14]: - Change CONFIG_CHEKCPOINT_RESTART to CONFIG_CHECKPOINT (Ingo) - Remove line 'def_bool n' (default is already 'n') - Add CHECKPOINT_SUPPORT in Kconfig (Nathan Lynch) Changelog[v5]: - Config is 'def_bool n' by default Signed-off-by: Oren Laadan or...@cs.columbia.edu

[Devel] [RFC v14-rc3][PATCH 13/36] External checkpoint of a task other than ourself

2009-04-07 Thread Oren Laadan
than current process Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com --- checkpoint/checkpoint.c| 67 ++- checkpoint/restart.c |4 +- checkpoint/sys.c |6 include/linux/checkpoint.h

[Devel] [RFC v14-rc3][PATCH 08/36] Infrastructure for shared objects

2009-04-07 Thread Oren Laadan
) Changelog[v11]: - Doc: be explicit about grabbing a reference and object lifetime Changelog[v4]: - Fix calculation of hash table size Changelog[v3]: - Use standard hlist_... for hash table Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com Signed-off

[Devel] [RFC v14-rc3][PATCH 04/36] General infrastructure for checkpoint restart

2009-04-07 Thread Oren Laadan
/checkpoint/ Changelog[v2]: - Added utsname-{release,version,machine} to checkpoint header - Pad header structures to 64 bits to ensure compatibility Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com Signed-off-by: Dave Hansen d...@linux.vnet.ibm.com --- Makefile

[Devel] [RFC v14-rc3][PATCH 10/36] actually use f_op in checkpoint code

2009-04-07 Thread Oren Laadan
have to do to make something simple be supported is add a single generic f_op entry. Signed-off-by: Dave Hansen d...@linux.vnet.ibm.com Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com --- checkpoint/ckpt_file.c | 31 +++ include

[Devel] [RFC v14-rc3][PATCH 16/36] Checkpoint multiple processes

2009-04-07 Thread Oren Laadan
separate index for 'tasks_arr' and 'hh' in cr_write_pids() Changelog[v12]: - Replace obsolete cr_debug() with pr_debug() Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com --- checkpoint/checkpoint.c| 256

[Devel] [RFC v14-rc3][PATCH 14/36] c/r of restart-blocks: export functionality used in next patch

2009-04-07 Thread Oren Laadan
. Signed-off-by: Oren Laadan or...@cs.columbia.edu --- fs/select.c |2 +- include/linux/futex.h| 10 ++ include/linux/poll.h |3 +++ include/linux/posix-timers.h |2 ++ kernel/futex.c | 11 +-- kernel/posix-timers.c

[Devel] [RFC v14-rc3][PATCH 12/36] Restore open file descriptors

2009-04-07 Thread Oren Laadan
() fail Changelog[v12]: - Replace obsolete cr_debug() with pr_debug() Changelog[v6]: - Balance all calls to cr_hbuf_get() with matching cr_hbuf_put() (even though it's not really needed) Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com Signed-off

[Devel] [RFC v14-rc3][PATCH 19/36] Checkpoint open pipes

2009-04-07 Thread Oren Laadan
the 'h.parent' field - Check whether calls to cr_hbuf_get() fail - Test that a pipe's inode != ctx-file's inode to prevent deadlock Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com --- checkpoint/ckpt_file.c |2 + fs/pipe.c

[Devel] [RFC v2][PATCH 03/10] ipc: helpers to save and restore kern_ipc_perm structures

2009-04-07 Thread Oren Laadan
of ipc objects, but does not restore them during restart. Signed-off-by: Oren Laadan or...@cs.columbia.edu --- checkpoint/Makefile|1 + checkpoint/checkpoint.c|3 + checkpoint/restart.c |5 ++ checkpoint/util_ipc.c | 82

[Devel] [RFC v14-rc3][PATCH 17/36] Restart multiple processes

2009-04-07 Thread Oren Laadan
cr_ctx' Changelog[v12]: - Replace obsolete cr_debug() with pr_debug() Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com --- checkpoint/restart.c | 234 +++- checkpoint/sys.c | 35 +-- include

[Devel] [RFC v14-rc3][PATCH 18/36] A new file type (CR_FD_OBJREF) for a file descriptor already setup

2009-04-07 Thread Oren Laadan
-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com --- checkpoint/objhash.c | 30 +++--- checkpoint/rstr_file.c | 83 ++- include/linux/checkpoint.h |1 + include/linux/checkpoint_hdr.h |9 +++- 4

[Devel] [RFC v2][PATCH 05/10] sysvipc-shm: restart

2009-04-07 Thread Oren Laadan
at the moment. Signed-off-by: Oren Laadan or...@cs.columbia.edu --- checkpoint/rstr_mem.c | 23 ++ checkpoint/rstr_task.c |2 +- checkpoint/util_ipc.c |2 +- include/linux/checkpoint.h |3 + ipc/ckpt_shm.c | 161

[Devel] [RFC v2][PATCH 07/10] sysvipc-shm: correctly handle deleted (active) ipc shared memory

2009-04-07 Thread Oren Laadan
, because it will be ... gone :o Signed-off-by: Oren Laadan or...@cs.columbia.edu --- ipc/ckpt_shm.c | 44 1 files changed, 40 insertions(+), 4 deletions(-) diff --git a/ipc/ckpt_shm.c b/ipc/ckpt_shm.c index ee9b77a..c5b7f60 100644 --- a/ipc/ckpt_shm.c

[Devel] [RFC v2][PATCH 02/10] ipc: allow allocation of an ipc object with desired identifier

2009-04-07 Thread Oren Laadan
During restart, we need to allocate ipc objects that with the same identifiers as recorded during checkpoint. Modify the allocation code allow an in-kernel caller to request a specific ipc identifier. The system call interface remains unchanged. Signed-off-by: Oren Laadan or...@cs.columbia.edu

[Devel] [RFC v2][PATCH 01/10] Infrastructure for work postponed to the end of checkpoint/restart

2009-04-07 Thread Oren Laadan
). Instead, this mechanism is a simple way for the c/r operation as a whole, and later a task in particular, to defer some action until later (but not arbitrarily later) _in the restart_ operation. Signed-off-by: Oren Laadan or...@cs.columbia.edu --- checkpoint/Makefile|4 +- checkpoint

[Devel] [RFC v2][PATCH 00/10] sysv SHM checkpoint/restart

2009-04-07 Thread Oren Laadan
message queues - Integrate with recent naemspaces c/r (rebase on ckpt-v14) Summary: Oren Laadan (10): Infrastructure for work postponed to the end of checkpoint/restart ipc: allow allocation of an ipc object with desired identifier ipc: helpers to save and restore

[Devel] [RFC v2][PATCH 06/10] sysvipc-shm: export interface from ipc/shm.c to delete ipc shm

2009-04-07 Thread Oren Laadan
Export shmctl_down() which will be used in the next patch during restart to delete an ipc shm (the shm is mapped already, so it won't be lost). Signed-off-by: Oren Laadan or...@cs.columbia.edu --- include/linux/shm.h |4 ipc/shm.c |4 ++-- 2 files changed, 6 insertions

[Devel] [RFC v2][PATCH 04/10] sysvipc-shm: checkpoint

2009-04-07 Thread Oren Laadan
-off-by: Oren Laadan or...@cs.columbia.edu --- checkpoint/checkpoint.c|3 - checkpoint/ckpt_mem.c |9 +++ checkpoint/ckpt_task.c |2 +- checkpoint/restart.c |4 - checkpoint/util_ipc.c |7 +- include/linux/checkpoint.h |6

[Devel] [RFC v2][PATCH 08/10] sysvipc-msg: make 'struct msg_msgseg' visible in ipc/util.h

2009-04-07 Thread Oren Laadan
Move the definition of 'struct msg_msgseg' and constants DATALEN_* to ipc/util.h, where they are visible to ipc/ckpt_msg.c Signed-off-by: Oren Laadan or...@cs.columbia.edu --- ipc/msg.c |3 +-- ipc/msgutil.c |8 ipc/util.h| 11 ++- 3 files changed, 11

[Devel] Re: [C/R] sleepers don't wake up on restart

2009-04-07 Thread Oren Laadan
for example) after freezing but before checkpoint, it will be lost. If a timer was set at checkpoint, it will not be restored. So depending on your program, you may still experience issues until I add patches to handle that. Oren. Sukadev Bhattiprolu wrote: Oren Laadan [or...@cs.columbia.edu] wrote

[Devel] [RFC v14-rc3][PATCH 32/36] Export fs/exec.c:exec_mmap()

2009-04-07 Thread Oren Laadan
Used in the next patch to attach an existing mm descriptor to a restarting process. Signed-off-by: Oren Laadan or...@cs.columbia.edu --- fs/exec.c |2 +- include/linux/mm.h |3 +++ 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/fs/exec.c b/fs/exec.c index 929b580

[Devel] [RFC v2][PATCH 10/10] sysvipc-msq: restart

2009-04-07 Thread Oren Laadan
The namespace is restored by creating each 'msq' object read from the checkpoint image. Message of a specific queue are first read and chained together on a temporary list, and once done are attached atomically as a whole to the newly created message queue ('msq'). Signed-off-by: Oren Laadan

[Devel] [RFC v14-rc3][PATCH 22/36] Prepare to support shared memory

2009-04-07 Thread Oren Laadan
-by: Oren Laadan or...@cs.columbia.edu --- include/linux/mm.h | 14 ++ mm/shmem.c | 15 ++- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 065cdf8..e9bdc00 100644 --- a/include/linux/mm.h +++ b

[Devel] [RFC v2][PATCH 09/10] sysvipc-msq: checkpoint

2009-04-07 Thread Oren Laadan
) data on that queue. Writing the message contents themselves is straight forward. The code is similar to that in ipc/msgutil.c, the main difference being that we deal with kernel memory and not user memory. Signed-off-by: Oren Laadan or...@cs.columbia.edu --- checkpoint/util_ipc.c |9

[Devel] [RFC v14-rc3][PATCH 33/36] Support for share memory address spaces

2009-04-07 Thread Oren Laadan
restore if it's a new instance, otherwise use the one already registered in the objhash. Signed-off-by: Oren Laadan or...@cs.columbia.edu --- checkpoint/ckpt_mem.c | 36 +++- checkpoint/objhash.c |6 ++ checkpoint/rstr_mem.c | 31

[Devel] [RFC v14-rc3][PATCH 20/36] Restore open pipes

2009-04-07 Thread Oren Laadan
the data from the image file and then write it into the pipe, or use splice() syscall). Changelog[v14]: - Discard the 'h.parent' field - Check whether calls to cr_hbuf_get() fail Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com --- checkpoint

[Devel] [RFC v14-rc3][PATCH 24/36] Restore anonymous- and file-mapped- shared memory

2009-04-07 Thread Oren Laadan
to virtual addresses). Changelog[v14]: - Introduce patch Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com --- checkpoint/rstr_mem.c | 226 +--- include/linux/checkpoint.h |1 + 2 files changed, 172 insertions

[Devel] [RFC v14-rc3][PATCH 15/36] c/r of restart-blocks

2009-04-07 Thread Oren Laadan
for the task to execute the signal handler (by faking a signal). The handler, in turn, already has the code to handle these restart request gracefully. Signed-off-by: Oren Laadan or...@cs.columbia.edu --- arch/x86/mm/checkpoint.c |6 +- arch/x86/mm/restart.c | 32 ++- checkpoint

[Devel] [RFC v14-rc3][PATCH 23/36] Dump anonymous- and file-mapped- shared memory

2009-04-07 Thread Oren Laadan
_indices_ (page nr) into the backing inode. Changelog[v14]: - Introduce patch Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com --- checkpoint/ckpt_mem.c | 283 ++-- checkpoint/rstr_mem.c |2

[Devel] [RFC v14-rc3][PATCH 26/36] c/r: Add CR_COPY() macro (v4)

2009-04-07 Thread Oren Laadan
to help copying register arrays, etc . Move the macro definitions inside the CR #ifdef Feb 25: . Changed WARN_ON() to BUILD_BUG_ON() Signed-off-by: Dan Smith da...@us.ibm.com Signed-off-by: Oren Laadan or...@cs.columbia.edu 1: https://lists.linux

[Devel] [RFC v14-rc3][PATCH 36/36] Stub implementation of IPC namespace c/r

2009-04-07 Thread Oren Laadan
From: Dan Smith da...@us.ibm.com Changes: - Update to match UTS changes Signed-off-by: Dan Smith da...@us.ibm.com Signed-off-by: Oren Laadan or...@cs.columbia.edu --- checkpoint/checkpoint.c|2 - checkpoint/ckpt_task.c | 20 -- checkpoint/objhash.c

[Devel] [RFC v14-rc3][PATCH 34/36] Make cr_may_checkpoint_task() check each namespace individually

2009-04-07 Thread Oren Laadan
From: Dan Smith da...@us.ibm.com Signed-off-by: Dan Smith da...@us.ibm.com Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com --- checkpoint/checkpoint.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/checkpoint

[Devel] [RFC v14-rc3][PATCH 07/36] Restore memory address space

2009-04-07 Thread Oren Laadan
- Memory restore now maps user pages explicitly to copy data into them, instead of reading directly to user space; got rid of mprotect_fixup() Changelog[v4]: - Use standard list_... for cr_pgarr Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com Signed-off

[Devel] [RFC v14-rc3][PATCH 06/36] Dump memory address space

2009-04-07 Thread Oren Laadan
format (and code) to allow chunks of vaddrs, pages instead of one long list of each - Fix use of follow_page() to avoid faulting in non-present pages Changelog[v4]: - Use standard list_... for cr_pgarr Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com

[Devel] [RFC v14-rc3][PATCH 25/36] s390: Expose a constant for the number of words representing the CRs

2009-04-07 Thread Oren Laadan
We need to use this value in the checkpoint/restart code and would like to have a constant instead of a magic '3'. Changelog: Mar 30: . Add CHECKPOINT_SUPPORT in Kconfig (Nathan Lynch) Mar 03: . Picked up additional use of magic '3' in ptrace.h Signed-off-by: Dan

[Devel] [RFC v14-rc3][PATCH 30/36] powerpc: wire up checkpoint and restart syscalls

2009-04-07 Thread Oren Laadan
From: Nathan Lynch n...@pobox.com Signed-off-by: Nathan Lynch n...@pobox.com --- arch/powerpc/include/asm/systbl.h |2 ++ arch/powerpc/include/asm/unistd.h |4 +++- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/systbl.h

[Devel] [RFC v14-rc3][PATCH 35/36] c/r: Add UTS support (v6)

2009-04-07 Thread Oren Laadan
to reflect new location of namespace info - Support checkpoint and restart of nested UTS namespaces Signed-off-by: Dan Smith da...@us.ibm.com Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com --- Documentation/checkpoint/internals.txt |1 + checkpoint

[Devel] [RFC v14-rc3][PATCH 29/36] powerpc: checkpoint/restart implementation

2009-04-07 Thread Oren Laadan
/include/asm/checkpoint_hdr.h @@ -0,0 +1,15 @@ +#ifndef __ASM_PPC_CKPT_HDR_H +#define __ASM_PPC_CKPT_HDR_H +/* + * Checkpoint/restart - architecture specific headers ppc + * + * Copyright (C) 2008 Oren Laadan + * + * This file is subject to the terms and conditions of the GNU General Public

[Devel] [RFC v14-rc3][PATCH 28/36] powerpc: provide APIs for validating and updating DABR

2009-04-07 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-rc3][PATCH 31/36] powerpc: enable checkpoint support in Kconfig

2009-04-07 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-rc3][PATCH 27/36] s390: define s390-specific checkpoint-restart code (v7)

2009-04-07 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: [RFC v14-rc3][PATCH 15/36] c/r of restart-blocks

2009-04-07 Thread Oren Laadan
Dan Smith wrote: OL +int cr_retval_restart(struct cr_ctx *ctx) OL +{ OL + struct pt_regs *regs = task_pt_regs(current); OL + int ret = 0; OL + OL + /* OL + * The retval should be either zero if the checkpointed task OL + * had been in user-space when frozen, or the retval from the OL

[Devel] Re: [RFC v14-rc3][PATCH 33/36] Support for share memory address spaces

2009-04-09 Thread Oren Laadan
Serge E. Hallyn wrote: Quoting Oren Laadan (or...@cs.columbia.edu): The task address space (task-mm) may be shared between processes if CLONE_VM is used, and particularly among threads. Accordingly, treat 'task-mm' as a shared object: during checkpoint check against the objhash and only

[Devel] Re: [RFC v14-rc3][PATCH 33/36] Support for share memory address spaces

2009-04-09 Thread Oren Laadan
On Thu, 9 Apr 2009, Serge E. Hallyn wrote: Quoting Oren Laadan (or...@cs.columbia.edu): Serge E. Hallyn wrote: Quoting Oren Laadan (or...@cs.columbia.edu): The task address space (task-mm) may be shared between processes if CLONE_VM is used, and particularly among threads

[Devel] Re: [PATCH] Add a multi-process IPC test

2009-04-11 Thread Oren Laadan
Serge E. Hallyn wrote: Quoting Dan Smith (da...@us.ibm.com): This test forks off several children in various states to ensure that the IPC namespace information is properly restored after restart. Thanks, Dan. I've got a few other simple c/r tests collected which I want to automate in

[Devel] Re: [PATCH] Add a multi-process IPC test

2009-04-11 Thread Oren Laadan
Thanks, added to user-cr.git for next version. Oren. Dan Smith wrote: This test forks off several children in various states to ensure that the IPC namespace information is properly restored after restart. Cc: or...@cs.columbia.edu Signed-off-by: Dan Smith da...@us.ibm.com --- Makefile

[Devel] Re: [PATCH] c/r: Fix arch-specific use of mm-context.vdso in v14-rc3

2009-04-11 Thread Oren Laadan
Added. Dan Smith wrote: On s390 and PPC, the mm_context does not have a void *vdso member, but rather an unsigned long vdso_base. Since we cast the void * to an unsigned long anyway, add an arch-specific cr_arch_vdso() function to return the address. This is tested on s390 and x86, but

[Devel] Re: [C/R]: mktree.c: cr_set_creator() question

2009-04-11 Thread Oren Laadan
On Wed, 8 Apr 2009, Sukadev Bhattiprolu wrote: Indeed the bug was that cr_placeholder_task() forgot to also set 'session-phantom = holder'. This fixes the crash (added to next version). diff --git a/mktree.c b/mktree.c index 08cd56a..2e0705d 100644 --- a/mktree.c +++ b/mktree.c @@ -540,6 +540,10

[Devel] Re: [RFC v14-rc3][PATCH 11/36] add generic checkpoint f_op to ext fses

2009-04-11 Thread Oren Laadan
Serge E. Hallyn wrote: Quoting Serge E. Hallyn (se...@us.ibm.com): Quoting Oren Laadan (or...@cs.columbia.edu): From: Dave Hansen d...@linux.vnet.ibm.com This marks ext[234] as being checkpointable. There will be many more to do this to, but this is a start. Signed-off-by: Dave Hansen d

[Devel] Re: [RFC v14-rc3][PATCH 36/36] Stub implementation of IPC namespace c/r

2009-04-11 Thread Oren Laadan
Serge E. Hallyn wrote: Quoting Oren Laadan (or...@cs.columbia.edu): From: Dan Smith da...@us.ibm.com Changes: - Update to match UTS changes Signed-off-by: Dan Smith da...@us.ibm.com Signed-off-by: Oren Laadan or...@cs.columbia.edu Acked-by: Serge Hallyn se...@us.ibm.com However

[Devel] Re: [RFC v2][PATCH 01/10] Infrastructure for work postponed to the end of checkpoint/restart

2009-04-13 Thread Oren Laadan
Serge E. Hallyn wrote: Quoting Oren Laadan (or...@cs.columbia.edu): --- a/checkpoint/Makefile +++ b/checkpoint/Makefile @@ -2,8 +2,8 @@ # Makefile for linux checkpoint/restart. # -obj-$(CONFIG_CHECKPOINT) += sys.o objhash.o \ +obj-$(CONFIG_CHECKPOINT) += sys.o objhash.o deferqueue.o

[Devel] Re: [PATCH] Make tst_ipcshm_multi automatable

2009-04-13 Thread Oren Laadan
thanks ... added. Dan Smith wrote: Add a little to tst_ipcshm_multi to make it automatically validate the results and return a pass/fail status indication for automated runs. Since Oren said he applied my previous patch to his repository, I'm sending this as a delta from the last one I

[Devel] Creating tasks on restart: userspace vs kernel

2009-04-13 Thread Oren Laadan
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 approaches are similar in that all restarting tasks end up calling the

[Devel] Re: [PATCH 00/30] C/R OpenVZ/Virtuozzo style

2009-04-13 Thread Oren Laadan
Alexey Dobriyan wrote: On Thu, Apr 09, 2009 at 10:07:11PM -0700, Dave Hansen wrote: I'm curious how you see these fitting in with the work that we've been doing with Oren. Do you mean to just start a discussion or are you really proposing these as an alternative to what Oren has been

[Devel] Re: [PATCH 10/30] cr: core stuff

2009-04-13 Thread Oren Laadan
Alexey Dobriyan wrote: * add struct file_operations::checkpoint The point of hook is to serialize enough information to allow restoration of an opened file. The idea (good one!) is that the code which supplies struct file_operations know better what to do with file. Actually,

[Devel] Re: [PATCH 00/30] C/R OpenVZ/Virtuozzo style

2009-04-13 Thread Oren Laadan
Some meta comments about this patch set: * Patches 1-9 are cleanups, unrelated to checkpoint/restart. They deserve a separate thread. * You barely take locks or reference counts to objects that you later refer to. What if something really bad happens ? * (contd) If you don't take locks, then

[Devel] Re: [PATCH 10/30] cr: core stuff

2009-04-13 Thread Oren Laadan
Hi, Serge E. Hallyn wrote: Quoting Alexey Dobriyan (adobri...@gmail.com): Hi Alexey, as far as I can see, the main differences between this patch and the equivalent in Oren's tree are: 1. kernel auto-selects container init to freeze Actually, this eliminates the possibility to

[Devel] Re: [PATCH] Remove READ_IMPLIES_EXEC during restart

2009-04-14 Thread Oren Laadan
Oren Laadan wrote: Serge E. Hallyn wrote: Quoting Dan Smith (da...@us.ibm.com): On s390, all tasks have READ_IMPLIES_EXEC set in current-personality, which causes the restart process to map things like the stack and heap as executable. During the restart process, remove this bit

[Devel] Re: [RFC v2][PATCH 01/10] Infrastructure for work postponed to the end of checkpoint/restart

2009-04-14 Thread Oren Laadan
Serge E. Hallyn wrote: Quoting Oren Laadan (or...@cs.columbia.edu): Serge E. Hallyn wrote: Quoting Oren Laadan (or...@cs.columbia.edu): --- a/checkpoint/Makefile +++ b/checkpoint/Makefile @@ -2,8 +2,8 @@ # Makefile for linux checkpoint/restart. # -obj-$(CONFIG_CHECKPOINT) += sys.o

[Devel] Re: [PATCH] Make tst_ipcshm_multi automatable

2009-04-14 Thread Oren Laadan
Dan Smith wrote: Add a little to tst_ipcshm_multi to make it automatically validate the results and return a pass/fail status indication for automated runs. Since Oren said he applied my previous patch to his repository, I'm sending this as a delta from the last one I sent[1]. Since the

[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

[Devel] Re: [PATCH 10/30] cr: core stuff

2009-04-14 Thread Oren Laadan
Alexey Dobriyan wrote: On Tue, Apr 14, 2009 at 01:22:03AM -0400, Oren Laadan wrote: Alexey Dobriyan wrote: * add struct file_operations::checkpoint The point of hook is to serialize enough information to allow restoration of an opened file. The idea (good one!) is that the code

[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: [PATCH 00/30] C/R OpenVZ/Virtuozzo style

2009-04-14 Thread Oren Laadan
Alexey Dobriyan wrote: On Tue, Apr 14, 2009 at 02:08:21PM -0400, Oren Laadan wrote: Alexey Dobriyan wrote: On Tue, Apr 14, 2009 at 12:26:50AM -0400, Oren Laadan wrote: Alexey Dobriyan wrote: On Thu, Apr 09, 2009 at 10:07:11PM -0700, Dave Hansen wrote: I'm curious how you see these fitting

[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: C/R without leaks

2009-04-16 Thread Oren Laadan
Chris Friesen wrote: Alexey Dobriyan wrote: On Thu, Apr 16, 2009 at 12:42:17AM +0200, Greg Kurz wrote: On Wed, 2009-04-15 at 23:56 +0400, Alexey Dobriyan wrote: There are sockets and live netns as the most complex example. I'm not prepared to describe it exactly, but people wishing to do

[Devel] Re: C/R without leaks

2009-04-17 Thread Oren Laadan
Greg Kurz wrote: On Thu, 2009-04-16 at 14:39 -0400, Oren Laadan wrote: Any connection in that case is, of course, lost, and it's up to the application to do something about it. If the application relies on the state of the connection, it will have to give up (e.g. sshd, and ssh, die

[Devel] Re: [PATCH 3/4] deferqueue: generic queue to defer work

2009-04-17 Thread Oren Laadan
action until later (but not arbitrarily later) _in the restart_ operation. Signed-off-by: Oren Laadan or...@cs.columbia.edu Signed-off-by: Serge E. Hallyn se...@us.ibm.com --- checkpoint/Kconfig |5 ++ include/linux/deferqueue.h | 31 ++ kernel/Makefile

[Devel] Re: [PATCH 1/1] cr: define CHECKPOINT_SUBTREE flag and sysctl

2009-04-27 Thread Oren Laadan
Serge E. Hallyn wrote: Hey Alexey and Oren, here is my proposal for a patch on top of Oren's tree to do the leak checking by default (basically the same way it was done in Alexey's patchset). It also by default explicitly requires CAP_SYS_ADMIN for both checkpoint and restart. I think

[Devel] [RFC v14][PATCH 01/54] Create syscalls: sys_checkpoint, sys_restart

2009-04-28 Thread Oren Laadan
self. Changelog[v14]: - Change CONFIG_CHEKCPOINT_RESTART to CONFIG_CHECKPOINT (Ingo) - Remove line 'def_bool n' (default is already 'n') - Add CHECKPOINT_SUPPORT in Kconfig (Nathan Lynch) Changelog[v5]: - Config is 'def_bool n' by default Signed-off-by: Oren Laadan or...@cs.columbia.edu

<    1   2   3   4   5   6   7   8   9   10   >