Lines Matching refs:nr_pages
208 static enum bp_state increase_reservation(unsigned long nr_pages) in increase_reservation() argument
219 if (nr_pages > ARRAY_SIZE(frame_list)) in increase_reservation()
220 nr_pages = ARRAY_SIZE(frame_list); in increase_reservation()
223 for (i = 0; i < nr_pages; i++) { in increase_reservation()
225 nr_pages = i; in increase_reservation()
233 reservation.nr_extents = nr_pages; in increase_reservation()
269 static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp) in decrease_reservation() argument
281 if (nr_pages > ARRAY_SIZE(frame_list)) in decrease_reservation()
282 nr_pages = ARRAY_SIZE(frame_list); in decrease_reservation()
284 for (i = 0; i < nr_pages; i++) { in decrease_reservation()
286 nr_pages = i; in decrease_reservation()
310 for (i = 0; i < nr_pages; i++) { in decrease_reservation()
317 reservation.nr_extents = nr_pages; in decrease_reservation()
319 BUG_ON(ret != nr_pages); in decrease_reservation()
321 balloon_stats.current_pages -= nr_pages; in decrease_reservation()
378 int alloc_xenballooned_pages(int nr_pages, struct page** pages) in alloc_xenballooned_pages() argument
383 while (pgno < nr_pages) { in alloc_xenballooned_pages()
389 st = decrease_reservation(nr_pages - pgno, GFP_HIGHUSER); in alloc_xenballooned_pages()
411 void free_xenballooned_pages(int nr_pages, struct page** pages) in free_xenballooned_pages() argument
417 for (i = 0; i < nr_pages; i++) { in free_xenballooned_pages()
432 unsigned long pfn, nr_pages, extra_pfn_end; in balloon_init() local
441 nr_pages = xen_start_info->nr_pages; in balloon_init()
443 nr_pages = max_pfn; in balloon_init()
444 balloon_stats.current_pages = min(nr_pages, max_pfn); in balloon_init()