Lines Matching refs:page
26 * Balloon device works in 4K page units. So each page is pointed to by
28 * page units.
38 /* The order of free page blocks to report to host */
40 /* The size of a free page block in bytes */
68 /* The free page reporting work item submitted to the balloon wq */
84 /* The number of free page blocks on the above list */
105 * Each page on this list adds VIRTIO_BALLOON_PAGES_PER_PAGE
126 /* Free page reporting device */
136 static u32 page_to_balloon_pfn(struct page *page)
138 unsigned long pfn = page_to_pfn(page);
141 /* Convert pfn from Linux page size to balloon page size. */
196 __virtio32 pfns[], struct page *page)
203 * Set balloon pfns pointing at this page.
204 * Note that the first pfn points at start of the page.
208 page_to_balloon_pfn(page) + i);
215 struct page *page;
223 struct page *page = balloon_page_alloc();
225 if (!page) {
234 balloon_page_push(&pages, page);
241 while ((page = balloon_page_pop(&pages))) {
242 balloon_page_enqueue(&vb->vb_dev_info, page);
244 set_page_pfns(vb, vb->pfns + vb->num_pfns, page);
248 adjust_managed_page_count(page, -1);
264 struct page *page, *next;
266 list_for_each_entry_safe(page, next, pages, lru) {
269 adjust_managed_page_count(page, 1);
270 list_del(&page->lru);
271 put_page(page); /* balloon reference */
278 struct page *page;
290 page = balloon_page_dequeue(vb_dev_info);
291 if (!page)
293 set_page_pfns(vb, vb->pfns + vb->num_pfns, page);
294 list_add(&page->lru, &pages);
406 * Aligned up to guest page size to avoid inflating and deflating
417 struct page *page;
422 page = balloon_page_pop(&vb->free_page_list);
423 if (!page)
425 free_pages((unsigned long)page_address(page),
628 struct page *page;
637 page = alloc_pages(VIRTIO_BALLOON_FREE_PAGE_ALLOC_FLAG,
643 if (!page)
646 p = page_address(page);
658 balloon_page_push(&vb->free_page_list, page);
663 * The vq has no available entry to add this page block, so
688 * The free page blocks are allocated and sent to host one by
713 dev_err(dev, "Failed to send a free page, err = %d\n", err);
740 * virtballoon_migratepage - perform the balloon page migration on behalf of
741 * a compation thread. (called under page lock)
743 * @newpage: page that will replace the isolated page after migration finishes.
744 * @page : the isolated (old) page that is about to be migrated to newpage.
745 * @mode : compaction mode -- not used for balloon page migration.
747 * After a ballooned page gets isolated by compaction procedures, this is the
748 * function that performs the page migration on behalf of a compaction thread
749 * The page migration for virtio balloon is done in a simple swap fashion which
752 * 2) update the host about the old page removed from vb->pages list;
754 * This function preforms the balloon page migration task.
758 struct page *newpage, struct page *page, enum migrate_mode mode)
767 * this turn, as it is easier to retry the page migration later.
778 * When we migrate a page to a different zone and adjusted the
779 * managed page count when inflating, we have to fixup the count of
783 page_zone(page) != page_zone(newpage)) {
784 adjust_managed_page_count(page, 1);
788 /* balloon's page migration 1st step -- inflate "newpage" */
798 /* balloon's page migration 2nd step -- deflate "page" */
800 balloon_page_delete(page);
803 set_page_pfns(vb, vb->pfns, page);
808 put_page(page); /* balloon reference */
933 * size needs to be at least two to report free page hints.
1118 * page reporting as it could potentially change the contents