/Linux-v6.1/net/ceph/ |
D | pagevec.c | 13 void ceph_put_page_vector(struct page **pages, int num_pages, bool dirty) in ceph_put_page_vector() argument 19 set_page_dirty_lock(pages[i]); in ceph_put_page_vector() 20 put_page(pages[i]); in ceph_put_page_vector() 22 kvfree(pages); in ceph_put_page_vector() 26 void ceph_release_page_vector(struct page **pages, int num_pages) in ceph_release_page_vector() argument 31 __free_pages(pages[i], 0); in ceph_release_page_vector() 32 kfree(pages); in ceph_release_page_vector() 41 struct page **pages; in ceph_alloc_page_vector() local 44 pages = kmalloc_array(num_pages, sizeof(*pages), flags); in ceph_alloc_page_vector() 45 if (!pages) in ceph_alloc_page_vector() [all …]
|
/Linux-v6.1/mm/ |
D | percpu-vm.c | 34 static struct page **pages; in pcpu_get_pages() local 35 size_t pages_size = pcpu_nr_units * pcpu_unit_pages * sizeof(pages[0]); in pcpu_get_pages() 39 if (!pages) in pcpu_get_pages() 40 pages = pcpu_mem_zalloc(pages_size, GFP_KERNEL); in pcpu_get_pages() 41 return pages; in pcpu_get_pages() 55 struct page **pages, int page_start, int page_end) in pcpu_free_pages() argument 62 struct page *page = pages[pcpu_page_idx(cpu, i)]; in pcpu_free_pages() 83 struct page **pages, int page_start, int page_end, in pcpu_alloc_pages() argument 93 struct page **pagep = &pages[pcpu_page_idx(cpu, i)]; in pcpu_alloc_pages() 104 __free_page(pages[pcpu_page_idx(cpu, i)]); in pcpu_alloc_pages() [all …]
|
D | gup_test.c | 9 static void put_back_pages(unsigned int cmd, struct page **pages, in put_back_pages() argument 18 put_page(pages[i]); in put_back_pages() 24 unpin_user_pages(pages, nr_pages); in put_back_pages() 28 unpin_user_pages(pages, nr_pages); in put_back_pages() 31 put_page(pages[i]); in put_back_pages() 38 static void verify_dma_pinned(unsigned int cmd, struct page **pages, in verify_dma_pinned() argument 49 page = pages[i]; in verify_dma_pinned() 67 static void dump_pages_test(struct gup_test *gup, struct page **pages, in dump_pages_test() argument 92 dump_page(pages[index_to_dump], in dump_pages_test() 104 struct page **pages; in __gup_test_ioctl() local [all …]
|
D | gup.c | 32 static inline void sanity_check_pinned_pages(struct page **pages, in sanity_check_pinned_pages() argument 50 for (; npages; npages--, pages++) { in sanity_check_pinned_pages() 51 struct page *page = *pages; in sanity_check_pinned_pages() 306 void unpin_user_pages_dirty_lock(struct page **pages, unsigned long npages, in unpin_user_pages_dirty_lock() argument 314 unpin_user_pages(pages, npages); in unpin_user_pages_dirty_lock() 318 sanity_check_pinned_pages(pages, npages); in unpin_user_pages_dirty_lock() 320 folio = gup_folio_next(pages, npages, i, &nr); in unpin_user_pages_dirty_lock() 391 static void unpin_user_pages_lockless(struct page **pages, unsigned long npages) in unpin_user_pages_lockless() argument 403 folio = gup_folio_next(pages, npages, i, &nr); in unpin_user_pages_lockless() 417 void unpin_user_pages(struct page **pages, unsigned long npages) in unpin_user_pages() argument [all …]
|
D | mincore.c | 187 static long do_mincore(unsigned long addr, unsigned long pages, unsigned char *vec) in do_mincore() argument 196 end = min(vma->vm_end, addr + (pages << PAGE_SHIFT)); in do_mincore() 198 unsigned long pages = DIV_ROUND_UP(end - addr, PAGE_SIZE); in do_mincore() local 199 memset(vec, 1, pages); in do_mincore() 200 return pages; in do_mincore() 236 unsigned long pages; in SYSCALL_DEFINE3() local 250 pages = len >> PAGE_SHIFT; in SYSCALL_DEFINE3() 251 pages += (offset_in_page(len)) != 0; in SYSCALL_DEFINE3() 253 if (!access_ok(vec, pages)) in SYSCALL_DEFINE3() 261 while (pages) { in SYSCALL_DEFINE3() [all …]
|
/Linux-v6.1/drivers/gpu/drm/i915/gem/selftests/ |
D | huge_gem_object.c | 12 struct sg_table *pages) in huge_free_pages() argument 18 for_each_sgt_page(page, sgt_iter, pages) { in huge_free_pages() 24 sg_free_table(pages); in huge_free_pages() 25 kfree(pages); in huge_free_pages() 34 struct sg_table *pages; in huge_get_pages() local 37 pages = kmalloc(sizeof(*pages), GFP); in huge_get_pages() 38 if (!pages) in huge_get_pages() 41 if (sg_alloc_table(pages, npages, GFP)) { in huge_get_pages() 42 kfree(pages); in huge_get_pages() 46 sg = pages->sgl; in huge_get_pages() [all …]
|
/Linux-v6.1/fs/isofs/ |
D | compress.c | 42 struct page **pages, unsigned poffset, in zisofs_uncompress_block() argument 68 if (!pages[i]) in zisofs_uncompress_block() 70 memzero_page(pages[i], 0, PAGE_SIZE); in zisofs_uncompress_block() 71 SetPageUptodate(pages[i]); in zisofs_uncompress_block() 121 if (pages[curpage]) { in zisofs_uncompress_block() 122 stream.next_out = kmap_local_page(pages[curpage]) in zisofs_uncompress_block() 174 if (pages[curpage]) { in zisofs_uncompress_block() 175 flush_dcache_page(pages[curpage]); in zisofs_uncompress_block() 176 SetPageUptodate(pages[curpage]); in zisofs_uncompress_block() 207 struct page **pages) in zisofs_fill_pages() argument [all …]
|
/Linux-v6.1/fs/erofs/ |
D | pcpubuf.c | 15 struct page **pages; member 64 struct page **pages, **oldpages; in erofs_pcpubuf_growsize() local 67 pages = kmalloc_array(nrpages, sizeof(*pages), GFP_KERNEL); in erofs_pcpubuf_growsize() 68 if (!pages) { in erofs_pcpubuf_growsize() 74 pages[i] = erofs_allocpage(&pagepool, GFP_KERNEL); in erofs_pcpubuf_growsize() 75 if (!pages[i]) { in erofs_pcpubuf_growsize() 77 oldpages = pages; in erofs_pcpubuf_growsize() 81 ptr = vmap(pages, nrpages, VM_MAP, PAGE_KERNEL); in erofs_pcpubuf_growsize() 84 oldpages = pages; in erofs_pcpubuf_growsize() 90 oldpages = pcb->pages; in erofs_pcpubuf_growsize() [all …]
|
/Linux-v6.1/drivers/xen/ |
D | xlate_mmu.c | 48 static void xen_for_each_gfn(struct page **pages, unsigned nr_gfn, in xen_for_each_gfn() argument 57 page = pages[i / XEN_PFN_PER_PAGE]; in xen_for_each_gfn() 71 struct page **pages; member 99 struct page *page = info->pages[info->index++]; in remap_pte_fn() 148 struct page **pages) in xen_xlate_remap_gfn_array() argument 163 data.pages = pages; in xen_xlate_remap_gfn_array() 184 int nr, struct page **pages) in xen_xlate_unmap_gfn_range() argument 186 xen_for_each_gfn(pages, nr, unmap_gfn, NULL); in xen_xlate_unmap_gfn_range() 217 struct page **pages; in xen_xlate_map_ballooned_pages() local 226 pages = kcalloc(nr_pages, sizeof(pages[0]), GFP_KERNEL); in xen_xlate_map_ballooned_pages() [all …]
|
/Linux-v6.1/kernel/dma/ |
D | remap.c | 15 return area->pages; in dma_common_find_pages() 22 void *dma_common_pages_remap(struct page **pages, size_t size, in dma_common_pages_remap() argument 27 vaddr = vmap(pages, PAGE_ALIGN(size) >> PAGE_SHIFT, in dma_common_pages_remap() 30 find_vm_area(vaddr)->pages = pages; in dma_common_pages_remap() 42 struct page **pages; in dma_common_contiguous_remap() local 46 pages = kmalloc_array(count, sizeof(struct page *), GFP_KERNEL); in dma_common_contiguous_remap() 47 if (!pages) in dma_common_contiguous_remap() 50 pages[i] = nth_page(page, i); in dma_common_contiguous_remap() 51 vaddr = vmap(pages, count, VM_DMA_COHERENT, prot); in dma_common_contiguous_remap() 52 kfree(pages); in dma_common_contiguous_remap()
|
/Linux-v6.1/drivers/gpu/drm/xen/ |
D | xen_drm_front_gem.c | 30 struct page **pages; member 49 xen_obj->pages = kvmalloc_array(xen_obj->num_pages, in gem_alloc_pages_array() 51 return !xen_obj->pages ? -ENOMEM : 0; in gem_alloc_pages_array() 56 kvfree(xen_obj->pages); in gem_free_pages_array() 57 xen_obj->pages = NULL; in gem_free_pages_array() 94 ret = vm_map_pages(vma, xen_obj->pages, xen_obj->num_pages); in xen_drm_front_gem_object_mmap() 161 xen_obj->pages); in gem_create() 177 xen_obj->pages = drm_gem_get_pages(&xen_obj->base); in gem_create() 178 if (IS_ERR(xen_obj->pages)) { in gem_create() 179 ret = PTR_ERR(xen_obj->pages); in gem_create() [all …]
|
/Linux-v6.1/drivers/staging/media/ipu3/ |
D | ipu3-dmamap.c | 20 static void imgu_dmamap_free_buffer(struct page **pages, in imgu_dmamap_free_buffer() argument 26 __free_page(pages[count]); in imgu_dmamap_free_buffer() 27 kvfree(pages); in imgu_dmamap_free_buffer() 36 struct page **pages; in imgu_dmamap_alloc_buffer() local 42 pages = kvmalloc_array(count, sizeof(*pages), GFP_KERNEL); in imgu_dmamap_alloc_buffer() 44 if (!pages) in imgu_dmamap_alloc_buffer() 72 imgu_dmamap_free_buffer(pages, i << PAGE_SHIFT); in imgu_dmamap_alloc_buffer() 77 pages[i++] = page++; in imgu_dmamap_alloc_buffer() 80 return pages; in imgu_dmamap_alloc_buffer() 100 struct page **pages; in imgu_dmamap_alloc() local [all …]
|
/Linux-v6.1/drivers/media/common/videobuf2/ |
D | frame_vector.c | 76 struct page **pages; in put_vaddr_frames() local 80 pages = frame_vector_pages(vec); in put_vaddr_frames() 86 if (WARN_ON(IS_ERR(pages))) in put_vaddr_frames() 89 unpin_user_pages(pages, vec->nr_frames); in put_vaddr_frames() 108 struct page **pages; in frame_vector_to_pages() local 116 pages = (struct page **)nums; in frame_vector_to_pages() 118 pages[i] = pfn_to_page(nums[i]); in frame_vector_to_pages() 134 struct page **pages; in frame_vector_to_pfns() local 138 pages = (struct page **)(vec->ptrs); in frame_vector_to_pfns() 139 nums = (unsigned long *)pages; in frame_vector_to_pfns() [all …]
|
/Linux-v6.1/Documentation/admin-guide/mm/ |
D | hugetlbpage.rst | 30 persistent hugetlb pages in the kernel's huge page pool. It also displays 32 and surplus huge pages in the pool of huge pages of default size. 48 is the size of the pool of huge pages. 50 is the number of huge pages in the pool that are not yet 53 is short for "reserved," and is the number of huge pages for 55 but no allocation has yet been made. Reserved huge pages 57 huge page from the pool of huge pages at fault time. 59 is short for "surplus," and is the number of huge pages in 61 maximum number of surplus huge pages is controlled by 63 Note: When the feature of freeing unused vmemmap pages associated [all …]
|
D | zswap.rst | 10 Zswap is a lightweight compressed cache for swap pages. It takes pages that are 34 Zswap evicts pages from compressed cache on an LRU basis to the backing swap 48 When zswap is disabled at runtime it will stop storing pages that are 50 back into memory all of the pages stored in the compressed pool. The 51 pages stored in zswap will remain in the compressed pool until they are 53 pages out of the compressed pool, a swapoff on the swap device(s) will 54 fault back into memory all swapped out pages, including those in the 60 Zswap receives pages for compression through the Frontswap API and is able to 61 evict pages from its own compressed pool on an LRU basis and write them back to 68 pages are freed. The pool is not preallocated. By default, a zpool [all …]
|
/Linux-v6.1/include/linux/ |
D | balloon_compaction.h | 57 struct list_head pages; /* Pages enqueued & handled to Host */ member 67 struct list_head *pages); 69 struct list_head *pages, size_t n_req_pages); 75 INIT_LIST_HEAD(&balloon->pages); in balloon_devinfo_init() 97 list_add(&page->lru, &balloon->pages); in balloon_page_insert() 141 list_add(&page->lru, &balloon->pages); in balloon_page_insert() 164 static inline void balloon_page_push(struct list_head *pages, struct page *page) in balloon_page_push() argument 166 list_add(&page->lru, pages); in balloon_page_push() 176 static inline struct page *balloon_page_pop(struct list_head *pages) in balloon_page_pop() argument 178 struct page *page = list_first_entry_or_null(pages, struct page, lru); in balloon_page_pop()
|
/Linux-v6.1/net/rds/ |
D | info.c | 65 struct page **pages; member 122 iter->addr = kmap_atomic(*iter->pages); in rds_info_copy() 127 "bytes %lu\n", *iter->pages, iter->addr, in rds_info_copy() 140 iter->pages++; in rds_info_copy() 166 struct page **pages = NULL; in rds_info_getsockopt() local 190 pages = kmalloc_array(nr_pages, sizeof(struct page *), GFP_KERNEL); in rds_info_getsockopt() 191 if (!pages) { in rds_info_getsockopt() 195 ret = pin_user_pages_fast(start, nr_pages, FOLL_WRITE, pages); in rds_info_getsockopt() 214 iter.pages = pages; in rds_info_getsockopt() 237 if (pages) in rds_info_getsockopt() [all …]
|
/Linux-v6.1/drivers/gpu/drm/i915/gem/ |
D | i915_gem_phys.c | 97 struct sg_table *pages) in i915_gem_object_put_pages_phys() argument 99 dma_addr_t dma = sg_dma_address(pages->sgl); in i915_gem_object_put_pages_phys() 100 void *vaddr = sg_page(pages->sgl); in i915_gem_object_put_pages_phys() 102 __i915_gem_object_release_shmem(obj, pages, false); in i915_gem_object_put_pages_phys() 132 sg_free_table(pages); in i915_gem_object_put_pages_phys() 133 kfree(pages); in i915_gem_object_put_pages_phys() 143 void *vaddr = sg_page(obj->mm.pages->sgl) + args->offset; in i915_gem_object_pwrite_phys() 174 void *vaddr = sg_page(obj->mm.pages->sgl) + args->offset; in i915_gem_object_pread_phys() 193 struct sg_table *pages; in i915_gem_object_shmem_to_phys() local 196 pages = __i915_gem_object_unset_pages(obj); in i915_gem_object_shmem_to_phys() [all …]
|
D | i915_gem_pages.c | 19 struct sg_table *pages, in __i915_gem_object_set_pages() argument 37 drm_clflush_sg(pages); in __i915_gem_object_set_pages() 41 obj->mm.get_page.sg_pos = pages->sgl; in __i915_gem_object_set_pages() 43 obj->mm.get_dma_page.sg_pos = pages->sgl; in __i915_gem_object_set_pages() 46 obj->mm.pages = pages; in __i915_gem_object_set_pages() 209 struct sg_table *pages; in __i915_gem_object_unset_pages() local 213 pages = fetch_and_zero(&obj->mm.pages); in __i915_gem_object_unset_pages() 214 if (IS_ERR_OR_NULL(pages)) in __i915_gem_object_unset_pages() 215 return pages; in __i915_gem_object_unset_pages() 233 return pages; in __i915_gem_object_unset_pages() [all …]
|
/Linux-v6.1/drivers/gpu/drm/ |
D | drm_scatter.c | 51 for (i = 0; i < entry->pages; i++) { in drm_sg_cleanup() 83 unsigned long pages, i, j; in drm_legacy_sg_alloc() local 103 pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE; in drm_legacy_sg_alloc() 104 DRM_DEBUG("size=%ld pages=%ld\n", request->size, pages); in drm_legacy_sg_alloc() 106 entry->pages = pages; in drm_legacy_sg_alloc() 107 entry->pagelist = kcalloc(pages, sizeof(*entry->pagelist), GFP_KERNEL); in drm_legacy_sg_alloc() 113 entry->busaddr = kcalloc(pages, sizeof(*entry->busaddr), GFP_KERNEL); in drm_legacy_sg_alloc() 120 entry->virtual = vmalloc_32(pages << PAGE_SHIFT); in drm_legacy_sg_alloc() 131 memset(entry->virtual, 0, pages << PAGE_SHIFT); in drm_legacy_sg_alloc() 138 for (i = (unsigned long)entry->virtual, j = 0; j < pages; in drm_legacy_sg_alloc() [all …]
|
/Linux-v6.1/arch/arm/mach-omap1/ |
D | sram-init.c | 63 int pages; in omap_sram_push() local 71 pages = PAGE_ALIGN(size) / PAGE_SIZE; in omap_sram_push() 73 set_memory_rw(base, pages); in omap_sram_push() 77 set_memory_ro(base, pages); in omap_sram_push() 78 set_memory_x(base, pages); in omap_sram_push() 93 int pages; in omap_detect_and_map_sram() local 127 pages = PAGE_ALIGN(omap_sram_size) / PAGE_SIZE; in omap_detect_and_map_sram() 129 set_memory_ro(base, pages); in omap_detect_and_map_sram() 130 set_memory_x(base, pages); in omap_detect_and_map_sram()
|
/Linux-v6.1/arch/m68k/mm/ |
D | sun3kmap.c | 49 unsigned long type, int pages) in do_pmeg_mapin() argument 55 while(pages) { in do_pmeg_mapin() 59 pages--; in do_pmeg_mapin() 68 int pages; in sun3_ioremap() local 87 pages = size / PAGE_SIZE; in sun3_ioremap() 91 while(pages) { in sun3_ioremap() 95 if(seg_pages > pages) in sun3_ioremap() 96 seg_pages = pages; in sun3_ioremap() 100 pages -= seg_pages; in sun3_ioremap()
|
/Linux-v6.1/fs/squashfs/ |
D | file_direct.c | 33 int i, n, pages, bytes, res = -ENOMEM; in squashfs_readpage_block() local 41 pages = end_index - start_index + 1; in squashfs_readpage_block() 43 page = kmalloc_array(pages, sizeof(void *), GFP_KERNEL); in squashfs_readpage_block() 64 pages = i; in squashfs_readpage_block() 70 actor = squashfs_page_actor_init_special(msblk, page, pages, expected); in squashfs_readpage_block() 89 if (page[pages - 1]->index == end_index && bytes) { in squashfs_readpage_block() 90 pageaddr = kmap_local_page(page[pages - 1]); in squashfs_readpage_block() 96 for (i = 0; i < pages; i++) { in squashfs_readpage_block() 112 for (i = 0; i < pages; i++) { in squashfs_readpage_block()
|
D | page_actor.c | 32 if (actor->next_page == actor->pages) in cache_next_page() 44 int pages, int length) in squashfs_page_actor_init() argument 51 actor->length = length ? : pages * PAGE_SIZE; in squashfs_page_actor_init() 53 actor->pages = pages; in squashfs_page_actor_init() 70 if ((actor->next_page == actor->pages) || in handle_next_page() 106 struct page **page, int pages, int length) in squashfs_page_actor_init_special() argument 123 actor->length = length ? : pages * PAGE_SIZE; in squashfs_page_actor_init_special() 125 actor->pages = pages; in squashfs_page_actor_init_special()
|
/Linux-v6.1/drivers/net/ethernet/amd/xgbe/ |
D | xgbe-desc.c | 141 if (ring->rx_hdr_pa.pages) { in xgbe_free_ring() 144 put_page(ring->rx_hdr_pa.pages); in xgbe_free_ring() 146 ring->rx_hdr_pa.pages = NULL; in xgbe_free_ring() 152 if (ring->rx_buf_pa.pages) { in xgbe_free_ring() 155 put_page(ring->rx_buf_pa.pages); in xgbe_free_ring() 157 ring->rx_buf_pa.pages = NULL; in xgbe_free_ring() 289 struct page *pages = NULL; in xgbe_alloc_pages() local 300 pages = alloc_pages_node(node, gfp, order); in xgbe_alloc_pages() 301 if (pages) in xgbe_alloc_pages() 308 if (!pages && (node != NUMA_NO_NODE)) { in xgbe_alloc_pages() [all …]
|