[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation

2010-03-03 Thread KAMEZAWA Hiroyuki
On Wed, 3 Mar 2010 15:15:49 +0900 KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: Agreed. Let's try how we can write a code in clean way. (we have time ;) For now, to me, IRQ disabling while lock_page_cgroup() seems to be a little over killing. What I really want is lockless

[Devel] Re: [RFC][PATCH] ns: Syscalls for better namespace sharing control.

2010-03-03 Thread Serge E. Hallyn
Quoting Eric W. Biederman (ebied...@xmission.com): Sukadev Bhattiprolu suka...@linux.vnet.ibm.com writes: Eric W. Biederman [ebied...@xmission.com] wrote: | | I think replacing a struct pid for another struct pid allocated in | descendant pid_namespace (but has all of the same struct

[Devel] Re: [PATCH] c/r: fix regression (in fix scheduling in atomic while restoring ipc shm)

2010-03-03 Thread Serge E. Hallyn
Quoting Oren Laadan (or...@cs.columbia.edu): So... here's a simple fix to a silly regression - this should bring an end to my little fiasco. Signed-off-by: Oren Laadan or...@cs.columbia.edu Tested-by: Serge Hallyn se...@us.ibm.com --- ipc/checkpoint_msg.c |2 +-

[Devel] Re: selinux prevents msgrcv on restore message queues?

2010-03-03 Thread Nathan Lynch
On Tue, 2010-03-02 at 19:19 -0600, Serge E. Hallyn wrote: Quoting Serge E. Hallyn (se...@us.ibm.com): Quoting Nathan Lynch (n...@pobox.com): Hi, With ckpt-v19-rc3 the test-mq.sh testcase in cr_tests fails when SELinux is enabled on my test system (64-bit powerpc kernel). The

[Devel] Re: [RFC][PATCH] ns: Syscalls for better namespace sharing control.

2010-03-03 Thread Eric W. Biederman
Serge E. Hallyn se...@us.ibm.com writes: Quoting Eric W. Biederman (ebied...@xmission.com): Sukadev Bhattiprolu suka...@linux.vnet.ibm.com writes: Eric W. Biederman [ebied...@xmission.com] wrote: | | I think replacing a struct pid for another struct pid allocated in | descendant

[Devel] Re: selinux prevents msgrcv on restore message queues?

2010-03-03 Thread Serge E. Hallyn
Quoting Nathan Lynch (n...@pobox.com): On Tue, 2010-03-02 at 19:19 -0600, Serge E. Hallyn wrote: Quoting Serge E. Hallyn (se...@us.ibm.com): Quoting Nathan Lynch (n...@pobox.com): Hi, With ckpt-v19-rc3 the test-mq.sh testcase in cr_tests fails when SELinux is enabled on my

[Devel] Re: [RFC][PATCH] ns: Syscalls for better namespace sharing control. v2

2010-03-03 Thread Jonathan Corbet
Quick question: +void set_namespace(unsigned long nstype, void *ns) +{ + struct task_struct *tsk = current; + struct nsproxy *new_nsproxy; + + new_nsproxy = create_new_namespaces(0, tsk, tsk-fs); + switch(nstype) { + case NSTYPE_NET: +

[Devel] [PATCH] c/r: fix ipc scheduling while atomic - take 3

2010-03-03 Thread Oren Laadan
This patch applies to the current head of ckpt-v19-dev. While the previous fix was correct, it was incomplete in the sense that a similar problem exists during checkpoint. So here is a better attempt at fixing both. The main idea is that holding the {shm,msg,sem}ids-rw_mutex is enough at

[Devel] Re: [RFC][PATCH] ns: Syscalls for better namespace sharing control. v2

2010-03-03 Thread Eric W. Biederman
Jonathan Corbet cor...@lwn.net writes: Quick question: +void set_namespace(unsigned long nstype, void *ns) +{ +struct task_struct *tsk = current; +struct nsproxy *new_nsproxy; + +new_nsproxy = create_new_namespaces(0, tsk, tsk-fs); +switch(nstype) { +case NSTYPE_NET:

[Devel] Re: [RFC][PATCH] ns: Syscalls for better namespace sharing control.

2010-03-03 Thread Oren Laadan
Daniel Lezcano wrote: Eric W. Biederman wrote: Pavel Emelyanov xe...@parallels.com writes: Eric W. Biederman wrote: Pavel Emelyanov xe...@parallels.com writes: Eric W. Biederman wrote: Pavel Emelyanov xe...@parallels.com writes: Thanks. What's the problem with setns? joining a

[Devel] Re: selinux prevents msgrcv on restore message queues?

2010-03-03 Thread Nathan Lynch
On Wed, 2010-03-03 at 13:49 -0600, Serge E. Hallyn wrote: Quoting Nathan Lynch (n...@pobox.com): On Tue, 2010-03-02 at 19:19 -0600, Serge E. Hallyn wrote: Can you try the following patch? Also, to actually restore the LSM labels you need to add -k to your restart flags, but without

[Devel] Re: [PATCH] c/r: fix ipc scheduling while atomic - take 3

2010-03-03 Thread Serge E. Hallyn
Quoting Oren Laadan (or...@cs.columbia.edu): This patch applies to the current head of ckpt-v19-dev. While the previous fix was correct, it was incomplete in the sense that a similar problem exists during checkpoint. So here is a better attempt at fixing both. The main idea is that

[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation

2010-03-03 Thread Daisuke Nishimura
On Wed, 3 Mar 2010 23:03:19 +0100, Andrea Righi ari...@develer.com wrote: On Wed, Mar 03, 2010 at 05:21:32PM +0900, KAMEZAWA Hiroyuki wrote: On Wed, 3 Mar 2010 15:15:49 +0900 KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: Agreed. Let's try how we can write a code in clean

[Devel] Re: selinux prevents msgrcv on restore message queues?

2010-03-03 Thread Serge E. Hallyn
Quoting Nathan Lynch (n...@pobox.com): On Wed, 2010-03-03 at 13:49 -0600, Serge E. Hallyn wrote: Quoting Nathan Lynch (n...@pobox.com): On Tue, 2010-03-02 at 19:19 -0600, Serge E. Hallyn wrote: Can you try the following patch? Also, to actually restore the LSM labels you need to

[Devel] Re: selinux prevents msgrcv on restore message queues?

2010-03-03 Thread Nathan Lynch
On Wed, 2010-03-03 at 17:44 -0600, Serge E. Hallyn wrote: Quoting Nathan Lynch (n...@pobox.com): On Wed, 2010-03-03 at 13:49 -0600, Serge E. Hallyn wrote: Quoting Nathan Lynch (n...@pobox.com): On Tue, 2010-03-02 at 19:19 -0600, Serge E. Hallyn wrote: Can you try the following

[Devel] Re: selinux prevents msgrcv on restore message queues?

2010-03-03 Thread Serge E. Hallyn
Quoting Nathan Lynch (n...@pobox.com): On Wed, 2010-03-03 at 17:44 -0600, Serge E. Hallyn wrote: Quoting Nathan Lynch (n...@pobox.com): On Wed, 2010-03-03 at 13:49 -0600, Serge E. Hallyn wrote: Quoting Nathan Lynch (n...@pobox.com): On Tue, 2010-03-02 at 19:19 -0600, Serge E. Hallyn

[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation

2010-03-03 Thread KAMEZAWA Hiroyuki
On Wed, 3 Mar 2010 23:03:19 +0100 Andrea Righi ari...@develer.com wrote: On Wed, Mar 03, 2010 at 05:21:32PM +0900, KAMEZAWA Hiroyuki wrote: On Wed, 3 Mar 2010 15:15:49 +0900 KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: + preempt_disable(); + lock_page_cgroup_migrate(pc);

[Devel] [PATCH 00/13][user-cr]: Cleanups checkpoint.c, restart.c

2010-03-03 Thread Sukadev Bhattiprolu
[PATCH 00/13][user-cr]: Cleanups checkpoint.c, restart.c These patches perform some cleanups/reorg of the code in checkpoint.c and restart.c files. These changes remove redundant fields in data structures, rename some fields/functions and avoid directly using stdout/stderr. The changes will

[Devel] [PATCH 02/13][user-cr]: restart: Rename args-logfd

2010-03-03 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Mon, 1 Mar 2010 18:24:51 -0800 Subject: [PATCH 02/13][user-cr]: restart: Rename args-logfd User-space restart code needs at least two different log files. The restart() system call code in the kernel writes useful messages to one

[Devel] Re: [PATCH 00/13][user-cr]: Cleanups checkpoint.c, restart.c

2010-03-03 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Mon, 1 Mar 2010 18:19:44 -0800 Subject: [PATCH 01/13][user-cr]: restart: Remove args-no_pidns. args-no_pidns does not really need to be a field in the 'args' structure. It is used to validate command line arguments and can just be a

[Devel] [PATCH 03/13][user-cr]: restart: Remove args-logfile

2010-03-03 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Mon, 1 Mar 2010 18:45:59 -0800 Subject: [PATCH 03/13][user-cr]: restart: Remove args-logfile The args-logfile field is used to store the the name of the logfile to which the kernel must write its output. If we move the code that opens

[Devel] [PATCH 04/13][user-cr]: restart: Use ckpt_msg() to log

2010-03-03 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Mon, 1 Mar 2010 20:04:12 -0800 Subject: [PATCH 04/13][user-cr]: restart: Use ckpt_msg() to log Rather than implicitly redirecting messages to 'stdout' or 'stderr' use global variables, 'global_ulogfd' and 'global_uerrfd'. That would make

[Devel] [PATCH 08/13][user-cr]: restart: Rename struct args.

2010-03-03 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Mon, 1 Mar 2010 20:33:36 -0800 Subject: [PATCH 08/13][user-cr]: restart: Rename struct args. Rename 'struct args' in restart.c to 'struct app_restart_args'. This would enable us to distinguish this struct from the 'struct args' in

[Devel] [PATCH 05/13][user-cr]: restart: Use ckpt_perror()

2010-03-03 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Mon, 1 Mar 2010 20:18:31 -0800 Subject: [PATCH 05/13][user-cr]: restart: Use ckpt_perror() Remove the implicit dependency on 'stderr' and redirect messages to global_uerrfd. This would simplify implementing command line options for these

[Devel] [PATCH 06/13][user-cr]: restart: Remove args-input

2010-03-03 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Mon, 1 Mar 2010 20:24:15 -0800 Subject: [PATCH 06/13][user-cr]: restart: Remove args-input Having both -input and -infd in 'struct args' is redundant. The args-input field is used to store the name of the input file (checkpoint-image).

[Devel] [PATCH 07/13][user-cr]: Define app_restart()

2010-03-03 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Tue, 2 Mar 2010 09:29:55 -0800 Subject: [PATCH 07/13][user-cr]: Define app_restart() Move the bulk of code that implements application restart into a separate function, and make main() a wrapper to that function. This would help export

[Devel] [PATCH 09/13][user-cr]: checkpoint: Remove args-output

2010-03-03 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Wed, 3 Mar 2010 10:49:19 -0800 Subject: [PATCH 09/13][user-cr]: checkpoint: Remove args-output 'struct args' has both an 'outfd' and an 'output' field. The -output field is only needed to parse arguments and by moving the open of the

[Devel] [PATCH 10/13][user-cr]: checkpoint: Remove -logfile

2010-03-03 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Wed, 3 Mar 2010 11:03:52 -0800 Subject: [PATCH 10/13][user-cr]: checkpoint: Remove -logfile 'struct args' has both an 'logfd' and a 'logfile' field. The -logfile field is only needed to parse arguments and by moving the open of the

[Devel] [PATCH 11/13][user-cr]: checkpoint: Rename struct args

2010-03-03 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Wed, 3 Mar 2010 11:24:54 -0800 Subject: [PATCH 11/13][user-cr]: checkpoint: Rename struct args Rename 'struct args' in checkpoint.c to 'struct app_checkpoint_args'. This would give the struct a more specific name when checkpoint/restart

[Devel] [PATCH 12/13][user-cr]: Define app_checkpoint()

2010-03-03 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Wed, 3 Mar 2010 11:35:47 -0800 Subject: [PATCH 12/13][user-cr]: Define app_checkpoint() Move the bulk of the code that implements application checkpoint into a separate function, app_checkpoint() and make a main() a wrapper to that

[Devel] [PATCH 13/13][user-cr]: checkpoint: Use ckpt_perror()

2010-03-03 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Wed, 3 Mar 2010 15:22:47 -0800 Subject: [PATCH 13/13] checkpoint: Use ckpt_perror() Remove the implicit dependency on 'stderr' and redirect messages to global_uerrfd. This would simplify implementing command line options for these file