[CRIU] [PATCH 0/3] uffd: handle zero pages

Mike Rapoport rppt at linux.vnet.ibm.com
Thu Mar 31 04:39:18 PDT 2016


Hi,

When I tried to C/R the simple program below (1) with lazy-pages, I've got the
following errors:

(09.925241) Error (page-read.c:116): Missing 7f3387612000 in parent pagemap, current iov: base=7f3387829000,len=12288
(09.925252) lazy-pages: seek_pagemap_page ret 0x0
(09.925261) Error (uffd.c:375): lazy-pages: Error during UFFD copy
(09.925271) Error (uffd.c:576): lazy-pages: Error during regular page copy

Some digging in the logs and adding debug printouts showed that the page at
0x7f3387612000 is mapped to zero page, skipped at dump time and that's why
it cannot be found in the pages.img

The small addition to uffd maps to the zero page all the pages that are
mapped by VMAs but not found in the pages.img

Mike Rapoport (3):
  uffd: increment uffd_copied_pages only in one place
  uffd: introduce uffd_handle_page
  uffd: add handling of zero pages

 criu/uffd.c | 42 +++++++++++++++++++++++++++++++++++++-----
 1 file changed, 37 insertions(+), 5 deletions(-)

[1]: 
-----------------------------------------
#include <stdio.h>
#include <unistd.h>

int main(void)
{
	int i;

	for (i = 0; ; i++) {
		printf("%d\n", i);
		fflush(stdout);
		sleep(1);
	}
	return 0;
}
-----------------------------------------



More information about the CRIU mailing list