Lines Matching refs:nr_pages

1378 static unsigned long preallocate_image_pages(unsigned long nr_pages, gfp_t mask)  in preallocate_image_pages()  argument
1382 while (nr_pages > 0) { in preallocate_image_pages()
1393 nr_pages--; in preallocate_image_pages()
1400 static unsigned long preallocate_image_memory(unsigned long nr_pages, in preallocate_image_memory() argument
1409 if (nr_pages < alloc) in preallocate_image_memory()
1410 alloc = nr_pages; in preallocate_image_memory()
1416 static unsigned long preallocate_image_highmem(unsigned long nr_pages) in preallocate_image_highmem() argument
1418 return preallocate_image_pages(nr_pages, GFP_IMAGE | __GFP_HIGHMEM); in preallocate_image_highmem()
1431 static unsigned long preallocate_highmem_fraction(unsigned long nr_pages, in preallocate_highmem_fraction() argument
1435 unsigned long alloc = __fraction(nr_pages, highmem, total); in preallocate_highmem_fraction()
1440 static inline unsigned long preallocate_image_highmem(unsigned long nr_pages) in preallocate_image_highmem() argument
1445 static inline unsigned long preallocate_highmem_fraction(unsigned long nr_pages, in preallocate_highmem_fraction() argument
1736 static int enough_free_mem(unsigned int nr_pages, unsigned int nr_highmem) in enough_free_mem() argument
1745 nr_pages += count_pages_for_highmem(nr_highmem); in enough_free_mem()
1747 nr_pages, PAGES_FOR_IO, free); in enough_free_mem()
1749 return free > nr_pages + PAGES_FOR_IO; in enough_free_mem()
1808 unsigned int nr_pages, unsigned int nr_highmem) in swsusp_alloc() argument
1815 nr_pages += alloc_highmem_pages(copy_bm, nr_highmem); in swsusp_alloc()
1818 if (nr_pages > alloc_normal) { in swsusp_alloc()
1819 nr_pages -= alloc_normal; in swsusp_alloc()
1820 while (nr_pages-- > 0) { in swsusp_alloc()
1839 unsigned int nr_pages, nr_highmem; in swsusp_save() local
1844 nr_pages = count_data_pages(); in swsusp_save()
1846 printk(KERN_INFO "PM: Need to copy %u pages\n", nr_pages + nr_highmem); in swsusp_save()
1848 if (!enough_free_mem(nr_pages, nr_highmem)) { in swsusp_save()
1853 if (swsusp_alloc(&orig_bm, &copy_bm, nr_pages, nr_highmem)) { in swsusp_save()
1870 nr_pages += nr_highmem; in swsusp_save()
1871 nr_copy_pages = nr_pages; in swsusp_save()
1872 nr_meta_pages = DIV_ROUND_UP(nr_pages * sizeof(long), PAGE_SIZE); in swsusp_save()
1875 nr_pages); in swsusp_save()
2336 unsigned int nr_pages, nr_highmem; in prepare_image() local
2368 nr_pages = nr_copy_pages - nr_highmem - allocated_unsafe_pages; in prepare_image()
2369 nr_pages = DIV_ROUND_UP(nr_pages, PBES_PER_LINKED_PAGE); in prepare_image()
2370 while (nr_pages > 0) { in prepare_image()
2378 nr_pages--; in prepare_image()
2382 nr_pages = nr_copy_pages - nr_highmem - allocated_unsafe_pages; in prepare_image()
2383 while (nr_pages > 0) { in prepare_image()
2397 nr_pages--; in prepare_image()