mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
In COLO mode, both VMs are running, and are considered in sync if the visible network traffic is identical. After some time, they fall out of sync. At this point, the two VMs have definitely diverged. Lets call the primary dirty bitmap set A, while the secondary dirty bitmap set B. Sets A and B are different. Under normal migration, the page data for set A will be sent from the primary to the secondary. However, the set difference B - A (the one in B but not in A, lets call this C) is out-of-date on the secondary (with respect to the primary) and will not be sent by the primary (to secondary), as it was not memory dirtied by the primary. The secondary needs C page data to reconstruct an exact copy of the primary at the checkpoint. The secondary cannot calculate C as it doesn't know A. Instead, the secondary must send B to the primary, at which point the primary calculates the union of A and B (lets call this D) which is all the pages dirtied by both the primary and the secondary, and sends all page data covered by D. In the general case, D is a superset of both A and B. Without the backchannel dirty bitmap, a COLO checkpoint can't reconstruct a valid copy of the primary. We transfer the dirty bitmap on libxc side, so we need to introduce back channel to libxc. Note: it is different from the paper. We change the original design to the current one, according to our following concerns: 1. The original design needs extra memory on Secondary host. When there's multiple backups on one host, the memory cost is high. 2. The memory cache code will be another 1k+, it will make the review more time consuming. Note: this patch merely adds new parameters to various prototypes and functions. The new parameters are used in later patch called "libxc/restore: send dirty pfn list to primary when checkpoint under COLO". Signed-off-by: Yang Hongyang <hongyang.yang@easystack.cn> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
53 lines
1.8 KiB
C
53 lines
1.8 KiB
C
/******************************************************************************
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation;
|
|
* version 2.1 of the License.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
* Copyright (c) 2011, Citrix Systems
|
|
*/
|
|
|
|
#include <inttypes.h>
|
|
#include <errno.h>
|
|
#include <xenctrl.h>
|
|
#include <xenguest.h>
|
|
|
|
int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iters,
|
|
uint32_t max_factor, uint32_t flags,
|
|
struct save_callbacks* callbacks, int hvm,
|
|
xc_migration_stream_t stream_type, int recv_fd)
|
|
{
|
|
errno = ENOSYS;
|
|
return -1;
|
|
}
|
|
|
|
int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
|
|
unsigned int store_evtchn, unsigned long *store_mfn,
|
|
domid_t store_domid, unsigned int console_evtchn,
|
|
unsigned long *console_mfn, domid_t console_domid,
|
|
unsigned int hvm, unsigned int pae, int superpages,
|
|
xc_migration_stream_t stream_type,
|
|
struct restore_callbacks *callbacks, int send_back_fd)
|
|
{
|
|
errno = ENOSYS;
|
|
return -1;
|
|
}
|
|
|
|
/*
|
|
* Local variables:
|
|
* mode: C
|
|
* c-file-style: "BSD"
|
|
* c-basic-offset: 4
|
|
* tab-width: 4
|
|
* indent-tabs-mode: nil
|
|
* End:
|
|
*/
|