/linux/mm/ |
A D | readahead.c | 281 unsigned long max_pages, index; in force_page_cache_ra() local 442 unsigned long max_pages = ra->ra_pages; in ondemand_readahead() local 451 if (req_size > max_pages && bdi->io_pages > max_pages) in ondemand_readahead() 452 max_pages = min(req_size, bdi->io_pages); in ondemand_readahead() 483 max_pages); in ondemand_readahead() 486 if (!start || start - index > max_pages) in ondemand_readahead() 500 if (req_size > max_pages) in ondemand_readahead() 517 max_pages)) in ondemand_readahead() 541 if (ra->size + add_pages <= max_pages) { in ondemand_readahead() 545 ra->size = max_pages; in ondemand_readahead() [all …]
|
A D | swap_state.c | 537 int max_pages, in __swapin_nr_pages() argument 563 if (pages > max_pages) in __swapin_nr_pages() 564 pages = max_pages; in __swapin_nr_pages() 577 unsigned int hits, pages, max_pages; in swapin_nr_pages() local 580 max_pages = 1 << READ_ONCE(page_cluster); in swapin_nr_pages() 581 if (max_pages <= 1) in swapin_nr_pages() 586 max_pages, in swapin_nr_pages()
|
A D | swap_cgroup.c | 167 int swap_cgroup_swapon(int type, unsigned long max_pages) in swap_cgroup_swapon() argument 174 length = DIV_ROUND_UP(max_pages, SC_PER_PAGE); in swap_cgroup_swapon()
|
A D | memory_hotplug.c | 897 unsigned long online_pages = 0, max_pages, end_pfn; in auto_movable_zone_for_pfn() local 904 max_pages = group->s.max_pages; in auto_movable_zone_for_pfn() 911 max_pages = nr_pages; in auto_movable_zone_for_pfn() 913 max_pages = group->d.unit_pages; in auto_movable_zone_for_pfn() 938 nr_pages = max_pages - online_pages; in auto_movable_zone_for_pfn()
|
/linux/fs/nfs/ |
A D | pnfs_dev.c | 105 int max_pages; in nfs4_get_device_info() local 116 max_pages = nfs_page_array_len(0, max_resp_sz); in nfs4_get_device_info() 118 __func__, server, max_resp_sz, max_pages); in nfs4_get_device_info() 124 pages = kcalloc(max_pages, sizeof(struct page *), gfp_flags); in nfs4_get_device_info() 128 for (i = 0; i < max_pages; i++) { in nfs4_get_device_info() 157 for (i = 0; i < max_pages; i++) in nfs4_get_device_info()
|
/linux/fs/fuse/ |
A D | ioctl.c | 55 u32 max = fc->max_pages << PAGE_SHIFT; in fuse_verify_ioctl_iov() 161 unsigned int in_iovs = 0, out_iovs = 0, max_pages; in fuse_do_ioctl() local 184 ap.pages = fuse_pages_alloc(fm->fc->max_pages, GFP_KERNEL, &ap.descs); in fuse_do_ioctl() 189 fuse_page_descs_length_init(ap.descs, 0, fm->fc->max_pages); in fuse_do_ioctl() 221 max_pages = DIV_ROUND_UP(max(in_size, out_size), PAGE_SIZE); in fuse_do_ioctl() 225 if (max_pages > fm->fc->max_pages) in fuse_do_ioctl() 227 while (ap.num_pages < max_pages) { in fuse_do_ioctl()
|
A D | file.c | 962 max_pages = min_t(unsigned int, fc->max_pages, in fuse_readahead() 971 nr_pages = max_pages; in fuse_readahead() 1220 max_pages); in fuse_wr_pages() 1443 unsigned int max_pages; in fuse_direct_io() local 1445 max_pages = iov_iter_npages(iter, fc->max_pages); in fuse_direct_io() 1465 max_pages); in fuse_direct_io() 1498 max_pages = iov_iter_npages(iter, fc->max_pages); in fuse_direct_io() 1987 unsigned int max_pages; member 1999 fc->max_pages); in fuse_pages_realloc() 2011 data->max_pages = npages; in fuse_pages_realloc() [all …]
|
/linux/arch/x86/xen/ |
A D | setup.c | 552 unsigned long max_pages, limit; in xen_get_max_pages() local 557 max_pages = limit; in xen_get_max_pages() 571 max_pages = ret; in xen_get_max_pages() 574 return min(max_pages, limit); in xen_get_max_pages() 731 unsigned long max_pages; in xen_memory_setup() local 780 max_pages = xen_get_max_pages(); in xen_memory_setup() 783 max_pages += xen_foreach_remap_area(max_pfn, xen_count_remap_pages); in xen_memory_setup() 785 if (max_pages > max_pfn) in xen_memory_setup() 786 extra_pages += max_pages - max_pfn; in xen_memory_setup() 796 extra_pages, max_pages - max_pfn); in xen_memory_setup()
|
/linux/drivers/gpu/drm/r128/ |
A D | ati_pcigart.c | 85 int max_pages; in drm_ati_pcigart_cleanup() local 95 max_pages = (gart_info->table_size / sizeof(u32)); in drm_ati_pcigart_cleanup() 96 pages = (entry->pages <= max_pages) in drm_ati_pcigart_cleanup() 97 ? entry->pages : max_pages; in drm_ati_pcigart_cleanup()
|
/linux/include/linux/ |
A D | swap_cgroup.h | 14 extern int swap_cgroup_swapon(int type, unsigned long max_pages); 33 swap_cgroup_swapon(int type, unsigned long max_pages) in swap_cgroup_swapon() argument
|
A D | memory.h | 60 unsigned long max_pages; member 150 extern int memory_group_register_static(int nid, unsigned long max_pages);
|
/linux/fs/iomap/ |
A D | swapfile.c | 34 unsigned long max_pages; in iomap_swapfile_add_extent() local 42 max_pages = isi->sis->max - isi->nr_pages; in iomap_swapfile_add_extent() 56 nr_pages = min(nr_pages, max_pages); in iomap_swapfile_add_extent()
|
/linux/fs/cramfs/ |
A D | inode.c | 359 unsigned int pages, max_pages, offset; in cramfs_physmem_mmap() local 378 max_pages = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT; in cramfs_physmem_mmap() 380 if (pgoff >= max_pages) in cramfs_physmem_mmap() 382 pages = min(vma_pages(vma), max_pages - pgoff); in cramfs_physmem_mmap() 394 if (pgoff + pages == max_pages && cramfs_last_page_is_shared(inode)) { in cramfs_physmem_mmap() 459 unsigned int pages, block_pages, max_pages, offset; in cramfs_physmem_get_unmapped_area() local 462 max_pages = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT; in cramfs_physmem_get_unmapped_area() 463 if (pgoff >= max_pages || pages > max_pages - pgoff) in cramfs_physmem_get_unmapped_area()
|
/linux/fs/cifs/ |
A D | misc.c | 990 unsigned int max_pages = iov_iter_npages(iter, INT_MAX); in setup_aio_ctx_iter() local 1001 if (array_size(max_pages, sizeof(*bv)) <= CIFS_AIO_KMALLOC_LIMIT) in setup_aio_ctx_iter() 1002 bv = kmalloc_array(max_pages, sizeof(*bv), GFP_KERNEL); in setup_aio_ctx_iter() 1005 bv = vmalloc(array_size(max_pages, sizeof(*bv))); in setup_aio_ctx_iter() 1010 if (array_size(max_pages, sizeof(*pages)) <= CIFS_AIO_KMALLOC_LIMIT) in setup_aio_ctx_iter() 1011 pages = kmalloc_array(max_pages, sizeof(*pages), GFP_KERNEL); in setup_aio_ctx_iter() 1014 pages = vmalloc(array_size(max_pages, sizeof(*pages))); in setup_aio_ctx_iter() 1023 while (count && npages < max_pages) { in setup_aio_ctx_iter() 1024 rc = iov_iter_get_pages(iter, pages, count, max_pages, &start); in setup_aio_ctx_iter() 1041 if (npages + cur_npages > max_pages) { in setup_aio_ctx_iter() [all …]
|
/linux/include/drm/ |
A D | drm_prime.h | 109 int max_pages); 111 int max_pages);
|
/linux/net/rds/ |
A D | ib_rdma.c | 184 iinfo->rdma_mr_size = pool_1m->max_pages; in rds_ib_get_mr_info() 194 iinfo6->rdma_mr_size = pool_1m->max_pages; in rds6_ib_get_mr_info() 663 pool->max_pages = RDS_MR_1M_MSG_SIZE + 1; in rds_ib_create_mr_pool() 667 pool->max_pages = RDS_MR_8K_MSG_SIZE + 1; in rds_ib_create_mr_pool() 671 pool->max_free_pinned = pool->max_items * pool->max_pages / 4; in rds_ib_create_mr_pool()
|
A D | ib_mr.h | 107 unsigned int max_pages; member
|
A D | ib_frmr.c | 79 pool->max_pages); in rds_ib_alloc_frmr() 243 if (frmr->dma_npages > ibmr->pool->max_pages) { in rds_ib_map_frmr()
|
/linux/fs/nilfs2/ |
A D | segbuf.c | 25 int max_pages; member 365 wi->nr_vecs = min(wi->max_pages, wi->rest_blocks); in nilfs_segbuf_submit_bio() 402 wi->max_pages = BIO_MAX_VECS; in nilfs_segbuf_prepare_write() 403 wi->nr_vecs = min(wi->max_pages, wi->rest_blocks); in nilfs_segbuf_prepare_write()
|
/linux/drivers/md/bcache/ |
A D | bcache.h | 762 unsigned int n, max_pages; in meta_bucket_pages() local 764 max_pages = min_t(unsigned int, in meta_bucket_pages() 769 if (n > max_pages) in meta_bucket_pages() 770 n = max_pages; in meta_bucket_pages()
|
/linux/drivers/infiniband/hw/mlx4/ |
A D | mr.c | 552 int max_pages) in mlx4_alloc_priv_pages() argument 561 mr->page_map_size = roundup(max_pages * sizeof(u64), in mlx4_alloc_priv_pages() 669 mr->max_pages = max_num_sg; in mlx4_ib_alloc_mr() 693 if (unlikely(mr->npages == mr->max_pages)) in mlx4_set_page()
|
/linux/drivers/base/ |
A D | memory.c | 964 int memory_group_register_static(int nid, unsigned long max_pages) in memory_group_register_static() argument 969 .max_pages = max_pages, in memory_group_register_static() 973 if (!max_pages) in memory_group_register_static()
|
/linux/drivers/infiniband/hw/vmw_pvrdma/ |
A D | pvrdma_mr.c | 252 mr->max_pages = max_num_sg; in pvrdma_alloc_mr() 306 if (mr->npages == mr->max_pages) in pvrdma_set_page()
|
/linux/drivers/infiniband/core/ |
A D | rw.c | 62 u32 max_pages; in rdma_rw_fr_page_list_len() local 65 max_pages = dev->attrs.max_pi_fast_reg_page_list_len; in rdma_rw_fr_page_list_len() 67 max_pages = dev->attrs.max_fast_reg_page_list_len; in rdma_rw_fr_page_list_len() 70 return min_t(u32, max_pages, 256); in rdma_rw_fr_page_list_len()
|
/linux/drivers/infiniband/sw/rxe/ |
A D | rxe_mr.c | 246 int rxe_mr_init_fast(struct rxe_pd *pd, int max_pages, struct rxe_mr *mr) in rxe_mr_init_fast() argument 253 err = rxe_mr_alloc(mr, max_pages, 1); in rxe_mr_init_fast() 258 mr->max_buf = max_pages; in rxe_mr_init_fast()
|