Linux Container Development
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: kathys <kathys-QcUrd9fbWu1x7SfHBjqd8AC/G2K4zDHf@public.gmane.org>
Cc: Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>,
	Cedric Le Goater <clg-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>,
	Nadia Derbey <Nadia.Derbey-6ktuUTfB/bM@public.gmane.org>,
	Dave Hansen
	<dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Subject: Re: Userspace checkpoint/restart hack: cryo
Date: Tue, 10 Jun 2008 13:17:56 -0500	[thread overview]
Message-ID: <20080610181756.GB13817@us.ibm.com> (raw)
In-Reply-To: <484E1BD3.40401-QcUrd9fbWu1x7SfHBjqd8AC/G2K4zDHf@public.gmane.org>

Quoting kathys (kathys-QcUrd9fbWu1x7SfHBjqd8AC/G2K4zDHf@public.gmane.org):
> Serge E. Hallyn wrote:
>> Quoting Nadia Derbey (Nadia.Derbey-6ktuUTfB/bM@public.gmane.org):
>>   
>>> Serge E. Hallyn wrote:
>>>     
>>>> Quoting Nadia Derbey (Nadia.Derbey-6ktuUTfB/bM@public.gmane.org):
>>>>
>>>>       
>>>>> Cedric Le Goater wrote:
>>>>>
>>>>>         
>>>>>>
>>>>>>           
>>>>>>> Looks like it has worked for me (msg1 creates 1000 msg queues, sleeps
>>>>>>> for a while and then removes the msg queues).
>>>>>>>             
>>>>>> cool. which kernel are you using ? 
>>>>>>
>>>>>> C.
>>>>>>
>>>>>>
>>>>>>           
>>>>> 2.6.25-mm1 (sorry for the late answer - plenty of days off in 
>>>>> France in May).
>>>>>
>>>>> Regards,
>>>>> Nadia
>>>>>         
>>>> I'm playing with features in cryo, and keeping a git tree at:
>>>>
>>>> git://git.sr71.net/~hallyn/cryodev.git
>>>>
>>>> It's meant to exploit the extras which are in the -lxc kernel at
>>>> lxc.sf.net.  Current latest kernel patch is at
>>>> http://lxc.sourceforge.net/patches/2.6.26/2.6.26-rc2-mm1-lxc4/ This -lxc
>>>> tree contains, for instance, Nadia's next_id patches, exploitation for
>>>> setting ids for sysvipc and for tasks at fork, and updated ipc_setall
>>>> patches (also using next_id).  The version of cryo in my git tree
>>>> exploits these.  If you're root when you restart a task, it will clone a
>>>> new set of namespaces and recreate your sysvipc objects, and it will
>>>> reset your pids (even if you're not root if the pids are available).
>>>>       
>>> Serge,
>>>
>>> I noticed that the sys_hijack() has disappeared from the lxc dev 
>>> tree:  would you mind putting it back. I think it might be useful if 
>>> we want to  start a task in a newly defined cgroup, checkpoint it and 
>>> then try to  restart it. We will need to 'join' the restarted 
>>> container to check if  everything has correctly be restarted. Or may 
>>> be is there another way to  do that?
>>>     
>>
>> Well it *could* be done similar to how cryo itself works, by ptracing
>> the destination task and making it fork a task which execve()s a process
>> to do the querying.  But yuck.
>>
>> Kathy, I'm sorry, I know I asked you to take sys_hijack() out.  Could
>> you please put it back in?  Preferably at the end of the queue, as I don't
>> want other patches having to be ported on top of it since its future is
>> very suspect...  Let me know if you have trouble porting it, but it
>> should be pretty simple.
>>   
> I added sys_hijack() (namespaces-introduce-sys_hijack.patch) back, with  
> a little bit of massaging to get it to port properly (as Cedrics  
> clone64-change-clone_flag-type-to-u64.patch changes unsigned long to  
> u64) but was unable to compile. I received the following errors:
>
> /scratch/kathys/containers/kernel_trees/upstream/kernel/fork.c: In  
> function 'do_fork_task':
> /scratch/kathys/containers/kernel_trees/upstream/kernel/fork.c:1342:  
> warning: format '%1lx' expects type 'long unsigned int', but argument 3  
> has type 'u64'
> /scratch/kathys/containers/kernel_trees/upstream/kernel/fork.c: At top  
> level:
> /scratch/kathys/containers/kernel_trees/upstream/kernel/fork.c:1416:  
> error: conflicting types for 'do_fork'
 
> /scratch/kathys/containers/kernel_trees/upstream/include/linux/sched.h:1868: 
> error: previous declaration of 'do_fork' was here

Did you change the do_fork definition in sched.h?

-serge

> I changed the patch as follows so it would apply properly, but I can't  
> work out why it breaks now, but not previously:
>
> Original patch from 2.6.26-rc2-mm1-lxc3:
> @@ -1307,13 +1313,8 @@ static int fork_traceflag(unsigned clone
> return 0;
> }
>
> -/*
> - * Ok, this is the main fork-routine.
> - *
> - * It copies the process, and if successful kick-starts
> - * it and waits for it to finish using the VM if required.
> - */
> -long do_fork(unsigned long clone_flags,
> +long do_fork_task(struct cgroup *cgroup,
> + unsigned long clone_flags,
> unsigned long stack_start,
> struct pt_regs *regs,
> unsigned long stack_size,
>
>
> Changed to:
>
> @@ -1308,13 +1314,8 @@ static int fork_traceflag(u64 clone_flag
> return 0;
> }
>
> -/*
> - * Ok, this is the main fork-routine.
> - *
> - * It copies the process, and if successful kick-starts
> - * it and waits for it to finish using the VM if required.
> - */
> -long do_fork(u64 clone_flags,
> +long do_fork_task(struct cgroup *cgroup,
> + u64 clone_flags,
> unsigned long stack_start,
> struct pt_regs *regs,
> unsigned long stack_size,
>
>
>
>> thanks,
>> -serge
>> _______________________________________________
>> Containers mailing list
>> Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
>> https://lists.linux-foundation.org/mailman/listinfo/containers
>>
>>   

  parent reply	other threads:[~2008-06-10 18:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-25 17:24 Userspace checkpoint/restart hack: cryo Dave Hansen
     [not found] ` <1209144259.12718.46.camel-FpcvD5N4B9G9xGwK5P7XA+TW4wlIGRCZ@public.gmane.org>
2008-04-28  9:47   ` Cedric Le Goater
     [not found]     ` <48159D1D.3050302-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-04-29 14:50       ` Nadia Derbey
     [not found]         ` <481735A6.8070800-6ktuUTfB/bM@public.gmane.org>
2008-04-29 15:21           ` Cedric Le Goater
     [not found]             ` <48173CE1.7050503-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-05-05  8:50               ` Nadia Derbey
     [not found]                 ` <481ECA42.5060603-6ktuUTfB/bM@public.gmane.org>
2008-06-09 13:04                   ` Serge E. Hallyn
     [not found]                     ` <20080609130429.GA16297-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-06-09 15:02                       ` Nadia Derbey
     [not found]                         ` <484D4612.9000901-6ktuUTfB/bM@public.gmane.org>
2008-06-09 15:23                           ` Serge E. Hallyn
     [not found]                             ` <484E1BD3.40401@ozlabs.au.ibm.com>
     [not found]                               ` <484E1BD3.40401-QcUrd9fbWu1x7SfHBjqd8AC/G2K4zDHf@public.gmane.org>
2008-06-10 18:17                                 ` Serge E. Hallyn [this message]
     [not found]                                   ` <484F0DC7.5080209@ozlabs.au.ibm.com>
     [not found]                                     ` <484F0DC7.5080209-QcUrd9fbWu1x7SfHBjqd8AC/G2K4zDHf@public.gmane.org>
2008-06-10 23:51                                       ` [GIT PATCH] actually check va randomization Dave Hansen
2008-06-11  3:07                                         ` Serge E. Hallyn
2008-06-11 18:35                                         ` sukadev-r/Jw6+rmf7HQT0dZR+AlfA
     [not found]                                           ` <20080611183551.GA32012-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-06-11 19:52                                             ` Serge E. Hallyn
     [not found]                                   ` <20080610181756.GB13817-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-06-17  5:48                                     ` Userspace checkpoint/restart hack: cryo kathys

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080610181756.GB13817@us.ibm.com \
    --to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=Nadia.Derbey-6ktuUTfB/bM@public.gmane.org \
    --cc=clg-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=kathys-QcUrd9fbWu1x7SfHBjqd8AC/G2K4zDHf@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox