Home
last modified time | relevance | path

Searched refs:max_pages (Results 1 – 25 of 53) sorted by relevance

123

/linux-6.6.21/fs/netfs/
Diterator.c43 unsigned int max_pages; in netfs_extract_user_iter() local
53 max_pages = iov_iter_npages(orig, INT_MAX); in netfs_extract_user_iter()
54 bv_size = array_size(max_pages, sizeof(*bv)); in netfs_extract_user_iter()
63 pg_size = array_size(max_pages, sizeof(*pages)); in netfs_extract_user_iter()
66 while (count && npages < max_pages) { in netfs_extract_user_iter()
68 max_pages - npages, extraction_flags, in netfs_extract_user_iter()
84 if (npages + cur_npages > max_pages) { in netfs_extract_user_iter()
86 npages + cur_npages, max_pages); in netfs_extract_user_iter()
/linux-6.6.21/mm/
Dreadahead.c312 unsigned long max_pages, index; in force_page_cache_ra() local
322 max_pages = max_t(unsigned long, bdi->io_pages, ra->ra_pages); in force_page_cache_ra()
323 nr_to_read = min_t(unsigned long, nr_to_read, max_pages); in force_page_cache_ra()
557 unsigned long max_pages = ra->ra_pages; in ondemand_readahead() local
567 if (req_size > max_pages && bdi->io_pages > max_pages) in ondemand_readahead()
568 max_pages = min(req_size, bdi->io_pages); in ondemand_readahead()
584 ra->size = get_next_ra_size(ra, max_pages); in ondemand_readahead()
600 max_pages); in ondemand_readahead()
603 if (!start || start - index > max_pages) in ondemand_readahead()
609 ra->size = get_next_ra_size(ra, max_pages); in ondemand_readahead()
[all …]
Dswap_state.c544 int max_pages, in __swapin_nr_pages() argument
570 if (pages > max_pages) in __swapin_nr_pages()
571 pages = max_pages; in __swapin_nr_pages()
584 unsigned int hits, pages, max_pages; in swapin_nr_pages() local
587 max_pages = 1 << READ_ONCE(page_cluster); in swapin_nr_pages()
588 if (max_pages <= 1) in swapin_nr_pages()
593 max_pages, in swapin_nr_pages()
Dswap_cgroup.c167 int swap_cgroup_swapon(int type, unsigned long max_pages) in swap_cgroup_swapon() argument
176 length = DIV_ROUND_UP(max_pages, SC_PER_PAGE); in swap_cgroup_swapon()
/linux-6.6.21/include/linux/
Dswap_cgroup.h14 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
Dmemory.h59 unsigned long max_pages; member
157 extern int memory_group_register_static(int nid, unsigned long max_pages);
/linux-6.6.21/fs/fuse/
Dioctl.c75 u32 max = fc->max_pages << PAGE_SHIFT; in fuse_verify_ioctl_iov()
181 unsigned int in_iovs = 0, out_iovs = 0, max_pages; in fuse_do_ioctl() local
204 ap.pages = fuse_pages_alloc(fm->fc->max_pages, GFP_KERNEL, &ap.descs); in fuse_do_ioctl()
209 fuse_page_descs_length_init(ap.descs, 0, fm->fc->max_pages); in fuse_do_ioctl()
241 max_pages = DIV_ROUND_UP(max(in_size, out_size), PAGE_SIZE); in fuse_do_ioctl()
245 if (max_pages > fm->fc->max_pages) in fuse_do_ioctl()
247 while (ap.num_pages < max_pages) { in fuse_do_ioctl()
Dfile.c972 unsigned int i, max_pages, nr_pages = 0; in fuse_readahead() local
977 max_pages = min_t(unsigned int, fc->max_pages, in fuse_readahead()
993 if (nr_pages > max_pages) in fuse_readahead()
994 nr_pages = max_pages; in fuse_readahead()
1166 unsigned int max_pages) in fuse_fill_write_pages() argument
1232 ap->num_pages < max_pages && offset == 0); in fuse_fill_write_pages()
1238 unsigned int max_pages) in fuse_wr_pages() argument
1243 max_pages); in fuse_wr_pages()
1264 fc->max_pages); in fuse_perform_write()
1371 unsigned int max_pages) in fuse_get_user_pages() argument
[all …]
/linux-6.6.21/arch/x86/xen/
Dsetup.c557 unsigned long max_pages, limit; in xen_get_max_pages() local
562 max_pages = limit; in xen_get_max_pages()
576 max_pages = ret; in xen_get_max_pages()
579 return min(max_pages, limit); in xen_get_max_pages()
736 unsigned long max_pages; in xen_memory_setup() local
794 max_pages = xen_get_max_pages(); in xen_memory_setup()
797 max_pages += xen_foreach_remap_area(max_pfn, xen_count_remap_pages); in xen_memory_setup()
799 if (max_pages > max_pfn) in xen_memory_setup()
800 extra_pages += max_pages - max_pfn; in xen_memory_setup()
810 extra_pages, max_pages - max_pfn); in xen_memory_setup()
/linux-6.6.21/kernel/module/
Ddecompress.c21 new_pages = kvmalloc_array(info->max_pages + extent, in module_extend_max_pages()
26 memcpy(new_pages, info->pages, info->max_pages * sizeof(info->pages)); in module_extend_max_pages()
29 info->max_pages += extent; in module_extend_max_pages()
39 if (info->max_pages == info->used_pages) { in module_get_next_page()
344 info->max_pages = info->used_pages = 0; in module_decompress_cleanup()
/linux-6.6.21/fs/nfs/
Dpnfs_dev.c105 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()
/linux-6.6.21/fs/iomap/
Dswapfile.c34 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-6.6.21/include/drm/
Ddrm_prime.h109 int max_pages);
111 int max_pages);
/linux-6.6.21/fs/cramfs/
Dinode.c350 unsigned int pages, max_pages, offset; in cramfs_physmem_mmap() local
369 max_pages = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT; in cramfs_physmem_mmap()
371 if (pgoff >= max_pages) in cramfs_physmem_mmap()
373 pages = min(vma_pages(vma), max_pages - pgoff); in cramfs_physmem_mmap()
385 if (pgoff + pages == max_pages && cramfs_last_page_is_shared(inode)) { in cramfs_physmem_mmap()
450 unsigned int pages, block_pages, max_pages, offset; in cramfs_physmem_get_unmapped_area() local
453 max_pages = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT; in cramfs_physmem_get_unmapped_area()
454 if (pgoff >= max_pages || pages > max_pages - pgoff) in cramfs_physmem_get_unmapped_area()
/linux-6.6.21/fs/squashfs/
Dpage_actor.c65 int max_pages = (actor->length + PAGE_SIZE - 1) >> PAGE_SHIFT; in handle_next_page() local
67 if (actor->returned_pages == max_pages) in handle_next_page()
Dfile.c548 unsigned int max_pages = 1UL << shift; in squashfs_readahead() local
552 pages = kmalloc_array(max_pages, sizeof(void *), GFP_KERNEL); in squashfs_readahead()
567 max_pages = (expected + PAGE_SIZE - 1) >> PAGE_SHIFT; in squashfs_readahead()
569 nr_pages = __readahead_batch(ractl, pages, max_pages); in squashfs_readahead()
/linux-6.6.21/net/rds/
Dib_rdma.c184 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()
Dib_mr.h107 unsigned int max_pages; member
/linux-6.6.21/fs/nilfs2/
Dsegbuf.c25 int max_pages; member
357 wi->nr_vecs = min(wi->max_pages, wi->rest_blocks); in nilfs_segbuf_submit_bio()
367 wi->max_pages = BIO_MAX_VECS; in nilfs_segbuf_prepare_write()
368 wi->nr_vecs = min(wi->max_pages, wi->rest_blocks); in nilfs_segbuf_prepare_write()
/linux-6.6.21/drivers/md/bcache/
Dbcache.h770 unsigned int n, max_pages; in meta_bucket_pages() local
772 max_pages = min_t(unsigned int, in meta_bucket_pages()
777 if (n > max_pages) in meta_bucket_pages()
778 n = max_pages; in meta_bucket_pages()
/linux-6.6.21/crypto/
Dalgif_hash.c70 size_t len, max_pages, npages; in hash_sendmsg() local
74 max_pages = min_t(size_t, ALG_MAX_PAGES, in hash_sendmsg()
111 npages = iov_iter_npages(&msg->msg_iter, max_pages); in hash_sendmsg()
/linux-6.6.21/drivers/infiniband/hw/mlx4/
Dmr.c551 int max_pages) in mlx4_alloc_priv_pages() argument
560 mr->page_map_size = roundup(max_pages * sizeof(u64), in mlx4_alloc_priv_pages()
668 mr->max_pages = max_num_sg; in mlx4_ib_alloc_mr()
692 if (unlikely(mr->npages == mr->max_pages)) in mlx4_set_page()
/linux-6.6.21/drivers/infiniband/hw/vmw_pvrdma/
Dpvrdma_mr.c252 mr->max_pages = max_num_sg; in pvrdma_alloc_mr()
306 if (mr->npages == mr->max_pages) in pvrdma_set_page()
/linux-6.6.21/fs/ceph/
Daddr.c191 unsigned long max_pages = inode->i_sb->s_bdi->ra_pages; in ceph_netfs_expand_readahead() local
200 max_pages = 0; in ceph_netfs_expand_readahead()
202 max_pages = priv->file_ra_pages; in ceph_netfs_expand_readahead()
207 if (!max_pages) in ceph_netfs_expand_readahead()
210 max_len = max_pages << PAGE_SHIFT; in ceph_netfs_expand_readahead()
1019 unsigned i, nr_folios, max_pages, locked_pages = 0; in ceph_writepages_start() local
1026 max_pages = wsize >> PAGE_SHIFT; in ceph_writepages_start()
1034 for (i = 0; i < nr_folios && locked_pages < max_pages; i++) { in ceph_writepages_start()
1120 max_pages = calc_pages_for(0, (u64)len); in ceph_writepages_start()
1121 pages = kmalloc_array(max_pages, in ceph_writepages_start()
[all …]
/linux-6.6.21/drivers/base/
Dmemory.c1094 int memory_group_register_static(int nid, unsigned long max_pages) in memory_group_register_static() argument
1099 .max_pages = max_pages, in memory_group_register_static()
1103 if (!max_pages) in memory_group_register_static()

123