From: Brendan Cully <brendan@cs.ubc.ca>
To: xen-devel@lists.xensource.com
Subject: [PATCH 00 of 10] Teach xm save to checkpoint a running domain
Date: Thu, 14 Dec 2006 23:38:36 -0700 [thread overview]
Message-ID: <patchbomb.1166168316@ventoux.cs.ubc.ca> (raw)
Here's some code I've been playing with lately that teaches Xen to do
checkpoints of running domains. It adds a new flag (-c) to xm save
that causes the domain to be restored to the runnable state after save
instead of being destroyed. It also alters the checkpoint code in the
guest to simply lock external devices instead of disconnecting them,
and to only attempt to reconnect if the suspend hypercall returns in a
new domain (detected by the hypercall return value).
This alternate suspend path is triggered by a new shutdown code
('checkpoint') - if the -c flag is not specified the existing
'suspend' function is run, so this code shouldn't have any effect on
existing functionality.
I'm not too sure about the last couple of patches in this
series. Because the checkpointing domain doesn't disconnect before
calling suspend, it retains a few references to pages it doesn't
own. These trigger a PT race detector in xc_linux_save, which causes
it to abort. So the last couple of patches explicitly identify the
references I've found so far (shared_info and some grant table shared
pages) and simply zero those PTEs during save, since they'll be
recreated on restore. Finding the grant table pages is a bit fragile -
I walk the page table loaded in CR3 at the time of suspend looking for
the virtual address I've stowed in the suspend record. I've only got
code for two-level page tables at the moment, since I'm not convinced
this is the right approach. Under what circumstances would a non-live
save have an unsafe PTE race? Maybe it's fine to simply zero these
ptes without checking them. Or maybe it'd be less fragile to get the
owners of the pages from Xen and see if the guest has legitimate
mappings to them? Comments?
I'll post some truly horrible proof-of-concept code to create LVM
snapshots at checkpoint time in a separate email.
next reply other threads:[~2006-12-15 6:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-15 6:38 Brendan Cully [this message]
2006-12-15 6:38 ` [PATCH 01 of 10] Add resumedomain domctl to resume a domain after checkpoint Brendan Cully
2006-12-15 6:38 ` [PATCH 02 of 10] Export resumedomain domctl to libxc Brendan Cully
2006-12-15 6:38 ` [PATCH 03 of 10] Export xc_domain_resume to xend Brendan Cully
2006-12-15 6:38 ` [PATCH 04 of 10] Add XS_RESUME command Brendan Cully
2006-12-15 6:38 ` [PATCH 05 of 10] Export XS_RESUME to xend Brendan Cully
2006-12-15 6:38 ` [PATCH 06 of 10] Make suspend hypercall return 1 when the domain has been resumed Brendan Cully
2006-12-15 6:38 ` [PATCH 07 of 10] Add new shutdown mode for checkpoint Brendan Cully
2006-12-28 16:51 ` Keir Fraser
2007-01-12 1:25 ` Brendan Cully
2007-01-12 23:58 ` Brendan Cully
2006-12-15 6:38 ` [PATCH 08 of 10] Add xm save -c/--checkpoint option Brendan Cully
2006-12-15 6:38 ` [PATCH 09 of 10] Advertise address of grant table shared pages in suspend record Brendan Cully
2006-12-15 6:38 ` [PATCH 10 of 10] Ignore safe foreign maps in xc_linux_save Brendan Cully
2006-12-15 8:07 ` [PATCH 00 of 10] Teach xm save to checkpoint a running domain Steven Hand
2006-12-16 0:04 ` Brendan Cully
2006-12-20 10:01 ` [PATCH 00 of 10] Teach xm save to checkpoint a Yoshiaki Tamura
2007-01-09 21:33 ` Brendan Cully
2007-01-12 0:56 ` Yoshiaki Tamura
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=patchbomb.1166168316@ventoux.cs.ubc.ca \
--to=brendan@cs.ubc.ca \
--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.