[Devel] [PATCH 3/4] C/R: Make rtnl_open() and rtnl_do() take and pass a netns pointer

2010-04-23 Thread Dan Smith
(also make rtnl_do() return negative or 0, not the message length) Signed-off-by: Dan Smith --- net/checkpoint_dev.c | 16 +--- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/net/checkpoint_dev.c b/net/checkpoint_dev.c index 2787892..df8b16a 100644 --- a/net/checkpo

[Devel] Checkpoint and Restart of INET routing information

2010-04-23 Thread Dan Smith
This set extends the existing network socket, device, and namespace support in the checkpoint tree to cover routing information. It does so by making heavy use of RTNETLINK to dump and insert routes much like userspace would. Because the task doing the checkpointing or restarting needs to examine

[Devel] [PATCH 2/4] [RFC] Add sock_create_kern_net()

2010-04-23 Thread Dan Smith
This helper allows kernel routines to create a socket in a given netns, instead of forcing it to the initial or current one. I know this seems like it's violating the netns boundary. The intended use (as in the following patches) is specifically when talking to RTNETLINK in another netns for the

[Devel] [PATCH 1/4] Fix acquiring socket lock before reading RTNETLINK response

2010-04-23 Thread Dan Smith
Signed-off-by: Dan Smith --- net/checkpoint_dev.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/net/checkpoint_dev.c b/net/checkpoint_dev.c index 7ccb899..2787892 100644 --- a/net/checkpoint_dev.c +++ b/net/checkpoint_dev.c @@ -136,11 +136,12 @@ static struct nlms

[Devel] [PATCH 4/4] C/R: inet4 and inet6 unicast routes

2010-04-23 Thread Dan Smith
This patch adds support for checkpointing and restoring route information. It keeps enough information to restore basic routes at the level of detail of /proc/net/route. It uses RTNETLINK to extract the information during checkpoint and also to insert it back during restore. This gives us a nice

[Devel] Re: [PATCH 1/4] Fix acquiring socket lock before reading RTNETLINK response

2010-04-23 Thread Dan Smith
DS> Signed-off-by: Dan Smith I went too deep with my send-email command line. This patch isn't related to the others, so please disregard. -- Dan Smith IBM Linux Technology Center email: da...@us.ibm.com ___ Containers mailing list contain...@lists.l

[Devel] pathname resolution, mounts namespaces, and checkpoint/restart

2010-04-23 Thread Serge E. Hallyn
Hi, for checkpoint/restart (http://www.linux-cr.org/git/?p=linux-cr.git;a=shortlog;h=refs/heads/ckpt-v21-rc1) of open files, we basically use __d_path passing in the fs->root of the container init. If the supplied root is replaced by __d_path, then we refuse checkpoint, assuming the file is not r

[Devel] Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock

2010-04-23 Thread Greg Thelen
On Wed, Apr 14, 2010 at 11:54 PM, KAMEZAWA Hiroyuki wrote: > On Thu, 15 Apr 2010 15:21:04 +0900 > Daisuke Nishimura wrote: >> > The only reason to use trylock in this case is to prevent deadlock >> > when running in a context that may have preempted or interrupted a >> > routine that already hol

[Devel] Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock

2010-04-23 Thread Peter Zijlstra
On Fri, 2010-04-23 at 13:17 -0700, Greg Thelen wrote: > - lock_page_cgroup(pc); > + /* > +* Unless a page's cgroup reassignment is possible, then avoid > grabbing > +* the lock used to protect the cgroup assignment. > +*/ > + rcu_read_lock(); Where is the

[Devel] Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock

2010-04-23 Thread Peter Zijlstra
On Fri, 2010-04-23 at 13:17 -0700, Greg Thelen wrote: > +static void mem_cgroup_begin_page_cgroup_reassignment(void) > +{ > + VM_BUG_ON(mem_cgroup_account_move_ongoing); > + mem_cgroup_account_move_ongoing = true; > + synchronize_rcu(); > +} btw, you know synchronize_rcu() is _r

[Devel] Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock

2010-04-23 Thread Peter Zijlstra
On Fri, 2010-04-23 at 13:17 -0700, Greg Thelen wrote: > > This is an interesting idea. If this applies to memcg dirty accounting, > then would it also apply to system-wide dirty accounting? I don't think > so, but I wanted to float the idea. It looks like this proportions.c > code is good is at

[Devel] Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock

2010-04-23 Thread KAMEZAWA Hiroyuki
On Fri, 23 Apr 2010 13:17:38 -0700 Greg Thelen wrote: > On Wed, Apr 14, 2010 at 11:54 PM, KAMEZAWA Hiroyuki > wrote: > > On Thu, 15 Apr 2010 15:21:04 +0900 > > Daisuke Nishimura wrote: > >> > The only reason to use trylock in this case is to prevent deadlock > >> > when running in a context th

[Devel] Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock

2010-04-23 Thread KAMEZAWA Hiroyuki
On Fri, 23 Apr 2010 22:57:06 +0200 Peter Zijlstra wrote: > On Fri, 2010-04-23 at 13:17 -0700, Greg Thelen wrote: > > +static void mem_cgroup_begin_page_cgroup_reassignment(void) > > +{ > > + VM_BUG_ON(mem_cgroup_account_move_ongoing); > > + mem_cgroup_account_move_ongoing = true; > >