perf improvement

This commit is contained in:
asafpamzn 2025-12-01 18:25:25 +02:00
parent f060d6d938
commit 5e2f5c022e
No known key found for this signature in database

View file

@ -986,9 +986,16 @@ static int uffd_copy(struct lazy_pages_info *lpi, __u64 address, unsigned long *
uffdio_copy.copy = 0;
lp_debug(lpi, "uffd_copy: 0x%llx/%ld\n", uffdio_copy.dst, len);
if (ioctl(lpi->lpfd.fd, UFFDIO_COPY, &uffdio_copy) &&
uffd_check_op_error(lpi, "copy", nr_pages, uffdio_copy.copy))
return -1;
if (ioctl(lpi->lpfd.fd, UFFDIO_COPY, &uffdio_copy) {
if (errno == EAGAIN) {
lp_err(lpi, "uffd_copy EAGAIN: 0x%llx/%ld\n", uffdio_copy.dst, len);
}
if ( uffd_check_op_error(lpi, "copy", nr_pages, uffdio_copy.copy))
{
lp_err(lpi, "uffd_copy EAGAIN: 0x%llx/%ld uffdio_copy.copy=%ld\n", uffdio_copy.dst, len, uffdio_copy.copy);
return -1;
}
}
lpi->copied_pages += *nr_pages;