Lines Matching refs:page
141 * @VMW_BALLOON_CMD_LOCK: Informs the hypervisor about a ballooned page.
142 * @VMW_BALLOON_CMD_UNLOCK: Informs the hypervisor about a page that is about
254 * @pfn: the physical frame number of the page to be locked or unlocked.
264 * @max_page_size: maximum supported page size for ballooning.
271 * @size: balloon actual size in basic page size (frames).
279 * @target: balloon target size in basic page size (frames).
307 * @batch_page: pointer to communication batch page.
309 * When batching is used, batch_page points to a page, which holds up to
319 * disabled, only a single page can be locked/unlock on each operation.
326 * @page: page to be locked/unlocked by the hypervisor
328 * @page is only used when batching is disabled and a single page is
333 struct page *page;
568 * vmballoon_page_order() - return the order of the page
569 * @page_size: the size of the page.
580 * vmballoon_page_in_frames() - returns the number of frames in a page.
581 * @page_size: the size of the page.
592 * vmballoon_mark_page_offline() - mark a page as offline
593 * @page: pointer for the page.
594 * @page_size: the size of the page.
597 vmballoon_mark_page_offline(struct page *page,
603 __SetPageOffline(page + i);
607 * vmballoon_mark_page_online() - mark a page as online
608 * @page: pointer for the page.
609 * @page_size: the size of the page.
612 vmballoon_mark_page_online(struct page *page,
618 __ClearPageOffline(page + i);
663 struct page *page;
669 * before. This happens when 2MB page rejected during inflation
673 page = list_first_entry(&ctl->prealloc_pages,
674 struct page, lru);
675 list_del(&page->lru);
678 page = alloc_pages(__GFP_HIGHMEM|__GFP_NOWARN|
681 page = balloon_page_alloc();
687 if (page) {
688 /* Success. Add the page to the list and continue. */
689 list_add(&page->lru, &ctl->pages);
705 * vmballoon_handle_one_result - Handle lock/unlock result for a single page.
708 * @page: pointer for the page whose result should be handled.
709 * @page_size: size of the page.
712 static int vmballoon_handle_one_result(struct vmballoon *b, struct page *page,
716 /* On success do nothing. The page is already on the balloon list. */
721 page_to_pfn(page), status,
735 * @idx: index for the page for which the operation is performed.
736 * @p: pointer to where the page struct is returned.
739 * an individual page. Provides the page that the operation was performed on on
740 * the @page argument.
742 * Returns: The status of a lock or unlock operation for an individual page.
745 struct page **p)
754 *p = b->page;
759 * page status. So for non-batching mode, the indication is always of
769 * @page_size: size of the page.
772 * Notify the host about page(s) that were ballooned (or removed from the
775 * check the return value and maybe submit a different page. The pages that are
776 * inflated/deflated are pointed by @b->page.
803 pfn = page_to_pfn(b->page);
814 * vmballoon_add_page - adds a page towards lock/unlock operation.
817 * @idx: index of the page to be ballooned in this batch.
818 * @p: pointer to the page that is about to be ballooned.
820 * Adds the page to be ballooned. Must be called while holding @comm_lock.
823 struct page *p)
831 b->page = p;
841 * according to @ctl). If the host rejects the page put it on the
842 * @ctl refuse list. These refused page are then released when moving to the
845 * Note that we neither free any @page here nor put them back on the ballooned
847 * reasons. First, we do not want to free the page under the lock. Second, it
856 struct page *page;
867 list_for_each_entry(page, &ctl->pages, lru)
868 vmballoon_add_page(b, i++, page);
881 status = vmballoon_status_page(b, i, &page);
891 if (!vmballoon_handle_one_result(b, page, ctl->page_size,
899 list_move(&page->lru, &ctl->refused_pages);
910 * vmballoon_release_page_list() - Releases a page list
922 struct page *page, *tmp;
924 list_for_each_entry_safe(page, tmp, page_list, lru) {
925 list_del(&page->lru);
926 __free_pages(page, vmballoon_page_order(page_size));
991 * Enqueues the provides list of pages in the ballooned page list, clears the
1000 struct page *page;
1011 list_for_each_entry(page, pages, lru) {
1012 vmballoon_mark_page_offline(page, VMW_BALLOON_2M_PAGE);
1025 * vmballoon_dequeue_page_list() - Dequeues page lists for deflation.
1043 struct page *page, *tmp;
1056 list_for_each_entry_safe(page, tmp, &b->huge_pages, lru) {
1057 vmballoon_mark_page_online(page, VMW_BALLOON_2M_PAGE);
1059 list_move(&page->lru, pages);
1082 struct page *page, *tmp;
1087 list_for_each_entry_safe(page, tmp, &ctl->refused_pages, lru) {
1088 list_del(&page->lru);
1089 split_page(page, order);
1091 list_add(&page[i].lru, &ctl->prealloc_pages);
1147 * the maximum allowed, move to the next page size.
1186 * Return: The number of deflated frames (i.e., basic page size units)
1227 * Calculate the number of frames based on current page size,
1249 * page size, and would eventually try again later.
1255 * Check if we deflated enough. We will move to the next page
1297 * Disables batching, by deallocating the page for communication with the
1313 * Enables batching, by allocating a page for communication with the hypervisor
1320 struct page *page;
1322 page = alloc_page(GFP_KERNEL | __GFP_ZERO);
1323 if (!page)
1326 b->batch_page = page_address(page);
1515 * @sc: page reclaim information.
1556 * @sc: page reclaim information.
1732 * vmballoon_migratepage() - migrates a balloon page.
1734 * @newpage: the page to which @page should be migrated.
1735 * @page: a ballooned page that should be migrated.
1743 * with that specific page.
1746 struct page *newpage, struct page *page,
1765 * hypervisor may tell us that it has enough memory and the new page is
1766 * not needed. Since the old page is isolated, we cannot use the list
1770 vmballoon_add_page(b, 0, page);
1775 status = vmballoon_status_page(b, 0, &page);
1788 * The page is isolated, so it is safe to delete it without holding
1792 balloon_page_delete(page);
1794 put_page(page);
1808 * A failure happened. While we can deflate the page we just
1817 * Success. Take a reference for the page, and we will add it to
1900 balloon.page = NULL;