Lines Matching full:pages

130     /// the amount of pages which were already initialized on page faults.
134 /// MoveToStaging copies chunks of consecutive pages next to each other on the guest memory to the
146 // Remove chunks of pages at once to reduce madvise(2) syscall. in execute()
339 /// Clear the internal state for the pages.
341 /// When pages are removed by madvise with `MADV_DONTNEED` or `MADV_REMOVE`, userfaultfd
361 // TODO(b/269983521): Clear multiple pages in the same region at once. in handle_page_remove()
374 // Erase the pages from the disk because the pages are removed from the guest memory. in handle_page_remove()
381 /// Move active pages in the memory region to the staging memory.
383 /// It only moves active contents in the guest memory to the swap file and skips empty pages
384 /// (e.g. pages not touched, freed by balloon) using `lseek(2)` + `SEEK_HOLE/DATA`.
386 /// Returns the count of moved out pages.
501 // Remove the batch of pages at once to reduce madvise(2) syscall. in move_to_staging()
510 // Remove the final batch of pages. in move_to_staging()
525 /// Write a chunk of consecutive pages in the staging memory to the swap file.
527 /// If there is no active pages in the staging memory, this returns `Ok(0)`.
529 /// The pages in guest memory have been moved to staging memory by [Self::move_to_staging()].
531 /// Returns the count of swapped out pages.
534 /// and `PageHandler` can continue working with a little pages leaking in staging memory or swap
535 /// file. The leaked pages are removed when vmm-swap is disabled and `PageHandler` is dropped.
549 let pages = idx_range.end - idx_range.start; in swap_out() localVariable
561 return Ok(pages); in swap_out()
587 /// Returns count of pages copied from vmm-swap file to the guest memory.
597 /// Returns count of pages copied from staging memory to the guest memory.
607 /// Returns count of pages initialized with zero.
612 /// Returns count of pages which were already initialized on page faults.
622 /// Returns count of pages present in the staging memory.
632 /// Returns count of pages present in the swap files.
657 /// Swap in a chunk of consecutive pages from the staging memory and the swap file.
659 /// If there is no more pages present outside of the guest memory, this returns `Ok(0)`.
661 /// Returns the count of swapped in pages.
670 // Request the kernel to pre-populate the present pages in the swap file to page cache in swap_in()
671 // background. At most 16MB of pages will be populated. in swap_in()
672 // The threshold is to apply MADV_WILLNEED to bigger chunk of pages. The kernel populates in swap_in()
673 // consecutive pages at once on MADV_WILLNEED. in swap_in()
684 let pages = idx_range.end - idx_range.start; in swap_in() localVariable
692 region.swap_in_pages += pages; in swap_in()
693 return Ok(pages); in swap_in()
707 // The consecutive pages can be across regions. Swap-in pages in a region at in swap_in()
711 let pages = idx_range_in_file.end - idx_range_in_file.start; in swap_in() localVariable
719 // Do not erase each chunk of pages from disk on swap_in. The whole file will be in swap_in()
723 region.swap_in_pages += pages; in swap_in()
725 return Ok(pages); in swap_in()
727 // File has remaining pages, but regions has been consumed. in swap_in()
747 /// This drops 2 types of pages in the staging memory to reduce disk write.
749 /// * Clean pages
750 /// * The pages which have been swapped out to the disk and have not been changed.
751 /// * Drop the pages in the staging memory and mark it as present on the swap file.
752 /// * Zero pages
753 /// * Drop the pages in the staging memory. The pages will be UFFD_ZEROed on page fault.
758 /// The page idx range of pages which have been stored in the swap file.
765 /// Trim pages in the staging memory.
767 /// This returns the pages trimmed. This returns `None` if it traversed all pages in the staging
772 /// `max_size` - The maximum pages to be compared.
792 // been changed, zero checking is useless, but less cost than file I/O for the pages in trim_pages()
808 error!("pages are mlock(2)ed while trimming"); in trim_pages()
838 /// Total trimmed clean pages.
843 /// Total trimmed zero pages.