[CRIU] Re: [PATCH cr 11/16] restore: restore content of private mappings before forking children

Pavel Emelyanov xemul at parallels.com
Tue Oct 30 12:38:56 EDT 2012


> +
> +		p = (void *) (va - vma->vma.start +
> +					vma_premmaped_start(&vma->vma));

Plz, add a comment saying that this page is not yet COW-ed and its contents
can and will be inherited from parent.

> +		if (memcmp(p, buf, PAGE_SIZE) == 0)
> +			continue;
> +
> +		memcpy(p, buf, PAGE_SIZE);

Can we use vmsplice with _GIFT flag for optimization?

> +	}
> +	close(fd);
> +
> +	return 0;
> +}
> +
>  static int read_vmas(int pid)
>  {
>  	int fd, ret = 0;


More information about the CRIU mailing list