Lines Matching full:pages

5  * Common interface for making balloon pages movable by compaction.
30 * balloon_page_list_enqueue() - inserts a list of pages into the balloon page
33 * @pages: pages to enqueue - allocated using balloon_page_alloc.
35 * Driver must call this function to properly enqueue balloon pages before
38 * Return: number of pages that were enqueued.
41 struct list_head *pages) in balloon_page_list_enqueue() argument
48 list_for_each_entry_safe(page, tmp, pages, lru) { in balloon_page_list_enqueue()
59 * balloon_page_list_dequeue() - removes pages from balloon's page list and
60 * returns a list of the pages.
62 * @pages: pointer to the list of pages that would be returned to the caller.
63 * @n_req_pages: number of requested pages.
66 * balloon pages before definitively releasing it back to the guest system.
67 * This function tries to remove @n_req_pages from the ballooned pages and
68 * return them to the caller in the @pages list.
70 * Note that this function may fail to dequeue some pages even if the balloon
72 * of isolated pages.
74 * Return: number of pages that were added to the @pages list.
77 struct list_head *pages, size_t n_req_pages) in balloon_page_list_dequeue() argument
84 list_for_each_entry_safe(page, tmp, &b_dev_info->pages, lru) { in balloon_page_list_dequeue()
104 list_add(&page->lru, pages); in balloon_page_list_dequeue()
142 * Drivers must not call balloon_page_enqueue on pages that have been pushed to
144 * enqueue a list of pages, use balloon_page_list_enqueue instead.
166 * function is called only if some pages are actually enqueued.
168 * Note that this function may fail to dequeue some pages even if there are
169 * some enqueued pages - since the page list can be temporarily empty due to
170 * the compaction of isolated pages.
173 * until all pages can be dequeued.
180 LIST_HEAD(pages); in balloon_page_dequeue()
183 n_pages = balloon_page_list_dequeue(b_dev_info, &pages, 1); in balloon_page_dequeue()
188 * list is empty and there are no isolated pages, then something in balloon_page_dequeue()
189 * went out of track and some balloon pages are lost. in balloon_page_dequeue()
191 * an infinite loop while attempting to release all its pages. in balloon_page_dequeue()
194 if (unlikely(list_empty(&b_dev_info->pages) && in balloon_page_dequeue()
200 return list_first_entry(&pages, struct page, lru); in balloon_page_dequeue()
226 list_add(&page->lru, &b_dev_info->pages); in balloon_page_putback()
241 * is unlikely to be used with balloon pages. See include/linux/hmm.h in balloon_page_migrate()