| /linux/net/ceph/ |
| H A 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_objs(*pages, num_pages, flags); in ceph_alloc_page_vector() 45 if (!pages) in ceph_alloc_page_vector() [all …]
|
| /linux/mm/ |
| H A 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 …]
|
| /linux/drivers/gpu/drm/i915/gem/selftests/ |
| H A 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 41 pages = kmalloc_obj(*pages, GFP); in huge_get_pages() 42 if (!pages) in huge_get_pages() 45 if (sg_alloc_table(pages, npages, GFP)) { in huge_get_pages() 46 kfree(pages); in huge_get_pages() 50 sg = pages->sgl; in huge_get_pages() [all …]
|
| /linux/io_uring/ |
| H A D | memmap.c | 18 static bool io_mem_alloc_compound(struct page **pages, int nr_pages, in io_mem_alloc_compound() argument 35 pages[i] = page + i; in io_mem_alloc_compound() 43 struct page **pages; in io_pin_pages() local 59 pages = kvmalloc_objs(struct page *, nr_pages, GFP_KERNEL_ACCOUNT); in io_pin_pages() 60 if (!pages) in io_pin_pages() 64 pages); in io_pin_pages() 68 return pages; in io_pin_pages() 75 unpin_user_pages(pages, ret); in io_pin_pages() 78 kvfree(pages); in io_pin_pages() 93 if (mr->pages) { in io_free_region() [all …]
|
| /linux/drivers/xen/ |
| H A 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 = kzalloc_objs(pages[0], nr_pages); in xen_xlate_map_ballooned_pages() [all …]
|
| /linux/drivers/gpu/drm/xen/ |
| H A D | xen_drm_front_gem.c | 31 struct page **pages; member 50 xen_obj->pages = kvmalloc_objs(struct page *, 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() 93 ret = vm_map_pages(vma, xen_obj->pages, xen_obj->num_pages); in xen_drm_front_gem_object_mmap() 160 xen_obj->pages); in gem_create() 176 xen_obj->pages = drm_gem_get_pages(&xen_obj->base); in gem_create() 177 if (IS_ERR(xen_obj->pages)) { in gem_create() 178 ret = PTR_ERR(xen_obj->pages); in gem_create() [all …]
|
| /linux/drivers/staging/media/ipu7/ |
| H A D | ipu7-dma.c | 23 struct page **pages; member 62 struct page **pages; in __alloc_buffer() local 65 pages = kvzalloc(array_size, GFP_KERNEL); in __alloc_buffer() 66 if (!pages) in __alloc_buffer() 74 pages[i] = alloc_pages(gfp, order); in __alloc_buffer() 75 while (!pages[i] && order) in __alloc_buffer() 76 pages[i] = alloc_pages(gfp, --order); in __alloc_buffer() 77 if (!pages[i]) in __alloc_buffer() 81 split_page(pages[i], order); in __alloc_buffer() 84 pages[i + j] = pages[i] + j; in __alloc_buffer() [all …]
|
| /linux/drivers/media/pci/intel/ipu6/ |
| H A D | ipu6-dma.c | 23 struct page **pages; member 62 struct page **pages; in __alloc_buffer() local 65 pages = kvzalloc(array_size, GFP_KERNEL); in __alloc_buffer() 66 if (!pages) in __alloc_buffer() 74 pages[i] = alloc_pages(gfp, order); in __alloc_buffer() 75 while (!pages[i] && order) in __alloc_buffer() 76 pages[i] = alloc_pages(gfp, --order); in __alloc_buffer() 77 if (!pages[i]) in __alloc_buffer() 81 split_page(pages[i], order); in __alloc_buffer() 84 pages[i + j] = pages[i] + j; in __alloc_buffer() [all …]
|
| /linux/kernel/dma/ |
| H A D | remap.c | 17 return area->pages; in dma_common_find_pages() 24 void *dma_common_pages_remap(struct page **pages, size_t size, in dma_common_pages_remap() argument 29 vaddr = vmap(pages, PAGE_ALIGN(size) >> PAGE_SHIFT, in dma_common_pages_remap() 32 find_vm_area(vaddr)->pages = pages; in dma_common_pages_remap() 44 struct page **pages; in dma_common_contiguous_remap() local 48 pages = kvmalloc_objs(struct page *, count); in dma_common_contiguous_remap() 49 if (!pages) in dma_common_contiguous_remap() 52 pages[i] = page++; in dma_common_contiguous_remap() 53 vaddr = vmap(pages, count, VM_DMA_COHERENT, prot); in dma_common_contiguous_remap() 54 kvfree(pages); in dma_common_contiguous_remap()
|
| /linux/drivers/staging/media/ipu3/ |
| H A 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_objs(*pages, count); 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/drivers/gpu/drm/i915/gem/ |
| H A D | i915_gem_pages.c | 24 struct sg_table *pages) in __i915_gem_object_set_pages() argument 41 drm_clflush_sg(pages); in __i915_gem_object_set_pages() 45 obj->mm.get_page.sg_pos = pages->sgl; in __i915_gem_object_set_pages() 47 obj->mm.get_dma_page.sg_pos = pages->sgl; in __i915_gem_object_set_pages() 50 obj->mm.pages = pages; in __i915_gem_object_set_pages() 52 obj->mm.page_sizes.phys = i915_sg_dma_sizes(pages->sgl); in __i915_gem_object_set_pages() 216 struct sg_table *pages; in __i915_gem_object_unset_pages() local 220 pages = fetch_and_zero(&obj->mm.pages); in __i915_gem_object_unset_pages() 221 if (IS_ERR_OR_NULL(pages)) in __i915_gem_object_unset_pages() 222 return pages; in __i915_gem_object_unset_pages() [all …]
|
| /linux/arch/s390/kernel/diag/ |
| H A D | diag310.c | 110 static int diag310_get_memtop_size(unsigned long *pages, unsigned long level) in diag310_get_memtop_size() argument 118 *pages = res.result; in diag310_get_memtop_size() 129 static int diag310_store_topology_map(void *buf, unsigned long pages, unsigned long level) in diag310_store_topology_map() argument 132 union diag310_req_size req_size = { .page_count = pages }; in diag310_store_topology_map() 193 unsigned long pages; in memtop_get_page_count() local 198 pages = READ_ONCE(memtop_pages[level - 1]); in memtop_get_page_count() 199 if (!pages) { in memtop_get_page_count() 200 rc = diag310_get_memtop_size(&pages, level); in memtop_get_page_count() 203 WRITE_ONCE(memtop_pages[level - 1], pages); in memtop_get_page_count() 205 *res = pages; in memtop_get_page_count() [all …]
|
| /linux/drivers/media/common/videobuf2/ |
| H A D | frame_vector.c | 82 struct page **pages; in put_vaddr_frames() local 86 pages = frame_vector_pages(vec); in put_vaddr_frames() 92 if (WARN_ON(IS_ERR(pages))) in put_vaddr_frames() 95 unpin_user_pages(pages, vec->nr_frames); in put_vaddr_frames() 114 struct page **pages; in frame_vector_to_pages() local 122 pages = (struct page **)nums; in frame_vector_to_pages() 124 pages[i] = pfn_to_page(nums[i]); in frame_vector_to_pages() 140 struct page **pages; in frame_vector_to_pfns() local 144 pages = (struct page **)(vec->ptrs); in frame_vector_to_pfns() 145 nums = (unsigned long *)pages; in frame_vector_to_pfns() [all …]
|
| /linux/net/rds/ |
| H A 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_objs(struct page *, nr_pages); 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/Documentation/arch/powerpc/ |
| H A D | vmemmap_dedup.rst | 14 With 2M PMD level mapping, we require 32 struct pages and a single 64K vmemmap 15 page can contain 1024 struct pages (64K/sizeof(struct page)). Hence there is no 18 With 1G PUD level mapping, we require 16384 struct pages and a single 64K 19 vmemmap page can contain 1024 struct pages (64K/sizeof(struct page)). Hence we 20 require 16 64K pages in vmemmap to map the struct page for 1G PUD level mapping. 46 With 4K page size, 2M PMD level mapping requires 512 struct pages and a single 47 4K vmemmap page contains 64 struct pages(4K/sizeof(struct page)). Hence we 48 require 8 4K pages in vmemmap to map the struct page for 2M pmd level mapping. 74 With 1G PUD level mapping, we require 262144 struct pages and a single 4K 75 vmemmap page can contain 64 struct pages (4K/sizeof(struct page)). Hence we [all …]
|
| /linux/drivers/iommu/iommufd/ |
| H A D | ioas.c | 440 static bool need_charge_update(struct iopt_pages *pages) in need_charge_update() argument 442 switch (pages->account_mode) { in need_charge_update() 446 return pages->source_mm != current->mm; in need_charge_update() 452 return (pages->source_user != current_user()) || in need_charge_update() 453 (pages->source_mm != current->mm); in need_charge_update() 493 static void change_mm(struct iopt_pages *pages) in change_mm() argument 495 struct task_struct *old_task = pages->source_task; in change_mm() 496 struct user_struct *old_user = pages->source_user; in change_mm() 497 struct mm_struct *old_mm = pages->source_mm; in change_mm() 499 pages->source_mm = current->mm; in change_mm() [all …]
|
| /linux/arch/arm64/include/asm/ |
| H A D | tlbflush.h | 266 #define __TLBI_RANGE_NUM(pages, scale) \ argument 267 (((pages) >> (5 * (scale) + 1)) - 1) 523 u64 start, size_t pages, in __flush_tlb_range_op() argument 527 u64 addr = start, end = start + pages * PAGE_SIZE; in __flush_tlb_range_op() 533 pages = (end - addr) >> PAGE_SHIFT; in __flush_tlb_range_op() 535 if (!system_supports_tlb_range() || pages == 1) in __flush_tlb_range_op() 541 num = __TLBI_RANGE_NUM(pages, scale); in __flush_tlb_range_op() 555 #define __flush_s1_tlb_range_op(op, start, pages, stride, asid, tlb_level) \ argument 556 __flush_tlb_range_op(op, r##op, start, pages, stride, asid, tlb_level, lpa2_is_enabled()) 558 #define __flush_s2_tlb_range_op(op, start, pages, stride, tlb_level) \ argument [all …]
|
| /linux/arch/m68k/mm/ |
| H A D | sun3kmap.c | 47 unsigned long type, int pages) in do_pmeg_mapin() argument 53 while(pages) { in do_pmeg_mapin() 57 pages--; in do_pmeg_mapin() 66 int pages; in sun3_ioremap() local 85 pages = size / PAGE_SIZE; in sun3_ioremap() 89 while(pages) { in sun3_ioremap() 93 if(seg_pages > pages) in sun3_ioremap() 94 seg_pages = pages; in sun3_ioremap() 98 pages -= seg_pages; in sun3_ioremap()
|
| /linux/drivers/net/ethernet/amd/xgbe/ |
| H A D | xgbe-desc.c | 32 if (ring->rx_hdr_pa.pages) { in xgbe_free_ring() 35 put_page(ring->rx_hdr_pa.pages); in xgbe_free_ring() 37 ring->rx_hdr_pa.pages = NULL; in xgbe_free_ring() 43 if (ring->rx_buf_pa.pages) { in xgbe_free_ring() 46 put_page(ring->rx_buf_pa.pages); in xgbe_free_ring() 48 ring->rx_buf_pa.pages = NULL; in xgbe_free_ring() 180 struct page *pages = NULL; in xgbe_alloc_pages() local 191 pages = alloc_pages_node(node, gfp, order); in xgbe_alloc_pages() 192 if (pages) in xgbe_alloc_pages() 199 if (!pages && (node != NUMA_NO_NODE)) { in xgbe_alloc_pages() [all …]
|
| /linux/drivers/net/ethernet/huawei/hinic3/ |
| H A D | hinic3_queue_common.c | 16 qpages->pages = NULL; in hinic3_queue_pages_init() 29 qpages->pages + pg_cnt); in __queue_pages_free() 31 kfree(qpages->pages); in __queue_pages_free() 32 qpages->pages = NULL; in __queue_pages_free() 47 qpages->pages = kzalloc_objs(qpages->pages[0], qpages->num_pages); in hinic3_queue_pages_alloc() 48 if (!qpages->pages) in hinic3_queue_pages_alloc() 59 qpages->pages + pg_idx); in hinic3_queue_pages_alloc()
|
| /linux/fs/squashfs/ |
| H A 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() 75 if ((actor->next_page == actor->pages) || in handle_next_page() 111 struct page **page, int pages, int length, loff_t start_index) in squashfs_page_actor_init_special() argument 128 actor->length = length ? : pages * PAGE_SIZE; in squashfs_page_actor_init_special() 130 actor->pages = pages; in squashfs_page_actor_init_special()
|
| /linux/fs/erofs/ |
| H A D | zutil.c | 12 struct page **pages; member 87 tmp_pages[j] = gbuf->pages[j]; in z_erofs_gbuf_growsize() 101 kfree(gbuf->pages); in z_erofs_gbuf_growsize() 102 gbuf->pages = tmp_pages; in z_erofs_gbuf_growsize() 115 tmp_pages[j] != gbuf->pages[j])) in z_erofs_gbuf_growsize() 140 z_erofs_rsvbuf->pages = kzalloc_objs(*z_erofs_rsvbuf->pages, in z_erofs_gbuf_init() 142 if (!z_erofs_rsvbuf->pages) { in z_erofs_gbuf_init() 164 if (!gbuf->pages) in z_erofs_gbuf_exit() 168 if (gbuf->pages[j]) in z_erofs_gbuf_exit() 169 put_page(gbuf->pages[j]); in z_erofs_gbuf_exit() [all …]
|
| /linux/Documentation/admin-guide/mm/ |
| H A D | zswap.rst | 8 Zswap is a lightweight compressed cache for swap pages. It takes pages that are 26 Zswap evicts pages from compressed cache on an LRU basis to the backing swap 40 When zswap is disabled at runtime it will stop storing pages that are 42 back into memory all of the pages stored in the compressed pool. The 43 pages stored in zswap will remain in the compressed pool until they are 45 pages out of the compressed pool, a swapoff on the swap device(s) will 46 fault back into memory all swapped out pages, including those in the 52 Zswap receives pages for compression from the swap subsystem and is able to 53 evict pages from its own compressed pool on an LRU basis and write them back to 60 pages are freed. The pool is not preallocated. [all …]
|
| H A D | idle_page_tracking.rst | 8 The idle page tracking feature allows to track which memory pages are being 37 Only accesses to user memory pages are tracked. These are pages mapped to a 38 process address space, page cache and buffer pages, swap cache pages. For other 39 page types (e.g. SLAB pages) an attempt to mark a page idle is silently ignored, 40 and hence such pages are never reported idle. 42 For huge pages the idle flag is set only on the head page, so one has to read 43 ``/proc/kpageflags`` in order to correctly count idle huge pages. 50 That said, in order to estimate the amount of pages that are not used by a 53 1. Mark all the workload's pages as idle by setting corresponding bits in 54 ``/sys/kernel/mm/page_idle/bitmap``. The pages can be found by reading [all …]
|
| /linux/drivers/net/ethernet/synopsys/ |
| H A D | dwc-xlgmac-desc.c | 41 if (desc_data->rx.hdr.pa.pages) in xlgmac_unmap_desc_data() 42 put_page(desc_data->rx.hdr.pa.pages); in xlgmac_unmap_desc_data() 44 if (desc_data->rx.hdr.pa_unmap.pages) { in xlgmac_unmap_desc_data() 48 put_page(desc_data->rx.hdr.pa_unmap.pages); in xlgmac_unmap_desc_data() 51 if (desc_data->rx.buf.pa.pages) in xlgmac_unmap_desc_data() 52 put_page(desc_data->rx.buf.pa.pages); in xlgmac_unmap_desc_data() 54 if (desc_data->rx.buf.pa_unmap.pages) { in xlgmac_unmap_desc_data() 58 put_page(desc_data->rx.buf.pa_unmap.pages); in xlgmac_unmap_desc_data() 93 if (ring->rx_hdr_pa.pages) { in xlgmac_free_ring() 96 put_page(ring->rx_hdr_pa.pages); in xlgmac_free_ring() [all …]
|