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

2009-04-02 Thread Serge E. Hallyn
Quoting Oren Laadan (or...@cs.columbia.edu): The bulk of the work is in cr_read_vma(), which has been refactored: the part that create the suitable 'struct file *' for the mapping is now larger and moved to a separate function. What's left is to read the VMA description, get the file pointer,

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

2009-04-02 Thread Serge E. Hallyn
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; int id, err;

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

2009-04-02 Thread Serge E. Hallyn
Quoting Dan Smith (da...@us.ibm.com): +static int cr_restore_utsns(struct cr_ctx *ctx, int ref) +{ + struct uts_namespace *uts; + int ret; + + uts = cr_obj_get_by_ref(ctx, ref, CR_OBJ_UTSNS); + if (uts == NULL) { + ret = cr_read_utsns(ctx, current); +

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

2009-04-02 Thread Serge E. Hallyn
Quoting Dan Smith (da...@us.ibm.com): Cc: or...@cs.columbia.edu Signed-off-by: Dan Smith da...@us.ibm.com Acked-by: Serge Hallyn se...@us.ibm.com --- checkpoint/checkpoint.c | 15 +-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/checkpoint/checkpoint.c

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

2009-04-02 Thread Dan Smith
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, then further down you do

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

2009-04-02 Thread Serge E. Hallyn
Quoting Dan Smith (da...@us.ibm.com): 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

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

2009-04-02 Thread Dan Smith
+uts = cr_obj_add_ptr(ctx, nsp-uts_ns, hh-uts_ref, CR_OBJ_UTSNS, 0); SH I would prefer this be called 'uts_was_new' or something, though. Fair enough. I was trying to avoid wrapping that line :) SH Should probably memset them to 0 first. I realize it doesn't SH really seem like

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

2009-04-02 Thread Serge E. Hallyn
Quoting Dan Smith (da...@us.ibm.com): Changes: - Update to match UTS changes Signed-off-by: Dan Smith da...@us.ibm.com Acked-by: Serge Hallyn se...@us.ibm.com Oren, I will wait until you rebase your IPC patches on top of these patches before reviewing them more, if that's ok. +static int

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

2009-04-02 Thread Dan Smith
SH Actually, I think you must make sure the user didn't slip in a SH nodename_len which was sizeof(ns-name.nodename). Indeed, thanks. -- Dan Smith IBM Linux Technology Center email: da...@us.ibm.com ___ Containers mailing list

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

2009-04-02 Thread Serge E. Hallyn
Quoting Dan Smith (da...@us.ibm.com): 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

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

2009-04-02 Thread Serge E. Hallyn
Quoting Dan Smith (da...@us.ibm.com): SH #define CR_COPY_ARRAY(op, SAVE, LIVE, count) \ SH do {\ SH __must_be_array(SAVE); \ SH

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

2009-04-02 Thread Dan Smith
+ +/* + * Copy @count items from @LIVE to @SAVE if op is CR_CPT (otherwise, + * copy in the reverse direction) + */ +#define CR_COPY_ARRAY(op, SAVE, LIVE, count) \ +do {\ +

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

2009-04-02 Thread Dan Smith
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... -- Dan Smith IBM Linux Technology Center email: da...@us.ibm.com Signed-off-by: Dan Smith da...@us.ibm.com

[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: [C/R] sleepers don't wake up on restart

2009-04-02 Thread Sukadev Bhattiprolu
Oren Laadan [or...@cs.columbia.edu] wrote: | | Suka, | | can you please post the entire test program so I can try to reproduce | it here ? Sure. Attached. Suka #include stdio.h #include unistd.h #include wait.h #include errno.h #define NUM_PROCS 10 #define CKPT_READY ckpt-ready #define

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

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

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

2009-04-02 Thread Matt Helsley
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 description. Cheers,

[Devel] Re: [RFC v14-rc2][PATCH 4/7] sysvipc-shm: restart

2009-04-02 Thread Matt Helsley
On Tue, Mar 31, 2009 at 01:32:29AM -0400, Oren Laadan wrote: Like chekcpoint, restart of sysvipc shared memory is also performed in two steps: first, the entire ipc namespace is restored as a whole, by restoring each shm object read from the checkpoint image. The shmem's file pointer is