/linux-2.6.39/drivers/xen/ |
D | balloon.c | 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() [all …]
|
/linux-2.6.39/mm/ |
D | percpu-km.c | 53 const int nr_pages = pcpu_group_sizes[0] >> PAGE_SHIFT; in pcpu_create_chunk() local 62 pages = alloc_pages(GFP_KERNEL, order_base_2(nr_pages)); in pcpu_create_chunk() 68 for (i = 0; i < nr_pages; i++) in pcpu_create_chunk() 78 const int nr_pages = pcpu_group_sizes[0] >> PAGE_SHIFT; in pcpu_destroy_chunk() local 81 __free_pages(chunk->data, order_base_2(nr_pages)); in pcpu_destroy_chunk() 92 size_t nr_pages, alloc_pages; in pcpu_verify_alloc_info() local 100 nr_pages = (ai->groups[0].nr_units * ai->unit_size) >> PAGE_SHIFT; in pcpu_verify_alloc_info() 101 alloc_pages = roundup_pow_of_two(nr_pages); in pcpu_verify_alloc_info() 103 if (alloc_pages > nr_pages) in pcpu_verify_alloc_info() 105 alloc_pages - nr_pages); in pcpu_verify_alloc_info()
|
D | memory_hotplug.c | 152 unsigned long i, pfn, end_pfn, nr_pages; in register_page_bootmem_info_node() local 157 nr_pages = PAGE_ALIGN(sizeof(struct pglist_data)) >> PAGE_SHIFT; in register_page_bootmem_info_node() 160 for (i = 0; i < nr_pages; i++, page++) in register_page_bootmem_info_node() 166 nr_pages = zone->wait_table_hash_nr_entries in register_page_bootmem_info_node() 168 nr_pages = PAGE_ALIGN(nr_pages) >> PAGE_SHIFT; in register_page_bootmem_info_node() 171 for (i = 0; i < nr_pages; i++, page++) in register_page_bootmem_info_node() 219 int nr_pages = PAGES_PER_SECTION; in __add_zone() local 229 nr_pages, MEMMAP_HOTPLUG); in __add_zone() 234 grow_zone_span(zone, phys_start_pfn, phys_start_pfn + nr_pages); in __add_zone() 236 phys_start_pfn + nr_pages); in __add_zone() [all …]
|
D | sparse.c | 209 unsigned long nr_pages = 0; in node_memmap_size_bytes() local 217 nr_pages += PAGES_PER_SECTION; in node_memmap_size_bytes() 220 return nr_pages * sizeof(struct page); in node_memmap_size_bytes() 621 unsigned long nr_pages) in kmalloc_section_memmap() argument 626 static void __kfree_section_memmap(struct page *memmap, unsigned long nr_pages) in __kfree_section_memmap() argument 630 static void free_map_bootmem(struct page *page, unsigned long nr_pages) in free_map_bootmem() argument 634 static struct page *__kmalloc_section_memmap(unsigned long nr_pages) in __kmalloc_section_memmap() argument 637 unsigned long memmap_size = sizeof(struct page) * nr_pages; in __kmalloc_section_memmap() 657 unsigned long nr_pages) in kmalloc_section_memmap() argument 659 return __kmalloc_section_memmap(nr_pages); in kmalloc_section_memmap() [all …]
|
D | page_cgroup.c | 62 unsigned long start_pfn, nr_pages, index; in alloc_node_page_cgroup() local 65 nr_pages = NODE_DATA(nid)->node_spanned_pages; in alloc_node_page_cgroup() 67 if (!nr_pages) in alloc_node_page_cgroup() 70 table_size = sizeof(struct page_cgroup) * nr_pages; in alloc_node_page_cgroup() 76 for (index = 0; index < nr_pages; index++) { in alloc_node_page_cgroup() 219 unsigned long nr_pages, in online_page_cgroup() argument 226 end = ALIGN(start_pfn + nr_pages, PAGES_PER_SECTION); in online_page_cgroup() 244 unsigned long nr_pages, int nid) in offline_page_cgroup() argument 249 end = ALIGN(start_pfn + nr_pages, PAGES_PER_SECTION); in offline_page_cgroup() 265 mn->nr_pages, mn->status_change_nid); in page_cgroup_callback() [all …]
|
/linux-2.6.39/drivers/media/video/ |
D | videobuf-dma-sg.c | 66 int nr_pages) in videobuf_vmalloc_to_sg() argument 72 sglist = vzalloc(nr_pages * sizeof(*sglist)); in videobuf_vmalloc_to_sg() 75 sg_init_table(sglist, nr_pages); in videobuf_vmalloc_to_sg() 76 for (i = 0; i < nr_pages; i++, virt += PAGE_SIZE) { in videobuf_vmalloc_to_sg() 96 int nr_pages, int offset, size_t size) in videobuf_pages_to_sg() argument 103 sglist = vmalloc(nr_pages * sizeof(*sglist)); in videobuf_pages_to_sg() 106 sg_init_table(sglist, nr_pages); in videobuf_pages_to_sg() 113 for (i = 1; i < nr_pages; i++) { in videobuf_pages_to_sg() 176 dma->nr_pages = last-first+1; in videobuf_dma_init_user_locked() 177 dma->pages = kmalloc(dma->nr_pages * sizeof(struct page *), GFP_KERNEL); in videobuf_dma_init_user_locked() [all …]
|
/linux-2.6.39/drivers/gpu/drm/ |
D | drm_buffer.c | 45 int nr_pages = size / PAGE_SIZE + 1; in drm_buffer_alloc() local 50 *buf = kzalloc(sizeof(struct drm_buffer) + nr_pages*sizeof(char *), in drm_buffer_alloc() 56 size, nr_pages); in drm_buffer_alloc() 62 for (idx = 0; idx < nr_pages; ++idx) { in drm_buffer_alloc() 72 idx + 1, size, nr_pages); in drm_buffer_alloc() 104 int nr_pages = size / PAGE_SIZE + 1; in drm_buffer_copy_from_user() local 114 for (idx = 0; idx < nr_pages; ++idx) { in drm_buffer_copy_from_user() 139 int nr_pages = buf->size / PAGE_SIZE + 1; in drm_buffer_free() local 141 for (idx = 0; idx < nr_pages; ++idx) in drm_buffer_free()
|
/linux-2.6.39/drivers/staging/msm/ |
D | memory.c | 161 unsigned long nr_pages, int state) in change_memory_power_state() argument 188 size = nr_pages << PAGE_SHIFT; in change_memory_power_state() 197 unsigned long nr_pages) in platform_physical_remove_pages() argument 199 return change_memory_power_state(start_pfn, nr_pages, in platform_physical_remove_pages() 204 unsigned long nr_pages) in platform_physical_add_pages() argument 206 return change_memory_power_state(start_pfn, nr_pages, MEMORY_ACTIVE); in platform_physical_add_pages() 210 unsigned long nr_pages) in platform_physical_low_power_pages() argument 212 return change_memory_power_state(start_pfn, nr_pages, in platform_physical_low_power_pages()
|
/linux-2.6.39/net/rds/ |
D | info.c | 162 unsigned long nr_pages = 0; in rds_info_getsockopt() local 187 nr_pages = (PAGE_ALIGN(start + len) - (start & PAGE_MASK)) in rds_info_getsockopt() 190 pages = kmalloc(nr_pages * sizeof(struct page *), GFP_KERNEL); in rds_info_getsockopt() 195 ret = get_user_pages_fast(start, nr_pages, 1, pages); in rds_info_getsockopt() 196 if (ret != nr_pages) { in rds_info_getsockopt() 198 nr_pages = ret; in rds_info_getsockopt() 200 nr_pages = 0; in rds_info_getsockopt() 205 rdsdebug("len %d nr_pages %lu\n", len, nr_pages); in rds_info_getsockopt() 237 for (i = 0; pages && i < nr_pages; i++) in rds_info_getsockopt()
|
D | rdma.c | 157 static int rds_pin_pages(unsigned long user_addr, unsigned int nr_pages, in rds_pin_pages() argument 162 ret = get_user_pages_fast(user_addr, nr_pages, write, pages); in rds_pin_pages() 164 if (ret >= 0 && ret < nr_pages) { in rds_pin_pages() 177 unsigned int nr_pages; in __rds_rdma_map() local 197 nr_pages = rds_pages_in_vec(&args->vec); in __rds_rdma_map() 198 if (nr_pages == 0) { in __rds_rdma_map() 204 args->vec.addr, args->vec.bytes, nr_pages); in __rds_rdma_map() 207 pages = kcalloc(nr_pages, sizeof(struct page *), GFP_KERNEL); in __rds_rdma_map() 241 ret = rds_pin_pages(args->vec.addr, nr_pages, pages, 1); in __rds_rdma_map() 487 unsigned int nr_pages; in rds_rdma_pages() local [all …]
|
/linux-2.6.39/drivers/gpu/drm/nouveau/ |
D | nouveau_sgdma.c | 16 unsigned nr_pages; member 43 nvbe->nr_pages = 0; in nouveau_sgdma_populate() 47 nvbe->pages[nvbe->nr_pages] = in nouveau_sgdma_populate() 48 dma_addrs[nvbe->nr_pages]; in nouveau_sgdma_populate() 49 nvbe->ttm_alloced[nvbe->nr_pages] = true; in nouveau_sgdma_populate() 51 nvbe->pages[nvbe->nr_pages] = in nouveau_sgdma_populate() 52 pci_map_page(dev->pdev, pages[nvbe->nr_pages], 0, in nouveau_sgdma_populate() 55 nvbe->pages[nvbe->nr_pages])) { in nouveau_sgdma_populate() 59 nvbe->ttm_alloced[nvbe->nr_pages] = false; in nouveau_sgdma_populate() 62 nvbe->nr_pages++; in nouveau_sgdma_populate() [all …]
|
/linux-2.6.39/kernel/power/ |
D | swap.c | 385 int nr_pages; in save_image() local 396 nr_pages = 0; in save_image() 406 if (!(nr_pages % m)) in save_image() 407 printk(KERN_CONT "\b\b\b\b%3d%%", nr_pages / m); in save_image() 408 nr_pages++; in save_image() 435 int nr_pages; in save_image_lzo() local 479 nr_pages = 0; in save_image_lzo() 493 if (!(nr_pages % m)) in save_image_lzo() 494 printk(KERN_CONT "\b\b\b\b%3d%%", nr_pages / m); in save_image_lzo() 495 nr_pages++; in save_image_lzo() [all …]
|
D | snapshot.c | 1107 static unsigned long preallocate_image_pages(unsigned long nr_pages, gfp_t mask) in preallocate_image_pages() argument 1111 while (nr_pages > 0) { in preallocate_image_pages() 1122 nr_pages--; in preallocate_image_pages() 1129 static unsigned long preallocate_image_memory(unsigned long nr_pages, in preallocate_image_memory() argument 1138 if (nr_pages < alloc) in preallocate_image_memory() 1139 alloc = nr_pages; in preallocate_image_memory() 1145 static unsigned long preallocate_image_highmem(unsigned long nr_pages) in preallocate_image_highmem() argument 1147 return preallocate_image_pages(nr_pages, GFP_IMAGE | __GFP_HIGHMEM); in preallocate_image_highmem() 1160 static unsigned long preallocate_highmem_fraction(unsigned long nr_pages, in preallocate_highmem_fraction() argument 1164 unsigned long alloc = __fraction(nr_pages, highmem, total); in preallocate_highmem_fraction() [all …]
|
/linux-2.6.39/fs/btrfs/ |
D | compression.c | 69 unsigned long nr_pages; member 118 for (i = 0; i < cb->nr_pages; i++) { in check_compressed_csum() 191 for (index = 0; index < cb->nr_pages; index++) { in end_compressed_bio_read() 233 unsigned long nr_pages = end_index - index + 1; in end_compressed_writeback() local 237 while (nr_pages > 0) { in end_compressed_writeback() 240 nr_pages, ARRAY_SIZE(pages)), pages); in end_compressed_writeback() 242 nr_pages -= 1; in end_compressed_writeback() 250 nr_pages -= ret; in end_compressed_writeback() 302 for (index = 0; index < cb->nr_pages; index++) { in end_compressed_bio_write() 328 unsigned long nr_pages) in btrfs_submit_compressed_write() argument [all …]
|
/linux-2.6.39/arch/arm/mach-rpc/include/mach/ |
D | uncompress.h | 23 unsigned long nr_pages; member 119 unsigned int nr_pages = 0, page_size = PAGE_SIZE; in arch_decomp_setup() local 138 nr_pages += (t->u.mem.size / PAGE_SIZE); in arch_decomp_setup() 144 nr_pages = params->nr_pages; in arch_decomp_setup() 189 if (nr_pages * page_size < 4096*1024) error("<4M of mem\n"); in arch_decomp_setup()
|
/linux-2.6.39/arch/ia64/xen/ |
D | grant-table.c | 38 unsigned long nr_pages; in xen_alloc_vm_area() local 45 nr_pages = 1 << order; in xen_alloc_vm_area() 46 scrub_pages(virt, nr_pages); in xen_alloc_vm_area() 56 area->nr_pages = nr_pages; in xen_alloc_vm_area()
|
/linux-2.6.39/drivers/net/ehea/ |
D | ehea_qmr.c | 110 int i, nr_pages; in hw_queue_dtor() local 115 nr_pages = queue->queue_length / queue->pagesize; in hw_queue_dtor() 117 for (i = 0; i < nr_pages; i += pages_per_kpage) in hw_queue_dtor() 156 ret = hw_queue_ctor(&cq->hw_queue, cq->attr.nr_pages, in ehea_create_cq() 161 for (counter = 0; counter < cq->attr.nr_pages; counter++) { in ehea_create_cq() 174 cq, hret, counter, cq->attr.nr_pages); in ehea_create_cq() 178 if (counter == (cq->attr.nr_pages - 1)) { in ehea_create_cq() 280 ret = hw_queue_ctor(&eq->hw_queue, eq->attr.nr_pages, in ehea_create_eq() 287 for (i = 0; i < eq->attr.nr_pages; i++) { in ehea_create_eq() 301 if (i == (eq->attr.nr_pages - 1)) { in ehea_create_eq() [all …]
|
/linux-2.6.39/fs/9p/ |
D | cache.c | 161 int loop, nr_pages; in v9fs_cache_inode_now_uncached() local 167 nr_pages = pagevec_lookup(&pvec, v9inode->vfs_inode.i_mapping, in v9fs_cache_inode_now_uncached() 170 if (!nr_pages) in v9fs_cache_inode_now_uncached() 173 for (loop = 0; loop < nr_pages; loop++) in v9fs_cache_inode_now_uncached() 176 first = pvec.pages[nr_pages - 1]->index + 1; in v9fs_cache_inode_now_uncached() 178 pvec.nr = nr_pages; in v9fs_cache_inode_now_uncached() 361 unsigned *nr_pages) in __v9fs_readpages_from_fscache() argument 366 P9_DPRINTK(P9_DEBUG_FSC, "inode %p pages %u", inode, *nr_pages); in __v9fs_readpages_from_fscache() 371 mapping, pages, nr_pages, in __v9fs_readpages_from_fscache() 382 BUG_ON(*nr_pages != 0); in __v9fs_readpages_from_fscache()
|
/linux-2.6.39/include/linux/ |
D | memory_hotplug.h | 69 extern int zone_grow_waitqueues(struct zone *zone, unsigned long nr_pages); 83 unsigned long nr_pages); 85 unsigned long nr_pages); 215 extern int is_mem_section_removable(unsigned long pfn, unsigned long nr_pages); 219 unsigned long nr_pages) in is_mem_section_removable() argument 230 int nr_pages);
|
/linux-2.6.39/fs/ |
D | fs-writeback.c | 36 long nr_pages; member 115 __bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages, in __bdi_start_writeback() argument 134 work->nr_pages = nr_pages; in __bdi_start_writeback() 151 void bdi_start_writeback(struct backing_dev_info *bdi, long nr_pages) in bdi_start_writeback() argument 153 __bdi_start_writeback(bdi, nr_pages, true); in bdi_start_writeback() 696 if (work->nr_pages <= 0) in wb_writeback() 727 work->nr_pages -= write_chunk - wbc.nr_to_write; in wb_writeback() 798 .nr_pages = LONG_MAX, in wb_check_background_flush() 813 long nr_pages; in wb_check_old_data_flush() local 827 nr_pages = get_nr_dirty_pages(); in wb_check_old_data_flush() [all …]
|
D | splice.c | 179 unsigned int spd_pages = spd->nr_pages; in splice_to_pipe() 215 if (!--spd->nr_pages) in splice_to_pipe() 304 unsigned int loff, nr_pages, req_pages; in __generic_file_splice_read() local 325 nr_pages = min(req_pages, pipe->buffers); in __generic_file_splice_read() 330 spd.nr_pages = find_get_pages_contig(mapping, index, nr_pages, spd.pages); in __generic_file_splice_read() 331 index += spd.nr_pages; in __generic_file_splice_read() 337 if (spd.nr_pages < nr_pages) in __generic_file_splice_read() 339 index, req_pages - spd.nr_pages); in __generic_file_splice_read() 342 while (spd.nr_pages < nr_pages) { in __generic_file_splice_read() 371 spd.pages[spd.nr_pages++] = page; in __generic_file_splice_read() [all …]
|
/linux-2.6.39/drivers/edac/ |
D | pasemi_edac.c | 154 csrow->nr_pages = 128 << (20 - PAGE_SHIFT); in pasemi_edac_init_csrows() 157 csrow->nr_pages = 256 << (20 - PAGE_SHIFT); in pasemi_edac_init_csrows() 161 csrow->nr_pages = 512 << (20 - PAGE_SHIFT); in pasemi_edac_init_csrows() 164 csrow->nr_pages = 1024 << (20 - PAGE_SHIFT); in pasemi_edac_init_csrows() 167 csrow->nr_pages = 2048 << (20 - PAGE_SHIFT); in pasemi_edac_init_csrows() 177 csrow->last_page = csrow->first_page + csrow->nr_pages - 1; in pasemi_edac_init_csrows() 178 last_page_in_mmc += csrow->nr_pages; in pasemi_edac_init_csrows()
|
/linux-2.6.39/drivers/infiniband/hw/ehca/ |
D | ehca_eq.c | 59 u32 nr_pages; in ehca_create_eq() local 83 &nr_pages, &eq->ist); in ehca_create_eq() 90 ret = ipz_queue_ctor(NULL, &eq->ipz_queue, nr_pages, in ehca_create_eq() 97 for (i = 0; i < nr_pages; i++) { in ehca_create_eq() 110 if (i == (nr_pages - 1)) { in ehca_create_eq()
|
/linux-2.6.39/fs/logfs/ |
D | dev_bdev.c | 91 size_t nr_pages) in __bdev_writeseg() argument 106 for (i = 0; i < nr_pages; i++) { in __bdev_writeseg() 121 nr_pages -= i; in __bdev_writeseg() 137 bio->bi_vcnt = nr_pages; in __bdev_writeseg() 139 bio->bi_size = nr_pages * PAGE_SIZE; in __bdev_writeseg() 188 size_t nr_pages) in do_erase() argument 201 for (i = 0; i < nr_pages; i++) { in do_erase() 216 nr_pages -= i; in do_erase() 226 bio->bi_vcnt = nr_pages; in do_erase() 228 bio->bi_size = nr_pages * PAGE_SIZE; in do_erase()
|
/linux-2.6.39/drivers/md/ |
D | dm-kcopyd.c | 37 unsigned int nr_pages; member 161 kc->nr_pages += nr; in client_alloc_pages() 167 BUG_ON(kc->nr_free_pages != kc->nr_pages); in client_free_pages() 170 kc->nr_free_pages = kc->nr_pages = 0; in client_free_pages() 202 unsigned int nr_pages; member 369 job->nr_pages = dm_div_up(job->dests[0].count + job->offset, in run_pages_job() 371 r = kcopyd_get_pages(job->kc, job->nr_pages, &job->pages); in run_pages_job() 575 job->nr_pages = 0; in dm_kcopyd_copy() 609 int dm_kcopyd_client_create(unsigned int nr_pages, in dm_kcopyd_client_create() argument 636 kc->nr_pages = kc->nr_free_pages = 0; in dm_kcopyd_client_create() [all …]
|