[Devel] Re: [PATCH v2 -mmotm 3/4] cgroups: Add simple listener of cgroup events to documentation

2010-02-22 Thread Li Zefan
Kirill A. Shutemov wrote: > An example of cgroup notification API usage. > > Signed-off-by: Kirill A. Shutemov > Reviewed-by: KAMEZAWA Hiroyuki Acked-by: Li Zefan ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-

[Devel] Re: [PATCH v2 -mmotm 2/4] cgroups: remove events before destroying subsystem state objects

2010-02-22 Thread Li Zefan
Kirill A. Shutemov wrote: > Events should be removed after rmdir of cgroup directory, but before > destroying subsystem state objects. Let's take reference to cgroup > directory dentry to do that. > > Signed-off-by: Kirill A. Shutemov > Acked-by: KAMEZAWA Hiroyuki Looks good. Acked-by: Li Zefa

[Devel] Re: [PATCH v2 -mmotm 1/4] cgroups: Fix race between userspace and kernelspace

2010-02-22 Thread Li Zefan
(Late reply for I just came back from a long vacation) Kirill A. Shutemov wrote: > eventfd are used to notify about two types of event: > - control file-specific, like crossing memory threshold; > - cgroup removing. > > To understand what really happen, userspace can check if the cgroup > still

[Devel] Re: [RFC] [PATCH 0/2] memcg: per cgroup dirty limit

2010-02-22 Thread KAMEZAWA Hiroyuki
On Mon, 22 Feb 2010 12:58:33 -0500 Vivek Goyal wrote: > On Mon, Feb 22, 2010 at 11:06:40PM +0530, Balbir Singh wrote: > > * Vivek Goyal [2010-02-22 09:27:45]: > > > > > > > > > > May be we can modify writeback_inodes_wbc() to check first dirty page > > > of the inode. And if it does not b

[Devel] Re: RFC: netfilter: nf_conntrack: add support for "conntrack zones"

2010-02-22 Thread Eric W. Biederman
jamal writes: > On Mon, 2010-02-22 at 12:46 -0800, Eric W. Biederman wrote: >> jamal writes: > >> >> This is one of the long standing issues that we have always known >> we needed to solve, but have not taken the time to do it. Now that >> the need is more real it looks about time to solve thi

[Devel] Linux Checkpoint-Restart - v19

2010-02-22 Thread Oren Laadan
Hi Andrew, We've put a stake in the ground for our next set of checkpoint/restart patches, v19. It has some great new stuff, and we put extra effort to address your concerns. We would like to have the code included in -mm for wider feedback and testing. This one is able to checkpoint/restart scre

[Devel] Re: [PATCH][user-cr]: ckptinfo: Have -v imply -p option

2010-02-22 Thread Oren Laadan
Sukadev Bhattiprolu wrote: > Do we even need the -p option ? It is not used without the -v at present. > Can we drop the -p and have -v print filepos always ? Ok. I'll do that. Oren. > > --- > From: Sukadev Bhattiprolu > Date: Fri, 19 Feb 2010 11:19:08 -0800 > Subject: [PATCH 1/1] ckptinfo:

[Devel] Re: [PATCH user-cr] define MNT_DETACH in older userspace

2010-02-22 Thread Oren Laadan
Thanks, applied. Nathan Lynch wrote: > On Mon, 2010-02-22 at 11:58 -0600, Nathan Lynch wrote: >> Thanks, I had already put together a local fix which adds a compat >> header -- please use this instead of duplicating the work across files? > > Sorry, please use this one instead - fixed include gu

[Devel] Re: RFC: netfilter: nf_conntrack: add support for "conntrack zones"

2010-02-22 Thread jamal
On Mon, 2010-02-22 at 12:46 -0800, Eric W. Biederman wrote: > jamal writes: > > This is one of the long standing issues that we have always known > we needed to solve, but have not taken the time to do it. Now that > the need is more real it looks about time to solve this one. > > There are cu

[Devel] Re: [PATCH 1/2] memcg: dirty pages accounting and limiting infrastructure

2010-02-22 Thread David Rientjes
On Mon, 22 Feb 2010, Andrea Righi wrote: > > Hmm...do we need spinlock ? You use "unsigned long", then, read-write > > is always atomic if not read-modify-write. > > I think I simply copy&paste the memcg->swappiness case. But I agree, > read-write should be atomic. > We don't need memcg->reclai

[Devel] Re: [RFC] [PATCH 0/2] memcg: per cgroup dirty limit

2010-02-22 Thread David Rientjes
On Mon, 22 Feb 2010, Vivek Goyal wrote: > dirty_ratio is easy to configure. One system wide default value works for > all the newly created cgroups. For dirty_bytes, you shall have to > configure each and individual cgroup with a specific value depneding on > what is the upper limit of memory for

[Devel] Re: [PATCH 3/5] Add checkpoint support for veth devices (v2)

2010-02-22 Thread Serge E. Hallyn
Quoting Dan Smith (da...@us.ibm.com): > >> + else if (!ckpt_obj_lookup(ctx, peer->nd_net, CKPT_OBJ_NET_NS)) { > >> + ret = -EINVAL; > >> + ckpt_err(ctx, ret, > >> + "Peer %s of %s not in checkpointed namespaces\n", > >> + peer->name, dev->name)

[Devel] Re: [PATCH 3/5] Add checkpoint support for veth devices (v2)

2010-02-22 Thread Dan Smith
SH> So do you actually know that the peer's netns will have been SH> checkpointed? I'm a little fuzzy about where netns and netdevs SH> are checkpointed. If you have two private netns's in a container, SH> with a veth connecting them, and you checkpoint a task in netns 1, SH> will you fail bc net

[Devel] Re: RFC: netfilter: nf_conntrack: add support for "conntrack zones"

2010-02-22 Thread Eric W. Biederman
jamal writes: >> > Agreed. But the major ones like iproute2 etc could be taught. We have >> > namespaces in the kernel already, over a period of time I think changing >> > the user space tools would a sensible evolution. >> >> Yes, that might be useful in any case. But I don't think it would >>

[Devel] Re: [PATCH 3/5] Add checkpoint support for veth devices (v2)

2010-02-22 Thread Dan Smith
>> +else if (!ckpt_obj_lookup(ctx, peer->nd_net, CKPT_OBJ_NET_NS)) { >> +ret = -EINVAL; >> +ckpt_err(ctx, ret, >> + "Peer %s of %s not in checkpointed namespaces\n", >> + peer->name, dev->name); SH> I'm not sure this check does wh

[Devel] Re: [PATCH 3/5] Add checkpoint support for veth devices (v2)

2010-02-22 Thread Serge E. Hallyn
Quoting Dan Smith (da...@us.ibm.com): > Adds an ndo_checkpoint() handler for veth devices to checkpoint themselves. > Writes out the pairing information, addresses, and initiates a checkpoint > on the peer if the peer won't be reached from another netns. Throws an > error of our peer's netns isn't

[Devel] Re: [PATCH 2/5] C/R: Basic support for network namespaces and devices (v4)

2010-02-22 Thread Serge E. Hallyn
Quoting Dan Smith (da...@us.ibm.com): > When checkpointing a task tree with network namespaces, we hook into > do_checkpoint_ns() along with the others. Any devices in a given namespace > are checkpointed (including their peer, in the case of veth) sequentially. > Each network device stores a list

[Devel] Re: [PATCH 1/2] memcg: dirty pages accounting and limiting infrastructure

2010-02-22 Thread Vivek Goyal
On Mon, Feb 22, 2010 at 09:22:42AM +0900, KAMEZAWA Hiroyuki wrote: [..] > > +static int mem_cgroup_dirty_bytes_write(struct cgroup *cgrp, struct cftype > > *cft, > > + u64 val) > > +{ > > + struct mem_cgroup *memcg = mem_cgroup_from_cont(cgrp); > > + struct me

[Devel] Re: [PATCH] cr_tests: report kernel version

2010-02-22 Thread Serge E. Hallyn
Quoting Nathan Lynch (n...@pobox.com): > When reviewing test logs, it's convenient to have a record of the > kernel version, especially with the LOCALVERSION_AUTO git id string. > > Signed-off-by: Nathan Lynch thanks, pushed -serge > --- > runall.sh |3 +++ > 1 files changed, 3 insertions

[Devel] Re: [RFC] [PATCH 0/2] memcg: per cgroup dirty limit

2010-02-22 Thread Vivek Goyal
On Mon, Feb 22, 2010 at 07:12:27PM +0100, Andrea Righi wrote: > On Mon, Feb 22, 2010 at 09:27:45AM -0500, Vivek Goyal wrote: > > On Sun, Feb 21, 2010 at 04:18:43PM +0100, Andrea Righi wrote: > > > Control the maximum amount of dirty pages a cgroup can have at any given > > > time. > > > > > > Per

[Devel] [PATCH] cr_tests: report kernel version

2010-02-22 Thread Nathan Lynch
When reviewing test logs, it's convenient to have a record of the kernel version, especially with the LOCALVERSION_AUTO git id string. Signed-off-by: Nathan Lynch --- runall.sh |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/runall.sh b/runall.sh index d2e08f9..6b07d17

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-02-22 Thread Peter Zijlstra
On Sun, 2010-02-21 at 16:18 +0100, Andrea Righi wrote: > @@ -137,10 +137,11 @@ static struct prop_descriptor vm_dirties; > */ > static int calc_period_shift(void) > { > - unsigned long dirty_total; > + unsigned long dirty_total, dirty_bytes; > > - if (vm_dirty_bytes) > -

[Devel] Re: [PATCH 1/2] memcg: dirty pages accounting and limiting infrastructure

2010-02-22 Thread Vivek Goyal
On Sun, Feb 21, 2010 at 11:17:01PM +0100, Andrea Righi wrote: > On Sun, Feb 21, 2010 at 01:28:35PM -0800, David Rientjes wrote: > > [snip] > > > > +static struct mem_cgroup *get_mem_cgroup_from_page(struct page *page) > > > +{ > > > + struct page_cgroup *pc; > > > + struct mem_cgroup *mem = NULL;

[Devel] Re: [PATCH user-cr] define MNT_DETACH in older userspace

2010-02-22 Thread Nathan Lynch
On Mon, 2010-02-22 at 11:58 -0600, Nathan Lynch wrote: > Thanks, I had already put together a local fix which adds a compat > header -- please use this instead of duplicating the work across files? Sorry, please use this one instead - fixed include guard in compat.h >From c0869556338592a92bad3b58

[Devel] Re: [PATCH user-cr] define MNT_DETACH in older userspace

2010-02-22 Thread Serge E. Hallyn
Quoting Nathan Lynch (n...@pobox.com): > Thanks, I had already put together a local fix which adds a compat > header -- please use this instead of duplicating the work across files? > > >From 9d8b8774d4c471f04203b589f49ffe59e1d0cf39 Mon Sep 17 00:00:00 2001 > From: Nathan Lynch > Date: Mon, 22 Fe

[Devel] Re: [PATCH 0/9] cr_tests: Filesystem tests

2010-02-22 Thread Serge E. Hallyn
Quoting Matt Helsley (matth...@us.ibm.com): > These filesystem-related tests for unlinked file support and > dnotify are expected to fail so long as those features are > unsupported by c/r. > > PATCH 1/9 Add tests for checkpoint/restart of unlinked files. > PATCH 2/9 Add a do_ckpt utility (for pyt

[Devel] Re: [RFC] [PATCH 0/2] memcg: per cgroup dirty limit

2010-02-22 Thread Vivek Goyal
On Mon, Feb 22, 2010 at 11:06:40PM +0530, Balbir Singh wrote: > * Vivek Goyal [2010-02-22 09:27:45]: > > > On Sun, Feb 21, 2010 at 04:18:43PM +0100, Andrea Righi wrote: > > > Control the maximum amount of dirty pages a cgroup can have at any given > > > time. > > > > > > Per cgroup dirty limit

[Devel] Re: [PATCH user-cr] define MNT_DETACH in older userspace

2010-02-22 Thread Nathan Lynch
Thanks, I had already put together a local fix which adds a compat header -- please use this instead of duplicating the work across files? >From 9d8b8774d4c471f04203b589f49ffe59e1d0cf39 Mon Sep 17 00:00:00 2001 From: Nathan Lynch Date: Mon, 22 Feb 2010 11:50:46 -0600 Subject: [PATCH 1/1] user-cr:

[Devel] [PATCH user-cr] define MNT_DETACH in older userspace

2010-02-22 Thread Serge E. Hallyn
Reported-by: Nathan T Lynch Signed-off-by: Serge Hallyn --- nsexec.c |4 restart.c |4 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/nsexec.c b/nsexec.c index 79fcc70..90db229 100644 --- a/nsexec.c +++ b/nsexec.c @@ -21,6 +21,10 @@ #include "eclone.h" #inclu

[Devel] Re: [RFC] [PATCH 0/2] memcg: per cgroup dirty limit

2010-02-22 Thread Balbir Singh
* Vivek Goyal [2010-02-22 09:27:45]: > On Sun, Feb 21, 2010 at 04:18:43PM +0100, Andrea Righi wrote: > > Control the maximum amount of dirty pages a cgroup can have at any given > > time. > > > > Per cgroup dirty limit is like fixing the max amount of dirty (hard to > > reclaim) > > page cache

[Devel] Re: [PATCH 1/2] memcg: dirty pages accounting and limiting infrastructure

2010-02-22 Thread Balbir Singh
* Vivek Goyal [2010-02-22 10:58:40]: > > We seem to be doing same operation as existing "mem_cgroup_update_file_mapped" > function is doing to udpate some stats. Can we just reuse that? We > probably can create one core function which take index of stat to update > and update_file_mapped and oth

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-02-22 Thread Vivek Goyal
On Sun, Feb 21, 2010 at 04:18:45PM +0100, 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 |3 ++ > fs/nfs/write.c |3 ++ > fs/nilfs2/segment.c |

[Devel] Re: [PATCH 1/2] memcg: dirty pages accounting and limiting infrastructure

2010-02-22 Thread Balbir Singh
* Andrea Righi [2010-02-21 16:18:44]: > Infrastructure to account dirty pages per cgroup + add memory.dirty_bytes > limit > in cgroupfs. > > Signed-off-by: Andrea Righi > --- > include/linux/memcontrol.h | 31 ++ > mm/memcontrol.c| 218 > +++

[Devel] Re: [PATCH 1/2] memcg: dirty pages accounting and limiting infrastructure

2010-02-22 Thread Vivek Goyal
On Sun, Feb 21, 2010 at 04:18:44PM +0100, Andrea Righi wrote: > Infrastructure to account dirty pages per cgroup + add memory.dirty_bytes > limit > in cgroupfs. > > Signed-off-by: Andrea Righi > --- > include/linux/memcontrol.h | 31 ++ > mm/memcontrol.c| 218 > +

[Devel] [PATCH v2 -mmotm 2/4] cgroups: remove events before destroying subsystem state objects

2010-02-22 Thread Kirill A. Shutemov
Events should be removed after rmdir of cgroup directory, but before destroying subsystem state objects. Let's take reference to cgroup directory dentry to do that. Signed-off-by: Kirill A. Shutemov Acked-by: KAMEZAWA Hiroyuki --- include/linux/cgroup.h |3 --- kernel/cgroup.c|8

[Devel] [PATCH v2 -mmotm 1/4] cgroups: Fix race between userspace and kernelspace

2010-02-22 Thread Kirill A. Shutemov
eventfd are used to notify about two types of event: - control file-specific, like crossing memory threshold; - cgroup removing. To understand what really happen, userspace can check if the cgroup still exists. To avoid race beetween userspace and kernelspace we have to notify userspace about cg

[Devel] [PATCH v2 -mmotm 3/4] cgroups: Add simple listener of cgroup events to documentation

2010-02-22 Thread Kirill A. Shutemov
An example of cgroup notification API usage. Signed-off-by: Kirill A. Shutemov Reviewed-by: KAMEZAWA Hiroyuki --- Documentation/cgroups/cgroup_event_listener.c | 103 + 1 files changed, 103 insertions(+), 0 deletions(-) create mode 100644 Documentation/cgroups/cgroup_e

[Devel] [PATCH v2 -mmotm 4/4] memcg: Update memcg_test.txt to describe memory thresholds

2010-02-22 Thread Kirill A. Shutemov
Decription of sanity check for memory thresholds. Signed-off-by: Kirill A. Shutemov Acked-by: KAMEZAWA Hiroyuki --- Documentation/cgroups/memcg_test.txt | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/Documentation/cgroups/memcg_test.txt b/Document

[Devel] Re: Progress of containers at 2.6.32/33?

2010-02-22 Thread Serge E. Hallyn
Quoting Eric W. Biederman (ebied...@xmission.com): > > 2.6.32 is likely to be used widely so I expect everyone's out of tree > patches to be updated. As a metric to figuring out which things have > worked and which things have not I would like ask all of those who are > maintaining out of tree co

[Devel] Re: [RFC] [PATCH 0/2] memcg: per cgroup dirty limit

2010-02-22 Thread Vivek Goyal
On Sun, Feb 21, 2010 at 04:18:43PM +0100, Andrea Righi wrote: > Control the maximum amount of dirty pages a cgroup can have at any given time. > > Per cgroup dirty limit is like fixing the max amount of dirty (hard to > reclaim) > page cache used by any cgroup. So, in case of multiple cgroup writ