mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 13:28:27 +00:00
criu: lazy-pages: copy remaining IOVs in chunks
travis-ci: success for uffd: A new set of improvements Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
0d5d286feb
commit
20d7eb4c56
@ -595,24 +595,19 @@ static int uffd_handle_pages(struct lazy_pages_info *lpi, __u64 address, int nr)
|
|||||||
static int handle_remaining_pages(struct lazy_pages_info *lpi)
|
static int handle_remaining_pages(struct lazy_pages_info *lpi)
|
||||||
{
|
{
|
||||||
struct lazy_iovec *lazy_iov;
|
struct lazy_iovec *lazy_iov;
|
||||||
int nr_pages, i, err;
|
int nr_pages, err;
|
||||||
unsigned long addr;
|
|
||||||
|
|
||||||
lpi->pr.reset(&lpi->pr);
|
lpi->pr.reset(&lpi->pr);
|
||||||
|
|
||||||
list_for_each_entry(lazy_iov, &lpi->iovs, l) {
|
list_for_each_entry(lazy_iov, &lpi->iovs, l) {
|
||||||
nr_pages = lazy_iov->len / PAGE_SIZE;
|
nr_pages = lazy_iov->len / PAGE_SIZE;
|
||||||
|
|
||||||
for (i = 0; i < nr_pages; i++) {
|
err = uffd_handle_pages(lpi, lazy_iov->base, nr_pages);
|
||||||
addr = lazy_iov->base + i * PAGE_SIZE;
|
|
||||||
|
|
||||||
err = uffd_handle_pages(lpi, addr, 1);
|
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
pr_err("Error during UFFD copy\n");
|
pr_err("Error during UFFD copy\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user