direct-io.hg
changeset 8041:d46553f73c6f
Tolerate temporary inconsistency between type info and page contents on
(live) restore. This should now enable live migrate of fork-intensive (or
other page-table-intensive) workloads.
Signed-off-by: Steven Hand <steven@xensource.com>
(live) restore. This should now enable live migrate of fork-intensive (or
other page-table-intensive) workloads.
Signed-off-by: Steven Hand <steven@xensource.com>
author | smh22@firebug.cl.cam.ac.uk |
---|---|
date | Fri Nov 25 17:53:41 2005 +0100 (2005-11-25) |
parents | 5ae89ce67486 |
children | 549130374cfa |
files | tools/libxc/xc_linux_restore.c |
line diff
1.1 --- a/tools/libxc/xc_linux_restore.c Fri Nov 25 15:26:19 2005 +0000 1.2 +++ b/tools/libxc/xc_linux_restore.c Fri Nov 25 17:53:41 2005 +0100 1.3 @@ -78,6 +78,7 @@ int uncanonicalize_pagetable(unsigned lo 1.4 pfn = (pte >> PAGE_SHIFT) & 0xffffffff; 1.5 1.6 if(pfn >= max_pfn) { 1.7 + /* This "page table page" is probably not one; bail. */ 1.8 ERR("Frame number in type %lu page table is out of range: " 1.9 "i=%d pfn=0x%lx max_pfn=%lu", 1.10 type >> 28, i, pfn, max_pfn); 1.11 @@ -111,6 +112,7 @@ int xc_linux_restore(int xc_handle, int 1.12 unsigned long mfn, pfn; 1.13 unsigned int prev_pc, this_pc; 1.14 int verify = 0; 1.15 + int nraces = 0; 1.16 1.17 /* The new domain's shared-info frame number. */ 1.18 unsigned long shared_info_frame; 1.19 @@ -344,8 +346,15 @@ int xc_linux_restore(int xc_handle, int 1.20 if(pt_levels != 3 || pagetype != L1TAB) { 1.21 1.22 if(!uncanonicalize_pagetable(pagetype, page)) { 1.23 - ERR("failed uncanonicalize pt!\n"); 1.24 - goto out; 1.25 + /* 1.26 + ** Failing to uncanonicalize a page table can be ok 1.27 + ** under live migration since the pages type may have 1.28 + ** changed by now (and we'll get an update later). 1.29 + */ 1.30 + DPRINTF("PT L%ld race on pfn=%08lx mfn=%08lx\n", 1.31 + pagetype >> 28, pfn, mfn); 1.32 + nraces++; 1.33 + continue; 1.34 } 1.35 1.36 } 1.37 @@ -394,7 +403,7 @@ int xc_linux_restore(int xc_handle, int 1.38 n+= j; /* crude stats */ 1.39 } 1.40 1.41 - DPRINTF("Received all pages\n"); 1.42 + DPRINTF("Received all pages (%d races)\n", nraces); 1.43 1.44 if(pt_levels == 3) { 1.45