Lines Matching refs:page

143  * @VMW_BALLOON_CMD_LOCK: Informs the hypervisor about a ballooned page.
144 * @VMW_BALLOON_CMD_UNLOCK: Informs the hypervisor about a page that is about
256 * @pfn: the physical frame number of the page to be locked or unlocked.
266 * @max_page_size: maximum supported page size for ballooning.
273 * @size: balloon actual size in basic page size (frames).
281 * @target: balloon target size in basic page size (frames).
309 * @batch_page: pointer to communication batch page.
311 * When batching is used, batch_page points to a page, which holds up to
321 * disabled, only a single page can be locked/unlock on each operation.
328 * @page: page to be locked/unlocked by the hypervisor
330 * @page is only used when batching is disabled and a single page is
335 struct page *page;
575 * vmballoon_page_order() - return the order of the page
576 * @page_size: the size of the page.
587 * vmballoon_page_in_frames() - returns the number of frames in a page.
588 * @page_size: the size of the page.
599 * vmballoon_mark_page_offline() - mark a page as offline
600 * @page: pointer for the page.
601 * @page_size: the size of the page.
604 vmballoon_mark_page_offline(struct page *page,
610 __SetPageOffline(page + i);
614 * vmballoon_mark_page_online() - mark a page as online
615 * @page: pointer for the page.
616 * @page_size: the size of the page.
619 vmballoon_mark_page_online(struct page *page,
625 __ClearPageOffline(page + i);
670 struct page *page;
676 * before. This happens when 2MB page rejected during inflation
680 page = list_first_entry(&ctl->prealloc_pages,
681 struct page, lru);
682 list_del(&page->lru);
685 page = alloc_pages(__GFP_HIGHMEM|__GFP_NOWARN|
688 page = balloon_page_alloc();
694 if (page) {
695 /* Success. Add the page to the list and continue. */
696 list_add(&page->lru, &ctl->pages);
712 * vmballoon_handle_one_result - Handle lock/unlock result for a single page.
715 * @page: pointer for the page whose result should be handled.
716 * @page_size: size of the page.
719 static int vmballoon_handle_one_result(struct vmballoon *b, struct page *page,
723 /* On success do nothing. The page is already on the balloon list. */
728 page_to_pfn(page), status,
742 * @idx: index for the page for which the operation is performed.
743 * @p: pointer to where the page struct is returned.
746 * an individual page. Provides the page that the operation was performed on on
747 * the @page argument.
749 * Returns: The status of a lock or unlock operation for an individual page.
752 struct page **p)
761 *p = b->page;
766 * page status. So for non-batching mode, the indication is always of
776 * @page_size: size of the page.
779 * Notify the host about page(s) that were ballooned (or removed from the
782 * check the return value and maybe submit a different page. The pages that are
783 * inflated/deflated are pointed by @b->page.
810 pfn = page_to_pfn(b->page);
821 * vmballoon_add_page - adds a page towards lock/unlock operation.
824 * @idx: index of the page to be ballooned in this batch.
825 * @p: pointer to the page that is about to be ballooned.
827 * Adds the page to be ballooned. Must be called while holding @comm_lock.
830 struct page *p)
838 b->page = p;
848 * according to @ctl). If the host rejects the page put it on the
849 * @ctl refuse list. These refused page are then released when moving to the
852 * Note that we neither free any @page here nor put them back on the ballooned
854 * reasons. First, we do not want to free the page under the lock. Second, it
863 struct page *page;
874 list_for_each_entry(page, &ctl->pages, lru)
875 vmballoon_add_page(b, i++, page);
888 status = vmballoon_status_page(b, i, &page);
898 if (!vmballoon_handle_one_result(b, page, ctl->page_size,
906 list_move(&page->lru, &ctl->refused_pages);
917 * vmballoon_release_page_list() - Releases a page list
929 struct page *page, *tmp;
931 list_for_each_entry_safe(page, tmp, page_list, lru) {
932 list_del(&page->lru);
933 __free_pages(page, vmballoon_page_order(page_size));
998 * Enqueues the provides list of pages in the ballooned page list, clears the
1007 struct page *page;
1018 list_for_each_entry(page, pages, lru) {
1019 vmballoon_mark_page_offline(page, VMW_BALLOON_2M_PAGE);
1032 * vmballoon_dequeue_page_list() - Dequeues page lists for deflation.
1050 struct page *page, *tmp;
1063 list_for_each_entry_safe(page, tmp, &b->huge_pages, lru) {
1064 vmballoon_mark_page_online(page, VMW_BALLOON_2M_PAGE);
1066 list_move(&page->lru, pages);
1089 struct page *page, *tmp;
1094 list_for_each_entry_safe(page, tmp, &ctl->refused_pages, lru) {
1095 list_del(&page->lru);
1096 split_page(page, order);
1098 list_add(&page[i].lru, &ctl->prealloc_pages);
1154 * the maximum allowed, move to the next page size.
1193 * Return: The number of deflated frames (i.e., basic page size units)
1234 * Calculate the number of frames based on current page size,
1256 * page size, and would eventually try again later.
1262 * Check if we deflated enough. We will move to the next page
1304 * Disables batching, by deallocating the page for communication with the
1320 * Enables batching, by allocating a page for communication with the hypervisor
1327 struct page *page;
1329 page = alloc_page(GFP_KERNEL | __GFP_ZERO);
1330 if (!page)
1333 b->batch_page = page_address(page);
1522 * @sc: page reclaim information.
1563 * @sc: page reclaim information.
1753 * vmballoon_migratepage() - migrates a balloon page.
1755 * @newpage: the page to which @page should be migrated.
1756 * @page: a ballooned page that should be migrated.
1764 * with that specific page.
1767 struct page *newpage, struct page *page,
1786 * hypervisor may tell us that it has enough memory and the new page is
1787 * not needed. Since the old page is isolated, we cannot use the list
1791 vmballoon_add_page(b, 0, page);
1796 status = vmballoon_status_page(b, 0, &page);
1809 * The page is isolated, so it is safe to delete it without holding
1813 balloon_page_delete(page);
1815 put_page(page);
1829 * A failure happened. While we can deflate the page we just
1838 * Success. Take a reference for the page, and we will add it to
1956 balloon.page = NULL;