All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oren Laadan <orenl@cs.columbia.edu>
To: Cedric Le Goater <clg@fr.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Dave Hansen <dave@linux.vnet.ibm.com>,
	jeremy@goop.org, arnd@arndb.de,
	containers@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrey Mirkin <major@openvz.org>
Subject: Re: [RFC v6][PATCH 0/9] Kernel based checkpoint/restart
Date: Mon, 13 Oct 2008 12:12:43 -0400	[thread overview]
Message-ID: <48F3737B.6070904@cs.columbia.edu> (raw)
In-Reply-To: <48F30315.1070909@fr.ibm.com>



Cedric Le Goater wrote:
> Ingo Molnar wrote:
>> * Dave Hansen <dave@linux.vnet.ibm.com> wrote:
>>
>>> On Thu, 2008-10-09 at 15:44 +0200, Ingo Molnar wrote:
>>>> there might be races as well, especially with proxy state - and 
>>>> current->flags updates are not serialized.
>>>>
>>>> So maybe it should be a completely separate flag after all? Stick it 
>>>> into the end of task_struct perhaps.
>>> What do you mean by proxy state?  nsproxy?
>> it's a concept: one task installing some state into another task (which 
>> state must be restored after a checkpoint event), while that other task 
>> is running. Such as a pi-futex state for example.
>>
>> So a task can acquire state not just by its own doing, but via some 
>> other task too.
> 
> thinking aloud,
> 
> hmm, that's rather complex, because we have to take into account the 
> kernel stack, no ? This is what Andrey was trying to solve in his patchset 
> back in September :
> 
> 	http://lkml.org/lkml/2008/9/3/96
> 
> the restart phase simulates a clone and switch_to to (not) restore the kernel 
> stack. right ? 
> 
> the self checkpoint and self restore syscalls, like Oren is proposing, are 
> simpler but they require the process cooperation to be triggered. we could
> image doing that in a special signal handler which would allow us to jump
> in the right task context. 

This description is not accurate:

For checkpoint, both implementations use an "external" task to read the state
from other tasks. (In my implementation that "other" task can be self).

For restart, both implementation expect the restarting process to restore its
own state. They differ in that Andrew's patchset also creates that process
while mine (at the moment) relies on the existing (self) task.

In other words, none of them will require any cooperation on part of the
checkpointed tasks, and both will require cooperation on part of the restarting
tasks (the latter is easy since we create and fully control these tasks).

> 
> I don't have any preference but looking at the code of the different patchsets
> there are some tricky areas and I'm wondering which path is easier, safer, 
> and portable. 

I am thinking which path is preferred: create the processes in kernel space
(like Andrew's patch does) or in user space (like Zap does). In the mini-summit
we agreed in favor of kernel space, but I can still see arguments why user space
may be better. (note: I refer strictly to the creation of the processes during
restart, not how their state is restored).

any thoughts ?

Oren.


WARNING: multiple messages have this Message-ID (diff)
From: Oren Laadan <orenl@cs.columbia.edu>
To: Cedric Le Goater <clg@fr.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Dave Hansen <dave@linux.vnet.ibm.com>,
	jeremy@goop.org, arnd@arndb.de,
	containers@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrey Mirkin <major@openvz.org>
Subject: Re: [RFC v6][PATCH 0/9] Kernel based checkpoint/restart
Date: Mon, 13 Oct 2008 12:12:43 -0400	[thread overview]
Message-ID: <48F3737B.6070904@cs.columbia.edu> (raw)
In-Reply-To: <48F30315.1070909@fr.ibm.com>


Cedric Le Goater wrote:
> Ingo Molnar wrote:
>> * Dave Hansen <dave@linux.vnet.ibm.com> wrote:
>>
>>> On Thu, 2008-10-09 at 15:44 +0200, Ingo Molnar wrote:
>>>> there might be races as well, especially with proxy state - and 
>>>> current->flags updates are not serialized.
>>>>
>>>> So maybe it should be a completely separate flag after all? Stick it 
>>>> into the end of task_struct perhaps.
>>> What do you mean by proxy state?  nsproxy?
>> it's a concept: one task installing some state into another task (which 
>> state must be restored after a checkpoint event), while that other task 
>> is running. Such as a pi-futex state for example.
>>
>> So a task can acquire state not just by its own doing, but via some 
>> other task too.
> 
> thinking aloud,
> 
> hmm, that's rather complex, because we have to take into account the 
> kernel stack, no ? This is what Andrey was trying to solve in his patchset 
> back in September :
> 
> 	http://lkml.org/lkml/2008/9/3/96
> 
> the restart phase simulates a clone and switch_to to (not) restore the kernel 
> stack. right ? 
> 
> the self checkpoint and self restore syscalls, like Oren is proposing, are 
> simpler but they require the process cooperation to be triggered. we could
> image doing that in a special signal handler which would allow us to jump
> in the right task context. 

This description is not accurate:

For checkpoint, both implementations use an "external" task to read the state
from other tasks. (In my implementation that "other" task can be self).

For restart, both implementation expect the restarting process to restore its
own state. They differ in that Andrew's patchset also creates that process
while mine (at the moment) relies on the existing (self) task.

In other words, none of them will require any cooperation on part of the
checkpointed tasks, and both will require cooperation on part of the restarting
tasks (the latter is easy since we create and fully control these tasks).

> 
> I don't have any preference but looking at the code of the different patchsets
> there are some tricky areas and I'm wondering which path is easier, safer, 
> and portable. 

I am thinking which path is preferred: create the processes in kernel space
(like Andrew's patch does) or in user space (like Zap does). In the mini-summit
we agreed in favor of kernel space, but I can still see arguments why user space
may be better. (note: I refer strictly to the creation of the processes during
restart, not how their state is restored).

any thoughts ?

Oren.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2008-10-13 16:15 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-08 10:19 [RFC v6][PATCH 0/9] Kernel based checkpoint/restart Oren Laadan
2008-10-08 10:19 ` Oren Laadan
2008-10-08 10:19 ` [RFC v6][PATCH 1/9] Create syscalls: sys_checkpoint, sys_restart Oren Laadan
2008-10-08 10:19   ` Oren Laadan
2008-10-08 10:19 ` [RFC v6][PATCH 2/9] General infrastructure for checkpoint restart Oren Laadan
2008-10-08 10:19   ` Oren Laadan
2008-10-08 10:19 ` [RFC v6][PATCH 3/9] x86 support for checkpoint/restart Oren Laadan
2008-10-08 10:19   ` Oren Laadan
     [not found]   ` <1223461197-11513-4-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-10-10 10:21     ` Cedric Le Goater
2008-10-10 10:21   ` Cedric Le Goater
2008-10-10 10:21     ` Cedric Le Goater
2008-10-10 10:24     ` Oren Laadan
2008-10-10 10:24       ` Oren Laadan
     [not found]     ` <48EF2CB3.9040900-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-10-10 10:24       ` Oren Laadan
2008-10-08 10:19 ` [RFC v6][PATCH 4/9] Dump memory address space Oren Laadan
2008-10-08 10:19   ` Oren Laadan
2008-10-08 10:19 ` [RFC v6][PATCH 5/9] Restore " Oren Laadan
2008-10-08 10:19   ` Oren Laadan
     [not found]   ` <1223461197-11513-6-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-10-08 15:35     ` Dave Hansen
2008-10-08 15:35   ` Dave Hansen
2008-10-08 15:35     ` Dave Hansen
     [not found] ` <1223461197-11513-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-10-08 10:19   ` [RFC v6][PATCH 1/9] Create syscalls: sys_checkpoint, sys_restart Oren Laadan
2008-10-08 10:19   ` [RFC v6][PATCH 2/9] General infrastructure for checkpoint restart Oren Laadan
2008-10-08 10:19   ` [RFC v6][PATCH 3/9] x86 support for checkpoint/restart Oren Laadan
2008-10-08 10:19   ` [RFC v6][PATCH 4/9] Dump memory address space Oren Laadan
2008-10-08 10:19   ` [RFC v6][PATCH 5/9] Restore " Oren Laadan
2008-10-08 10:19   ` [RFC v6][PATCH 6/9] Checkpoint/restart: initial documentation Oren Laadan
2008-10-08 10:19   ` [RFC v6][PATCH 7/9] Infrastructure for shared objects Oren Laadan
2008-10-08 10:19   ` [RFC v6][PATCH 8/9] Dump open file descriptors Oren Laadan
2008-10-08 10:19   ` [RFC v6][PATCH 9/9] Restore open file descriprtors Oren Laadan
2008-10-09 12:46   ` [RFC v6][PATCH 0/9] Kernel based checkpoint/restart Ingo Molnar
2008-10-08 10:19 ` [RFC v6][PATCH 6/9] Checkpoint/restart: initial documentation Oren Laadan
2008-10-08 10:19   ` Oren Laadan
2008-10-08 10:19 ` [RFC v6][PATCH 7/9] Infrastructure for shared objects Oren Laadan
2008-10-08 10:19   ` Oren Laadan
2008-10-08 10:19 ` [RFC v6][PATCH 8/9] Dump open file descriptors Oren Laadan
2008-10-08 10:19   ` Oren Laadan
2008-10-08 10:19 ` [RFC v6][PATCH 9/9] Restore open file descriprtors Oren Laadan
2008-10-08 10:19   ` Oren Laadan
2008-10-09 12:46 ` [RFC v6][PATCH 0/9] Kernel based checkpoint/restart Ingo Molnar
2008-10-09 12:46   ` Ingo Molnar
     [not found]   ` <20081009124658.GE2952-X9Un+BFzKDI@public.gmane.org>
2008-10-09 12:58     ` Dave Hansen
2008-10-09 12:58       ` Dave Hansen
2008-10-09 12:58       ` Dave Hansen
2008-10-09 13:17       ` Ingo Molnar
2008-10-09 13:17         ` Ingo Molnar
2008-10-09 13:34         ` Dave Hansen
2008-10-09 13:34           ` Dave Hansen
2008-10-09 13:44           ` Ingo Molnar
2008-10-09 13:44             ` Ingo Molnar
2008-10-09 13:44             ` Ingo Molnar
2008-10-09 16:50             ` Dave Hansen
2008-10-09 16:50               ` Dave Hansen
2008-10-10 15:39               ` Ingo Molnar
2008-10-10 15:39               ` Ingo Molnar
2008-10-10 15:39                 ` Ingo Molnar
     [not found]                 ` <20081010153951.GD28977-X9Un+BFzKDI@public.gmane.org>
2008-10-13  8:13                   ` Cedric Le Goater
2008-10-13  8:13                 ` Cedric Le Goater
2008-10-13  8:13                   ` Cedric Le Goater
     [not found]                   ` <48F30315.1070909-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-10-13 16:12                     ` Oren Laadan
2008-10-13 16:43                     ` Dave Hansen
2008-10-13 16:12                   ` Oren Laadan [this message]
2008-10-13 16:12                     ` Oren Laadan
     [not found]                     ` <48F3737B.6070904-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-10-15 15:13                       ` Cedric Le Goater
2008-10-15 15:13                     ` Cedric Le Goater
2008-10-15 15:13                       ` Cedric Le Goater
2008-10-15 23:59                       ` Oren Laadan
2008-10-15 23:59                         ` Oren Laadan
     [not found]                       ` <48F60891.1070807-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-10-15 23:59                         ` Oren Laadan
2008-10-13 16:43                   ` Dave Hansen
2008-10-13 16:43                     ` Dave Hansen
2008-10-15 15:15                     ` Cedric Le Goater
2008-10-15 15:15                       ` Cedric Le Goater
     [not found]                       ` <48F6092D.6050400-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-10-16  0:06                         ` Oren Laadan
2008-10-16  0:06                       ` Oren Laadan
2008-10-16  0:06                         ` Oren Laadan
     [not found]                         ` <48F685A3.1060804-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-10-16 12:35                           ` Daniel Lezcano
2008-10-16 12:35                         ` Daniel Lezcano
2008-10-16 12:35                           ` Daniel Lezcano
     [not found]                           ` <48F7352F.3020700-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-10-16 13:49                             ` Oren Laadan
2008-10-16 13:49                           ` Oren Laadan
2008-10-16 13:49                             ` Oren Laadan
2008-10-16 22:51                             ` Peter Chubb
2008-10-16 22:51                               ` Peter Chubb
2008-10-17  6:30                               ` David Newall
2008-10-17  6:30                                 ` David Newall
     [not found]                                 ` <48F83121.7070705-KzQzY1MbaKjAHznzqCTclw@public.gmane.org>
2008-10-20 17:17                                   ` Dave Hansen
2008-10-20 17:17                                     ` Dave Hansen
2008-10-20 17:17                                     ` Dave Hansen
2008-10-17  6:44                               ` Cedric Le Goater
2008-10-17  6:44                                 ` Cedric Le Goater
2008-10-17  7:08                               ` Oren Laadan
2008-10-17  7:08                                 ` Oren Laadan
     [not found]                               ` <87r66g8875.wl%peter-LkDQP0DxSMGxwJ88Py/mJxCuuivNXqWP@public.gmane.org>
2008-10-17  6:30                                 ` David Newall
2008-10-17  6:44                                 ` Cedric Le Goater
2008-10-17  7:08                                 ` Oren Laadan
     [not found]                             ` <48F74674.20202-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2008-10-16 22:51                               ` Peter Chubb
2008-10-15 15:15                     ` Cedric Le Goater
     [not found]             ` <20081009134415.GA12135-X9Un+BFzKDI@public.gmane.org>
2008-10-09 16:50               ` Dave Hansen
     [not found]         ` <20081009131701.GA21112-X9Un+BFzKDI@public.gmane.org>
2008-10-09 13:34           ` Dave Hansen
2008-10-09 21:59           ` Greg Kurz
2008-10-09 21:59         ` Greg Kurz
2008-10-09 21:59           ` Greg Kurz
2008-10-09 13:17       ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2008-10-08 10:19 Oren Laadan

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=48F3737B.6070904@cs.columbia.edu \
    --to=orenl@cs.columbia.edu \
    --cc=arnd@arndb.de \
    --cc=clg@fr.ibm.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=dave@linux.vnet.ibm.com \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=major@openvz.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.