Linux Container Development
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Daniel Lezcano <dlezcano@fr.ibm.com>
Cc: Linux Containers <containers@lists.osdl.org>,
	libvir-list@redhat.com, Cedric Le Goater <clg@fr.ibm.com>
Subject: [libvirt] Re: kernel summit topic - 'containers end-game'
Date: Mon, 6 Jul 2009 09:51:37 -0500	[thread overview]
Message-ID: <20090706145137.GB16868@us.ibm.com> (raw)
In-Reply-To: <4A4CE3A6.200@fr.ibm.com>

Quoting Daniel Lezcano (dlezcano@fr.ibm.com):
> Serge E. Hallyn wrote:
...
> Checkpoint:
> 	- The initiator of the checkpoint initialize the barrier and send a  
> signal SIGCKPT to all the checkpointable tasks and these ones will jump  
> on the handler and block on the barrier.
>
> 	- When all these tasks reach this barrier, the initiator of the
> checkpoint dumps the system wide resources (memory, sysv ipc, struct  
> files, etc ...).
>
> 	- When this is done, the tasks are released and they store their  
> process wide resources (semundo, file descriptor, etc ...) to a  
> current->ckpt_restart buffer and then set the status of the operation  
> and block on the barrier.
>
> 	- The initiator of the checkpoint then collects all these informations  
> and dump them.

Do you envision all of the dumping being done in kernel or by userspace?

...

> 	- Finally the initiator of the checkpoint release the tasks.
>
>
> Restart:
> 	- The user executes the statefile, that spawns the process tree and all  
> the processes are blocked in the barrier.
>
> 	- The initiator of the restart restore the system wide resources
> and fill the restarted processes' current->ckpt_restart buffer.

Same question about restore...

> 	- The initiator sends a SIGRESTART to all the tasks and unblock the tasks
>
> 	- all the tasks restore their process wide resources regarding the  
> current->ckpt_restart buffer.
>
> 	- all the tasks write their status and block on the barrier
>
> 	- the initiator of the restart release the tasks which will return to  
> their execution context when they were checkpointed.
>
> This approach is different of you are doing but I am pretty sure most of  
> the code is re-usable. I see different advantages of this approach:
>
>  - because the process resources are checkpointed / restarted from  
> current, it would be easy to reuse some syscalls code (from the kernel  
> POV) and that would reduce the code duplication and maintenance overhead.
>
>  - the approach is more fine grained as we can implement piece by piece  
> the checkpoint / restart.
>
>  - as the statefile is in the elf format, gdb could be used to debug a  
> statefile as a core file

Note btw that Dave has found that a checkpoint is faster than a core-dump
at the moment :)  That's not entirely an aside - I need to reread your
email a few times and really process your suggestion, but given that some
users want to dump hundreds of gigabytes of memory, not slowing down the
checkpoint is a big consideration.

>  - as each process checkpoint / restart themselves, most of the  
> execution context is stored in the stack which is CR with the memory, so  
> when returning from the signal handler, the process returns to the right  
> context. That is less complicated and more generic than externally  
> checkpoint the execution context of a frozen task which would be  
> potentially different for the restart.
>
>
> I hope Serge you can present this approach as an alternative of the  
> current patchset __if__ this one is not acceptable.

I'll try to understand it better than I do right now - I don't think
it's for discussing at ksummit, but definately if we have a mini-summit
or during the next round of discussions (during or immediately after
the ckpt-v17 publish).

thanks,
-serge

  parent reply	other threads:[~2009-07-06 14:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 14:56 kernel summit topic - 'containers end-game' Serge E. Hallyn
2009-06-29 10:35 ` [libvirt] " Balbir Singh
2009-06-30 20:06   ` Serge E. Hallyn
2009-07-01  4:29     ` Balbir Singh
     [not found]     ` <20090630200613.GA22283-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-07-02 16:58       ` Daniel Lezcano
2009-07-02 16:43 ` [libvirt] " Daniel Lezcano
     [not found]   ` <4A4CE3A6.200-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2009-07-02 18:27     ` Oren Laadan
2009-07-06 14:51   ` Serge E. Hallyn [this message]
2009-07-08  7:55     ` [libvirt] " Daniel Lezcano
2009-07-08 13:45       ` Serge E. Hallyn
     [not found] ` <20090623145611.GB19332-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-07-02 18:38   ` Oren Laadan
2009-07-06 14:34     ` [libvirt] " Serge E. Hallyn
     [not found]       ` <20090706143401.GA16868-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-07-06 17:30         ` Oren Laadan
2009-07-06 18:48           ` [libvirt] " Serge E. Hallyn
     [not found]             ` <20090706184848.GA23819-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-07-07 15:36               ` Oren Laadan
     [not found]                 ` <4A536B91.5010205-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-07-07 16:14                   ` Serge E. Hallyn

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=20090706145137.GB16868@us.ibm.com \
    --to=serue@us.ibm.com \
    --cc=clg@fr.ibm.com \
    --cc=containers@lists.osdl.org \
    --cc=dlezcano@fr.ibm.com \
    --cc=libvir-list@redhat.com \
    /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