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

2010-03-02 Thread KAMEZAWA Hiroyuki
On Wed, 3 Mar 2010 15:01:37 +0900 Daisuke Nishimura wrote: > On Wed, 3 Mar 2010 12:29:06 +0900, KAMEZAWA Hiroyuki > wrote: > > On Wed, 3 Mar 2010 11:12:38 +0900 > > Daisuke Nishimura wrote: > > > > > > diff --git a/mm/filemap.c b/mm/filemap.c > > > > index fe09e51..f85acae 100644 > > > > ---

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

2010-03-02 Thread Daisuke Nishimura
On Wed, 3 Mar 2010 12:29:06 +0900, KAMEZAWA Hiroyuki wrote: > On Wed, 3 Mar 2010 11:12:38 +0900 > Daisuke Nishimura wrote: > > > > diff --git a/mm/filemap.c b/mm/filemap.c > > > index fe09e51..f85acae 100644 > > > --- a/mm/filemap.c > > > +++ b/mm/filemap.c > > > @@ -135,6 +135,7 @@ void __remo

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

2010-03-02 Thread KAMEZAWA Hiroyuki
On Wed, 3 Mar 2010 11:12:38 +0900 Daisuke Nishimura wrote: > > diff --git a/mm/filemap.c b/mm/filemap.c > > index fe09e51..f85acae 100644 > > --- a/mm/filemap.c > > +++ b/mm/filemap.c > > @@ -135,6 +135,7 @@ void __remove_from_page_cache(struct page *page) > > * having removed the page entir

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

2010-03-02 Thread Daisuke Nishimura
> diff --git a/mm/filemap.c b/mm/filemap.c > index fe09e51..f85acae 100644 > --- a/mm/filemap.c > +++ b/mm/filemap.c > @@ -135,6 +135,7 @@ void __remove_from_page_cache(struct page *page) >* having removed the page entirely. >*/ > if (PageDirty(page) && mapping_cap_account_dir

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

2010-03-02 Thread Serge E. Hallyn
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 testcase > > sleeps in do_msgrcv after restart and never wake

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

2010-03-02 Thread Serge E. Hallyn
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 testcase > sleeps in do_msgrcv after restart and never wakes up. When SELinux is > disabled, the messages are rece

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

2010-03-02 Thread Eric W. Biederman
Sukadev Bhattiprolu 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 upid values > | as the first struct pid) is a disastrous idea. It destroys the >

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

2010-03-02 Thread Oren Laadan
So... here's a simple fix to a silly regression - this should bring an end to my little fiasco. Signed-off-by: Oren Laadan --- ipc/checkpoint_msg.c |2 +- ipc/checkpoint_sem.c |2 +- ipc/checkpoint_shm.c |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ipc/check

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

2010-03-02 Thread Sukadev Bhattiprolu
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 upid values | as the first struct pid) is a disastrous idea. It destroys the True. Sorry, I did not mean we would nee

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

2010-03-02 Thread Vivek Goyal
On Tue, Mar 02, 2010 at 11:22:48PM +0100, Andrea Righi wrote: > On Tue, Mar 02, 2010 at 10:05:29AM -0500, Vivek Goyal wrote: > > On Mon, Mar 01, 2010 at 11:18:31PM +0100, Andrea Righi wrote: > > > On Mon, Mar 01, 2010 at 05:02:08PM -0500, Vivek Goyal wrote: > > > > > @@ -686,10 +699,14 @@ void thro

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

2010-03-02 Thread Serge E. Hallyn
Quoting Serge E. Hallyn (se...@us.ibm.com): > Quoting Oren Laadan (or...@cs.columbia.edu): > > > > > > Nikita V. Youshchenko wrote: > > >> Hi Nikita, > > >> > > >> Thanks for the report and the analysis. It actually helped to > > >> pinpoint a couple of other minor issues in the code. This patch

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

2010-03-02 Thread Daisuke Nishimura
On Tue, 2 Mar 2010 23:18:23 +0100, Andrea Righi wrote: > On Tue, Mar 02, 2010 at 07:20:26PM +0530, Balbir Singh wrote: > > * KAMEZAWA Hiroyuki [2010-03-02 17:23:16]: > > > > > On Tue, 2 Mar 2010 09:01:58 +0100 > > > Andrea Righi wrote: > > > > > > > On Tue, Mar 02, 2010 at 09:23:09AM +0900, KA

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

2010-03-02 Thread Serge E. Hallyn
Quoting Oren Laadan (or...@cs.columbia.edu): > > > Nikita V. Youshchenko wrote: > >> Hi Nikita, > >> > >> Thanks for the report and the analysis. It actually helped to > >> pinpoint a couple of other minor issues in the code. This patch > >> should fix all of these. > >> > >> Oren. > > > > Hi Or

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

2010-03-02 Thread Eric W. Biederman
Sukadev Bhattiprolu writes: > Pavel Emelyanov [xe...@parallels.com] wrote: > | > I agree with all the points you and Pavel you talked about but I don't > | > feel comfortable to have the current process to switch the pid namespace > | > because of the process tree hierarchy (what will be the pa

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

2010-03-02 Thread Oren Laadan
Nikita V. Youshchenko wrote: >> Hi Nikita, >> >> Thanks for the report and the analysis. It actually helped to >> pinpoint a couple of other minor issues in the code. This patch >> should fix all of these. >> >> Oren. > > Hi Oren. > > With ckpt-v19 plus this patch applied, we still are getting

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

2010-03-02 Thread Oren Laadan
Serge E. Hallyn wrote: > Quoting Nikita V. Youshchenko (yo...@cs.msu.su): >>> Hi Nikita, >>> >>> Thanks for the report and the analysis. It actually helped to >>> pinpoint a couple of other minor issues in the code. This patch >>> should fix all of these. >>> >>> Oren. >> Hi Oren. >> >> With ckpt

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

2010-03-02 Thread Eric W. Biederman
Jan Engelhardt writes: > On Tuesday 2010-03-02 16:03, Pavel Emelyanov wrote: > >>> I agree with all the points you and Pavel you talked about but I don't >>> feel comfortable to have the current process to switch the pid namespace >>> because of the process tree hierarchy (what will be the pare

[Devel] selinux prevents msgrcv on restore message queues?

2010-03-02 Thread Nathan Lynch
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 testcase sleeps in do_msgrcv after restart and never wakes up. When SELinux is disabled, the messages are received and the testcase passes. I've established tha

[Devel] Re: [PATCH linux-cr] nsproxy: record ambient namespaces

2010-03-02 Thread Serge E. Hallyn
Quoting Oren Laadan (or...@cs.columbia.edu): > > > Serge E. Hallyn wrote: > > Quoting Oren Laadan (or...@cs.columbia.edu): > >> Applied. > >> > >> Serge E. Hallyn wrote: > >>> The nsproxy restore path recognizes that an objref of 0 for > >>> ipc or uts ns means don't unshare it. But the checkpoi

[Devel] Re: [PATCH linux-cr] nsproxy: record ambient namespaces

2010-03-02 Thread Oren Laadan
Serge E. Hallyn wrote: > Quoting Oren Laadan (or...@cs.columbia.edu): >> Applied. >> >> Serge E. Hallyn wrote: >>> The nsproxy restore path recognizes that an objref of 0 for >>> ipc or uts ns means don't unshare it. But the checkpoint side >>> forgot to write down 0 when the ipc or uts ns isn't

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

2010-03-02 Thread Sukadev Bhattiprolu
Pavel Emelyanov [xe...@parallels.com] wrote: | > I agree with all the points you and Pavel you talked about but I don't | > feel comfortable to have the current process to switch the pid namespace | > because of the process tree hierarchy (what will be the parent of the | > process when you ente

[Devel] Re: [trivial PATCH linux-cr] BUG_ON paren mismatch

2010-03-02 Thread Oren Laadan
Yeah .. embarrassing ... I fixed locally already. Serge E. Hallyn wrote: > Signed-off-by: Serge E. Hallyn > --- > mm/mmap.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/mm/mmap.c b/mm/mmap.c > index a188a25..0e8ef05 100644 > --- a/mm/mmap.c > +++ b/mm/mmap.c >

[Devel] Re: [PATCH linux-cr] nsproxy: record ambient namespaces

2010-03-02 Thread Serge E. Hallyn
Quoting Oren Laadan (or...@cs.columbia.edu): > > Applied. > > Serge E. Hallyn wrote: > >The nsproxy restore path recognizes that an objref of 0 for > >ipc or uts ns means don't unshare it. But the checkpoint side > >forgot to write down 0 when the ipc or uts ns isn't unshared! > > > >Fix that. >

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

2010-03-02 Thread Serge E. Hallyn
Quoting Nikita V. Youshchenko (yo...@cs.msu.su): > > Hi Nikita, > > > > Thanks for the report and the analysis. It actually helped to > > pinpoint a couple of other minor issues in the code. This patch > > should fix all of these. > > > > Oren. > > Hi Oren. > > With ckpt-v19 plus this patch appli

[Devel] [trivial PATCH linux-cr] BUG_ON paren mismatch

2010-03-02 Thread Serge E. Hallyn
Signed-off-by: Serge E. Hallyn --- mm/mmap.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index a188a25..0e8ef05 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2403,7 +2403,7 @@ int special_mapping_restore(struct ckpt_ctx *ctx, * requiring t

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

2010-03-02 Thread Trond Myklebust
On Tue, 2010-03-02 at 14:48 +0100, Peter Zijlstra wrote: > unsigned long reclaimable_pages(cgroup) > { > if (mem_cgroup_has_dirty_limit(cgroup)) > return mem_cgroup_page_stat(MEMCG_NR_RECLAIM_PAGES); > > return global_page_state(NR_FILE_DIRTY) + > global_page_state(NR_NFS_UNSTABLE); >

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

2010-03-02 Thread Balbir Singh
* Peter Zijlstra [2010-03-02 14:48:56]: > This is ugly and broken.. I thought you'd agreed to something like: > > if (mem_cgroup_has_dirty_limit(cgroup)) >use mem_cgroup numbers > else >use global numbers > > That allows for a 0 dirty limit (which should work and basically makes > all

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

2010-03-02 Thread Jan Engelhardt
On Tuesday 2010-03-02 16:03, Pavel Emelyanov wrote: >> I agree with all the points you and Pavel you talked about but I don't >> feel comfortable to have the current process to switch the pid namespace >> because of the process tree hierarchy (what will be the parent of the >> process when you

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

2010-03-02 Thread Vivek Goyal
On Mon, Mar 01, 2010 at 11:18:31PM +0100, Andrea Righi wrote: > On Mon, Mar 01, 2010 at 05:02:08PM -0500, Vivek Goyal wrote: > > > @@ -686,10 +699,14 @@ void throttle_vm_writeout(gfp_t gfp_mask) > > > */ > > > dirty_thresh += dirty_thresh / 10; /* wh... *

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

2010-03-02 Thread Nikita V. Youshchenko
> Hi Nikita, > > Thanks for the report and the analysis. It actually helped to > pinpoint a couple of other minor issues in the code. This patch > should fix all of these. > > Oren. Hi Oren. With ckpt-v19 plus this patch applied, we still are getting a kernel crash, with BUG() fired at + ip

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

2010-03-02 Thread Kirill A. Shutemov
On Tue, Mar 2, 2010 at 3:47 PM, Balbir Singh wrote: > * Andrea Righi [2010-03-01 22:23:40]: > >> Apply the cgroup dirty pages accounting and limiting infrastructure to >> the opportune kernel functions. >> >> Signed-off-by: Andrea Righi >> --- >>  fs/fuse/file.c      |    5 +++ >>  fs/nfs/write.

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

2010-03-02 Thread Balbir Singh
* KAMEZAWA Hiroyuki [2010-03-02 17:23:16]: > On Tue, 2 Mar 2010 09:01:58 +0100 > Andrea Righi wrote: > > > On Tue, Mar 02, 2010 at 09:23:09AM +0900, KAMEZAWA Hiroyuki wrote: > > > On Mon, 1 Mar 2010 22:23:40 +0100 > > > Andrea Righi wrote: > > > > > > > Apply the cgroup dirty pages accountin

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

2010-03-02 Thread Peter Zijlstra
On Mon, 2010-03-01 at 22:23 +0100, Andrea Righi wrote: > Apply the cgroup dirty pages accounting and limiting infrastructure to > the opportune kernel functions. > > Signed-off-by: Andrea Righi > --- > diff --git a/mm/page-writeback.c b/mm/page-writeback.c > index 5a0f8f3..d83f41c 100644 > --- a

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

2010-03-02 Thread Balbir Singh
* Andrea Righi [2010-03-01 22:23:40]: > Apply the cgroup dirty pages accounting and limiting infrastructure to > the opportune kernel functions. > > Signed-off-by: Andrea Righi > --- > fs/fuse/file.c |5 +++ > fs/nfs/write.c |4 ++ > fs/nilfs2/segment.c | 10 +- > mm/fi

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

2010-03-02 Thread Cedric Le Goater
On 03/01/2010 10:42 PM, Eric W. Biederman wrote: > I am of two mind about my patches. Right now they are a brilliant > proof of concept that we can name namespaces without needing a > namespace for the names of namespaces, and start to be a practical > solution to the join problem. At the same t

[Devel] Re: [PATCH -mmotm 2/3] memcg: dirty pages accounting and limiting infrastructure

2010-03-02 Thread Balbir Singh
* Andrea Righi [2010-03-01 22:23:39]: > Infrastructure to account dirty pages per cgroup and add dirty limit > interfaces in the cgroupfs: > > - Direct write-out: memory.dirty_ratio, memory.dirty_bytes > > - Background write-out: memory.dirty_background_ratio, > memory.dirty_background_bytes

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

2010-03-02 Thread Kirill A. Shutemov
On Tue, Mar 2, 2010 at 1:02 PM, Andrea Righi wrote: > On Tue, Mar 02, 2010 at 12:11:10PM +0200, Kirill A. Shutemov wrote: >> On Mon, Mar 1, 2010 at 11:23 PM, Andrea Righi wrote: >> > Apply the cgroup dirty pages accounting and limiting infrastructure to >> > the opportune kernel functions. >> > >

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

2010-03-02 Thread Kirill A. Shutemov
On Mon, Mar 1, 2010 at 11:23 PM, Andrea Righi wrote: > Apply the cgroup dirty pages accounting and limiting infrastructure to > the opportune kernel functions. > > Signed-off-by: Andrea Righi > --- >  fs/fuse/file.c      |    5 +++ >  fs/nfs/write.c      |    4 ++ >  fs/nilfs2/segment.c |   10 ++

[Devel] Re: [PATCH -mmotm 2/3] memcg: dirty pages accounting and limiting infrastructure

2010-03-02 Thread Kirill A. Shutemov
On Mon, Mar 1, 2010 at 11:23 PM, Andrea Righi wrote: > Infrastructure to account dirty pages per cgroup and add dirty limit > interfaces in the cgroupfs: > >  - Direct write-out: memory.dirty_ratio, memory.dirty_bytes > >  - Background write-out: memory.dirty_background_ratio, > memory.dirty_back

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

2010-03-02 Thread KAMEZAWA Hiroyuki
On Tue, 2 Mar 2010 09:01:58 +0100 Andrea Righi wrote: > On Tue, Mar 02, 2010 at 09:23:09AM +0900, KAMEZAWA Hiroyuki wrote: > > On Mon, 1 Mar 2010 22:23:40 +0100 > > Andrea Righi wrote: > > > > > Apply the cgroup dirty pages accounting and limiting infrastructure to > > > the opportune kernel f

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

2010-03-02 Thread Daisuke Nishimura
On Tue, 2 Mar 2010 09:01:58 +0100, Andrea Righi wrote: > On Tue, Mar 02, 2010 at 09:23:09AM +0900, KAMEZAWA Hiroyuki wrote: > > On Mon, 1 Mar 2010 22:23:40 +0100 > > Andrea Righi wrote: > > > > > Apply the cgroup dirty pages accounting and limiting infrastructure to > > > the opportune kernel f