public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oren Laadan <orenl@cs.columbia.edu>
To: Daniel Lezcano <dlezcano@fr.ibm.com>
Cc: Greg Kurz <gkurz@fr.ibm.com>,
	linux-kernel@vger.kernel.org,
	containers@lists.linux-foundation.org,
	Ingo Molnar <mingo@elte.hu>,
	arnd@arndb.de, Dave Hansen <dave@linux.vnet.ibm.com>
Subject: Re: [RFC][PATCH 1/2] Track in-kernel when we expect checkpoint/restart to work
Date: Fri, 10 Oct 2008 06:11:34 -0400	[thread overview]
Message-ID: <48EF2A56.8020801@cs.columbia.edu> (raw)
In-Reply-To: <48EF144D.1050906@fr.ibm.com>



Daniel Lezcano wrote:
> Greg Kurz wrote:
>> On Thu, 2008-10-09 at 12:04 -0700, Dave Hansen wrote:
>>> Suggested by Ingo.
>>>
>>> Checkpoint/restart is going to be a long effort to get things working.
>>> We're going to have a lot of things that we know just don't work for
>>> a long time.  That doesn't mean that it will be useless, it just means
>>> that there's some complicated features that we are going to have to
>>> work incrementally to fix.
>>>
>>> This patch introduces a new mechanism to help the checkpoint/restart
>>> developers.  A new function pair: task/process_deny_checkpoint() is
>>> created.  When called, these tell the kernel that we *know* that the
>>> process has performed some activity that will keep it from being
>>> properly checkpointed.
>>>
>>> The 'flag' is an atomic_t for now so that we can have some level
>>> of atomicity and make sure to only warn once.
>>>
>>> For now, this is a one-way trip.  Once a process is no longer
>>> 'may_checkpoint' capable, neither it nor its children ever will be.
>>> This can, of course, be fixed up in the future.  We might want to
>>> reset the flag when a new pid namespace is created, for instance.
>>>
>> Then this patch should be described as:
>>
>> Track in-kernel when we expect checkpoint/restart to fail.
>>
>> By the way, why don't you introduce the reverse operation ?
> 
> I think implementing the reverse operation will be a nightmare, IMHO it 
> is safe to say we deny checkpointing for the process life-cycle either 
> if the created resource was destroyed before we initiate the checkpoint.
> 
> For example, you create a socket, the process becomes uncheckpointable, 
> you close (via sys_close) the socket, you have to track this close to be 
> related to the socket which made the process uncheckpointable in order 
> to make the operation reversible.

I agree that it makes sense to only track transitions in one direction.
Therefore at any given point in time all we'll know is that the process
"may be non-checkpointable", instead of the clear-cut "uncheckpointable"
(webster anyone ?).

The distinction is important, because it may be that the process is,
after all, checkpointable, so users/developers could still try to
perform a checkpoint, should they wish too. The only thing is that
it is not guaranteed to succeed.

In fact, one way to transition back to the "checkpointable" state is
by doing a dry-checkpoint, where no data is saved (/dev/null ?). No
side effects will occur except for a short downtime due to the freeze
period. If the dry-checkpoint completes successfully - we can reset
the non-/un-/not-/a-/dis-checkpointable flag.

> 
> Let's imagine you implement this reverse operation anyway, you have a 
> process which creates a TCP connection, writes data and close the socket 
> (so you are again checkpointable), but in the namespace there is the 
> orphan socket which is not checkpointable yet and you missed this case.
> _______________________________________________
> Containers mailing list
> Containers@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/containers

Oren.

  parent reply	other threads:[~2008-10-10 10:12 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-09 19:04 [RFC][PATCH 1/2] Track in-kernel when we expect checkpoint/restart to work Dave Hansen
2008-10-09 19:04 ` [RFC][PATCH 2/2] first callers of process_deny_checkpoint() Dave Hansen
2008-10-09 19:43   ` Serge E. Hallyn
2008-10-09 20:54     ` Dave Hansen
2008-10-10  8:46       ` Ingo Molnar
2008-10-10 13:17         ` Rafael J. Wysocki
2008-10-10 14:54           ` Ingo Molnar
2008-10-10 19:53             ` Rafael J. Wysocki
2008-10-10 19:53               ` Ingo Molnar
2008-10-10 20:40                 ` Len Brown
2008-10-10 22:57                 ` Rafael J. Wysocki
2008-10-11 13:48         ` Pavel Machek
2008-10-11 15:00           ` Ingo Molnar
2008-10-10 10:27       ` Cedric Le Goater
2008-10-10  8:41   ` Daniel Lezcano
2008-10-10 10:17   ` Cedric Le Goater
2008-10-10 14:04     ` Serge E. Hallyn
2008-10-10 16:45       ` Greg Kurz
2008-10-10 17:13         ` Serge E. Hallyn
2008-10-10 17:28         ` Dave Hansen
2008-10-13  8:20           ` Greg Kurz
2008-10-10  8:20 ` [RFC][PATCH 1/2] Track in-kernel when we expect checkpoint/restart to work Greg Kurz
2008-10-10  8:37   ` Daniel Lezcano
2008-10-10  8:47     ` Greg Kurz
2008-10-10 10:11     ` Oren Laadan [this message]
2008-10-10 14:59     ` Ingo Molnar
2008-10-10 15:17       ` Oren Laadan
2008-10-10 15:28         ` Ingo Molnar
2008-10-10 16:34         ` Greg Kurz
2008-10-10 16:36           ` Dave Hansen
2008-10-10 20:57             ` Daniel Lezcano
2008-10-10 17:18           ` Chris Friesen
2008-10-13  8:18             ` Greg Kurz
2008-10-13 16:46               ` Serge E. Hallyn
2008-10-10 16:33     ` Dave Hansen

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=48EF2A56.8020801@cs.columbia.edu \
    --to=orenl@cs.columbia.edu \
    --cc=arnd@arndb.de \
    --cc=containers@lists.linux-foundation.org \
    --cc=dave@linux.vnet.ibm.com \
    --cc=dlezcano@fr.ibm.com \
    --cc=gkurz@fr.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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