[CRIU] [PATCH v5 0/8] lazy-pages: add support for remote pages
Mike Rapoport
mike.rapoport at gmail.com
Sat Jul 2 22:14:23 PDT 2016
On Thu, Jun 30, 2016 at 3:53 PM, Adrian Reber <areber at redhat.com> wrote:
> I also tried this version of your patches and it still works.
>
> I like that the pages are now marked as lazy/zero during dump. This is
> something I thought being necessary when combining pre-copy and
> post-copy.
>
> Looking with crit at the output of my pagemap I see, in my example, that
> 0x7ffc8829b000 is only marked as lazy but not as zero. Lazy restoring the
> process claims that it is a zero page:
>
> (08.030380) lazy-pages: uffdio_zeropage.range.start 0x7ffc8829b000
> (08.030410) lazy-pages: ioctl UFFDIO_ZEROPAGE rc 0x0
Hmm, this seems like a bug :(
> It is not clear to me if that is the way it is supposed to be or if
> something is going wrong.
>
> Also, when the restore finishes the uffd daemon claims that not all pages have
> been transferred, which can be solved with the following simple patch:
Thanks for the fix
> diff --git a/criu/uffd.c b/criu/uffd.c
> index 9dee9d9..00180dd 100644
> --- a/criu/uffd.c
> +++ b/criu/uffd.c
> @@ -418,6 +418,7 @@ static int uffd_zero_page(struct lazy_pages_info *lpi, __u64 address)
> return -1;
> }
>
> + lpi->copied_pages++;
> return ps;
> }
>
>
>
> Adrian
>
>
> On Wed, Jun 29, 2016 at 08:55:05AM +0300, Mike Rapoport wrote:
>> Hi,
>>
>> Yet another respin.
>> The most significant difference is addition of lazy and zero pages notion.
>> This makes the pagemap somewaht more consistent. The zero pages were not
>> strictly necessary for the current series, but I think that this
>> information will be very relevant for lazy-pages performance optimizations.
>>
>> v5 changes:
>> * added notion of zero pages and lazy pages in the pagemap.
>> * added several tcp_{cork,nodelay} to speedup network tranfers
>>
>> v4 changes:
>> * fixed ppb_alloc_resize to pass nr_pages instead of nr_bytes to fcntl
>> * added removal of ppb's right after they are spliced to socked
>>
>> v3 changes:
>> * fixed initialization of pp->own_iovs, thanks Mr. Jenkins
>>
>> v2 changes:
>> * added helpers to page-xfer to reduce code duplication
>> * modified protocol between dump side page server and lazy pages daemon as
>> per Pavel's comments
>> * some changes in the way parasite_dump_pages_seized is refactored. There's
>> still more to improve here, even without addition of lazy pages support :)
>>
>> TODO:
>> * cointinue refactoring of page-reader to support random access and remote
>> page reads
>> * make lazy-pages non-blocking with respect to #PFs
>> * performance imporvements
>>
>> Mike Rapoport (8):
>> criu: page-pipe: add ability to allocate IOVs
>> criu: slightly refactor memory dump to support delaying it
>> criu: page-pipe: add a wrapping structure for holes and pages iovs
>> criu: page-{pipe,xfer}: add helper function for dumping holes
>> criu: pagemap: add entries for zero pages
>> criu: add ability to skip writing lazy pages
>> criu: page-xfer: add PS_IOV_GET interface
>> criu: lazy-pages: enable remoting of lazy pages
>>
>> criu/cr-dump.c | 57 +++++++---
>> criu/include/mem.h | 3 +-
>> criu/include/page-pipe.h | 33 ++++--
>> criu/include/page-xfer.h | 6 +-
>> criu/include/parasite-syscall.h | 1 -
>> criu/include/pstree.h | 2 +
>> criu/include/stats.h | 2 +
>> criu/mem.c | 72 ++++++++-----
>> criu/page-pipe.c | 102 +++++++++++-------
>> criu/page-xfer.c | 234 ++++++++++++++++++++++++++++++----------
>> criu/pagemap.c | 27 +++--
>> criu/parasite-syscall.c | 2 +
>> criu/shmem.c | 13 +--
>> criu/stats.c | 2 +
>> criu/uffd.c | 9 +-
>> images/pagemap.proto | 2 +
>> images/stats.proto | 3 +
>> 17 files changed, 402 insertions(+), 168 deletions(-)
>>
>> --
>> 1.9.1
>>
--
Sincerely yours,
Mike.
More information about the CRIU
mailing list