• Home
  • Raw
  • Download

Lines Matching refs:page

148 static void balloon_append(struct page *page)  in balloon_append()  argument
150 __SetPageOffline(page); in balloon_append()
153 if (PageHighMem(page)) { in balloon_append()
154 list_add_tail(&page->lru, &ballooned_pages); in balloon_append()
157 list_add(&page->lru, &ballooned_pages); in balloon_append()
164 static struct page *balloon_retrieve(bool require_lowmem) in balloon_retrieve()
166 struct page *page; in balloon_retrieve() local
171 page = list_entry(ballooned_pages.next, struct page, lru); in balloon_retrieve()
172 if (require_lowmem && PageHighMem(page)) in balloon_retrieve()
174 list_del(&page->lru); in balloon_retrieve()
176 if (PageHighMem(page)) in balloon_retrieve()
181 __ClearPageOffline(page); in balloon_retrieve()
182 return page; in balloon_retrieve()
185 static struct page *balloon_next_page(struct page *page) in balloon_next_page() argument
187 struct list_head *next = page->lru.next; in balloon_next_page()
190 return list_entry(next, struct page, lru); in balloon_next_page()
340 static void xen_online_page(struct page *page, unsigned int order) in xen_online_page() argument
343 unsigned long start_pfn = page_to_pfn(page); in xen_online_page()
344 struct page *p; in xen_online_page()
390 struct page *page; in increase_reservation() local
395 page = list_first_entry_or_null(&ballooned_pages, struct page, lru); in increase_reservation()
397 if (!page) { in increase_reservation()
402 frame_list[i] = page_to_xen_pfn(page); in increase_reservation()
403 page = balloon_next_page(page); in increase_reservation()
411 page = balloon_retrieve(false); in increase_reservation()
412 BUG_ON(page == NULL); in increase_reservation()
414 xenmem_reservation_va_mapping_update(1, &page, &frame_list[i]); in increase_reservation()
417 free_reserved_page(page); in increase_reservation()
429 struct page *page, *tmp; in decrease_reservation() local
437 page = alloc_page(gfp); in decrease_reservation()
438 if (page == NULL) { in decrease_reservation()
443 adjust_managed_page_count(page, -1); in decrease_reservation()
444 xenmem_reservation_scrub_page(page); in decrease_reservation()
445 list_add(&page->lru, &pages); in decrease_reservation()
462 list_for_each_entry_safe(page, tmp, &pages, lru) { in decrease_reservation()
463 frame_list[i++] = xen_page_to_gfn(page); in decrease_reservation()
465 xenmem_reservation_va_mapping_reset(1, &page); in decrease_reservation()
467 list_del(&page->lru); in decrease_reservation()
469 balloon_append(page); in decrease_reservation()
600 int xen_alloc_ballooned_pages(unsigned int nr_pages, struct page **pages) in xen_alloc_ballooned_pages()
603 struct page *page; in xen_alloc_ballooned_pages() local
611 page = balloon_retrieve(true); in xen_alloc_ballooned_pages()
612 if (page) { in xen_alloc_ballooned_pages()
613 pages[pgno++] = page; in xen_alloc_ballooned_pages()
622 ret = xen_alloc_p2m_entry(page_to_pfn(page)); in xen_alloc_ballooned_pages()
653 void xen_free_ballooned_pages(unsigned int nr_pages, struct page **pages) in xen_free_ballooned_pages()