All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Andres Lagar Cavilla <andreslc@cs.toronto.edu>
Cc: xen-devel@lists.xensource.com
Subject: Re: live saving of domU
Date: Wed, 10 May 2006 16:05:50 -0500	[thread overview]
Message-ID: <446255AE.1030105@us.ibm.com> (raw)
In-Reply-To: <44625027.3090804@cs.toronto.edu>

Andres Lagar Cavilla wrote:
>>> My understanding is that the guest only canonicalizes the store and 
>>> console mfn's and places them on the shared info frame which is 
>>> passed to the suspend hypercall. The rest of the canonicalizations 
>>> are done by dom0 user-space code (xc_linux_save).
>>
>>
>> Sort of.  When you pause a domain, it could be doing something like a 
>> PTE update in which case it has a PFN in a register (or on the stack 
>> somewhere).  Part of the reason for having a suspend entry point in 
>> the kernel is to ensure that we're in a consistent state.
>
> Does the guest kernel do anything beyond what's in __do_suspend in 
> reboot.c?

Nothing that isn't reachable from that function.

>>> The guest never really shuts down: it issues the suspend hypercall 
>>> and waits for it to return. This could happen months later when the 
>>> domain is resumed :) The suspend hypercall executing in xen is the 
>>> one that pauses all vcpus and kills the domain.
>>
>> Actually, take a look at what HYPERVISOR_suspend is:
>>
>> It's just a shutdown op.  
>
> But it doesn't have to be. The hypercall could only pause the domain, 
> and let the user-space tools unpause (no 's' bit -> no domain/devices 
> teardown) when checkpointing is over. The guest kernel can't tell the 
> difference: it returns from the hypercall and life goes on, as long as 
> the devices are still there. That's what I was referring to with:

It could, but you have a number of other problems you have to solve.  
How do you signal to userspace that the domain is suspended?  You could 
introduce another VIRQ perhaps or extend the state.  The __do_suspend 
path supposes that the devices are being cycled too.  You either need 
Xend to participate in this process.  How devices interact would need 
some careful thinking.

>>> Is it feasible to use a different hypercall that pauses the domain 
>>> but doesn't kill it, and once xc_linux_save is done checkpointing 
>>> have it issue a dom0_op that unpauses the domain?
>>
>> A domain is "killed" with a dom0_op of domain_destroy which is 
>> invoked by Xend.  The problem with checkpointing is that once the 's' 
>> bit has been set on a domain, there's no way to unset that bit.
>
> As I said a few lines up, let's not set the 's' bit for lightweight 
> checkpoints. This is likely to cause a lot of special casing for 
> xend/xenstore, right?

Yeah, there's a lot of bits of userspace code that would be effected.  I 
hope this isn't disparaging, I certainly think it's worth the effort.

Regards,

Anthony Liguori

> Andres

  reply	other threads:[~2006-05-10 21:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1FdtIP-0000Id-VQ@host-192-168-0-1-bcn-london>
2006-05-10 19:14 ` live saving of domU Andres Lagar Cavilla
2006-05-10 19:40   ` Anthony Liguori
2006-05-10 20:42     ` Andres Lagar Cavilla
2006-05-10 21:05       ` Anthony Liguori [this message]
2006-05-10 15:40 Jayesh Salvi
2006-05-10 16:32 ` Ewan Mellor
2006-05-10 16:59   ` Anthony Liguori
2006-05-10 19:06     ` Jayesh Salvi
2006-05-10 19:30       ` Anthony Liguori
2006-05-11  1:29         ` Jayesh Salvi
2006-05-11  1:32           ` Anthony Liguori
2006-05-11  8:25     ` Jacob Gorm Hansen
2006-05-10 19:00   ` Jayesh Salvi

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=446255AE.1030105@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=andreslc@cs.toronto.edu \
    --cc=xen-devel@lists.xensource.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 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.