| /linux/drivers/iommu/iommufd/ |
| H A D | pages.c | 73 * allocation can hold about 26M of 4k pages and 13G of 2M pages in an 167 static void iopt_pages_add_npinned(struct iopt_pages *pages, size_t npages) in iopt_pages_add_npinned() argument 171 rc = check_add_overflow(pages->npinned, npages, &pages->npinned); in iopt_pages_add_npinned() 173 WARN_ON(rc || pages->npinned > pages->npages); in iopt_pages_add_npinned() 176 static void iopt_pages_sub_npinned(struct iopt_pages *pages, size_t npages) in iopt_pages_sub_npinned() argument 180 rc = check_sub_overflow(pages->npinned, npages, &pages->npinned); in iopt_pages_sub_npinned() 182 WARN_ON(rc || pages->npinned > pages->npages); in iopt_pages_sub_npinned() 185 static void iopt_pages_err_unpin(struct iopt_pages *pages, in iopt_pages_err_unpin() argument 193 iopt_pages_sub_npinned(pages, npages); in iopt_pages_err_unpin() 199 * covers a portion of the first and last pages in the range. [all …]
|
| /linux/net/ceph/ |
| H A D | pagevec.c | 13 void ceph_release_page_vector(struct page **pages, int num_pages) in ceph_put_page_vector() argument 18 __free_pages(pages[i], 0); in ceph_put_page_vector() 19 kfree(pages); in ceph_put_page_vector() 24 * allocate a vector new pages 28 struct page **pages; in ceph_release_page_vector() 31 pages = kmalloc_objs(*pages, num_pages, flags); in ceph_release_page_vector() 32 if (!pages) in ceph_release_page_vector() 35 pages[i] = __page_cache_alloc(flags); 36 if (pages[ 26 ceph_release_page_vector(struct page ** pages,int num_pages) ceph_release_page_vector() argument 41 struct page **pages; ceph_alloc_page_vector() local 58 ceph_copy_from_page_vector(struct page ** pages,void * data,loff_t off,size_t len) ceph_copy_from_page_vector() argument 85 ceph_zero_page_vector_range(int off,int len,struct page ** pages) ceph_zero_page_vector_range() argument [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/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 | ksm.rst | 18 which have been registered with it, looking for pages of identical 21 content). The amount of pages that KSM daemon scans in a single pass 25 KSM only merges anonymous (private) pages, never pagecache (file) pages. 26 KSM's merged pages were originally locked into kernel memory, but can now 27 be swapped out just like other user pages (but sharing is broken when they 45 to cancel that advice and restore unshared pages: whereupon KSM 55 cannot contain any pages which KSM could actually merge; even if 80 how many pages to scan before ksmd goes to sleep 95 specifies if pages from different NUMA nodes can be merged. 96 When set to 0, ksm merges only pages which physically reside [all …]
|
| H A D | concepts.rst | 41 The physical system memory is divided into page frames, or pages. The 48 pages. These mappings are described by page tables that allow 53 addresses of actual pages used by the software. The tables at higher 54 levels contain physical addresses of the pages belonging to the lower 64 Huge Pages 75 Many modern CPU architectures allow mapping of the memory pages 77 it is possible to map 2M and even 1G pages using entries in the second 78 and the third level page tables. In Linux such pages are called 79 `huge`. Usage of huge pages significantly reduces pressure on TLB, 83 memory with the huge pages. The first one is `HugeTLB filesystem`, or [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/Documentation/mm/ |
| H A D | unevictable-lru.rst | 34 main memory will have over 32 million 4k pages in a single node. When a large 35 fraction of these pages are not evictable for any reason [see below], vmscan 37 of pages that are evictable. This can result in a situation where all CPUs are 41 The unevictable list addresses the following classes of unevictable pages: 51 The infrastructure may also be able to handle other conditions that make pages 104 lru_list enum element). The memory controller tracks the movement of pages to 108 not attempt to reclaim pages on the unevictable list. This has a couple of 111 (1) Because the pages are "hidden" from reclaim on the unevictable list, the 112 reclaim process can be more efficient, dealing only with pages that have a 115 (2) On the other hand, if too many of the pages charged to the control group [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 34 * can hold more pages than the region exposes. Account those too, in io_mem_alloc_compound() 50 pages[i] = page + i; in io_mem_alloc_compound() 58 struct page **pages; in io_pin_pages() local 74 pages = kvmalloc_objs(struct page *, nr_pages, GFP_KERNEL_ACCOUNT); in io_pin_pages() 75 if (!pages) in io_pin_pages() 79 pages); in io_pin_pages() 80 /* success, mapped all pages */ in io_pin_pages() 83 return pages; in io_pin_pages() 88 /* if we did partial map, release any pages we did get */ in io_pin_pages() [all …]
|
| /linux/drivers/media/pci/intel/ipu6/ |
| H A D | ipu6-dma.c | 23 struct page **pages; member 49 * Ensure that the allocated pages are zeroed, and that any data in __clear_buffer() 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() [all …]
|
| /linux/fs/isofs/ |
| H A D | compress.c | 37 * to one zisofs block. Store the data in the @pages array with @pcount 42 struct page **pages, unsigned poffset, in zisofs_uncompress_block() argument 70 if (!pages[i]) in zisofs_uncompress_block() 72 memzero_page(pages[i], off, PAGE_SIZE - off); in zisofs_uncompress_block() 73 SetPageUptodate(pages[i]); in zisofs_uncompress_block() 123 if (pages[curpage]) { in zisofs_uncompress_block() 124 stream.next_out = kmap_local_page(pages[curpage]) in zisofs_uncompress_block() 176 if (pages[curpage]) { in zisofs_uncompress_block() 177 flush_dcache_page(pages[curpage]); in zisofs_uncompress_block() 178 SetPageUptodate(pages[curpage]); in zisofs_uncompress_block() [all …]
|
| /linux/drivers/xen/ |
| H A D | xlate_mmu.c | 47 /* Break down the pages in 4KB chunk and call fn for each gfn */ 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() 205 * xen_xlate_map_ballooned_pages - map a new set of ballooned pages [all …]
|
| H A D | unpopulated-alloc.c | 21 /* Pages to subtract from the memory count when setting balloon target. */ 156 * xen_alloc_unpopulated_pages - alloc unpopulated pages 157 * @nr_pages: Number of pages 158 * @pages: pages returned 161 int xen_alloc_unpopulated_pages(unsigned int nr_pages, struct page **pages) in xen_alloc_unpopulated_pages() argument 169 * construct pages. in xen_alloc_unpopulated_pages() 172 return xen_alloc_ballooned_pages(nr_pages, pages); in xen_alloc_unpopulated_pages() 187 pages[i] = pg; in xen_alloc_unpopulated_pages() 196 pages[j]->zone_device_data = page_list; in xen_alloc_unpopulated_pages() 197 page_list = pages[j]; in xen_alloc_unpopulated_pages() [all …]
|
| /linux/drivers/staging/media/ipu7/ |
| H A D | ipu7-dma.c | 23 struct page **pages; member 49 * Ensure that the allocated pages are zeroed, and that any data in __clear_buffer() 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() [all …]
|
| /linux/include/drm/ttm/ |
| H A D | ttm_tt.h | 44 * struct ttm_tt - This is a structure holding the pages, caching- and aperture 49 /** @pages: Array of pages backing the data. */ 50 struct page **pages; member 56 * TTM_TT_FLAG_SWAPPED: Set by TTM when the pages have been unpopulated 58 * pages back in, and unset the flag. Drivers should in general never 61 * TTM_TT_FLAG_ZERO_ALLOC: Set if the pages will be zeroed on 64 * TTM_TT_FLAG_EXTERNAL: Set if the underlying pages were allocated 66 * TTM swapping out such pages. Also important is to prevent TTM from 67 * ever directly mapping these pages. 74 * still valid to use TTM to map the pages directly. This is useful when [all …]
|
| /linux/drivers/misc/ |
| H A D | vmw_balloon.c | 8 * acts like a "balloon" that can be inflated to reclaim physical pages by 10 * freeing up the underlying machine pages so they can be allocated to 51 /* Maximum number of refused pages we accumulate during inflation cycle */ 147 * ballooned pages (up to 512). 149 * pages that are about to be deflated from the 152 * for 2MB pages. 155 * pages. 240 struct list_head pages; member 315 * @batch_max_pages: maximum pages that can be locked/unlocked. 317 * Indicates the number of pages that the hypervisor can lock or unlock [all …]
|
| /linux/tools/perf/pmu-events/arch/x86/amdzen4/ |
| H A D | memory.json | 40 "BriefDescription": "L1 DTLB misses with L2 DTLB hits for 4k pages.", 46 … misses with L2 DTLB hits for coalesced pages. A coalesced page is a 16k page created from four ad… 52 "BriefDescription": "L1 DTLB misses with L2 DTLB hits for 2M pages.", 58 "BriefDescription": "L1 DTLB misses with L2 DTLB hits for 1G pages.", 64 …fDescription": "L1 DTLB misses with L2 DTLB misses (page-table walks are requested) for 4k pages.", 70 …able walks are requested) for coalesced pages. A coalesced page is a 16k page created from four ad… 76 …fDescription": "L1 DTLB misses with L2 DTLB misses (page-table walks are requested) for 2M pages.", 82 …fDescription": "L1 DTLB misses with L2 DTLB misses (page-table walks are requested) for 1G pages.", 123 …tion fetches that miss in both the L1 and L2 ITLBs (page-table walks are requested) for 4k pages.", 129 …tion fetches that miss in both the L1 and L2 ITLBs (page-table walks are requested) for 2M pages.", [all …]
|
| /linux/include/xen/ |
| H A D | xen-ops.h | 67 struct page **pages); 69 int nr, struct page **pages); 76 * @vma: VMA to map the pages into in xen_xlate_remap_gfn_array() 77 * @addr: Address at which to map the pages in xen_xlate_remap_gfn_array() 82 * @domid: Domain owning the pages in xen_xlate_remap_gfn_array() 83 * @pages: Array of pages if this domain has an auto-translated physmap in xen_xlate_remap_gfn_array() 96 struct page **pages) 100 prot, domid, pages); 113 * @vma: VMA to map the pages int 81 xen_xlate_remap_gfn_array(struct vm_area_struct * vma,unsigned long addr,xen_pfn_t * gfn,int nr,int * err_ptr,pgprot_t prot,unsigned int domid,struct page ** pages) xen_xlate_remap_gfn_array() argument 87 xen_xlate_unmap_gfn_range(struct vm_area_struct * vma,int nr,struct page ** pages) xen_xlate_unmap_gfn_range() argument 118 xen_remap_domain_gfn_array(struct vm_area_struct * vma,unsigned long addr,xen_pfn_t * gfn,int nr,int * err_ptr,pgprot_t prot,unsigned int domid,struct page ** pages) xen_remap_domain_gfn_array() argument 177 xen_remap_domain_gfn_range(struct vm_area_struct * vma,unsigned long addr,xen_pfn_t gfn,int nr,pgprot_t prot,unsigned int domid,struct page ** pages) xen_remap_domain_gfn_range() argument [all...] |
| /linux/kernel/dma/ |
| H A D | remap.c | 17 return area->pages; in dma_common_find_pages() 21 * Remaps an array of PAGE_SIZE pages into another vm_area. 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() [all …]
|
| /linux/Documentation/arch/x86/ |
| H A D | sgx.rst | 37 SGX utilizes an *Enclave Page Cache (EPC)* to store pages that are associated 39 Unlike pages used for regular memory, pages can only be accessed from outside of 56 Regular EPC pages contain the code and data of an enclave. 59 Thread Control Structure pages define the entry points to an enclave and 63 Version Array pages contain 512 slots, each of which can contain a version 69 The processor tracks EPC pages in a hardware metadata structure called the 95 pages and establish enclave page permissions. 108 adding and removing of enclave pages. When an enclave accesses an address 151 use since the reset, enclave pages may be in an inconsistent state. This might 153 reinitializes all enclave pages so that they can be allocated and re-used. [all …]
|
| /linux/drivers/media/common/videobuf2/ |
| H A D | frame_vector.c | 16 * @nr_frames: number of pages / pfns from start to map 18 * @vec: structure which receives pages / pfns of the addresses mapped. 22 * with page frame numbers or page pointers to corresponding pages (choice 24 * belongs to a normal vma, the function grabs reference to each of the pages 29 * The function returns number of pages mapped which may be less than 72 * put_vaddr_frames() - drop references to pages if get_vaddr_frames() acquired 76 * Drop references to pages if get_vaddr_frames() acquired them. We also 82 struct page **pages; in put_vaddr_frames() local 86 pages = frame_vector_pages(vec); in put_vaddr_frames() 89 * get_vaddr_frames() got pages but vec was later converted to pfns. in put_vaddr_frames() [all …]
|
| /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/lib/vdso/ |
| H A D | datastore.c | 39 * Allocate the data pages dynamically. SPARC does not support mapping in vdso_setup_data_pages() 40 * static pages to be mapped into userspace. in vdso_setup_data_pages() 43 * Do not use folios. In time namespaces the pages are mapped in a different order in vdso_setup_data_pages() 48 panic("Unable to allocate VDSO storage pages"); in vdso_setup_data_pages() 50 /* The pages are mapped one-by-one into userspace and each one needs to be refcounted. */ in vdso_setup_data_pages() 53 /* Move the data already written by other subsystems to the new pages */ in vdso_setup_data_pages() 35 struct page *pages; vdso_setup_data_pages() local
|
| /linux/drivers/misc/bcm-vk/ |
| H A D | bcm_vk_sg.c | 57 /* Calculate number of pages */ in bcm_vk_dma_alloc() 62 /* Allocate DMA pages */ in bcm_vk_dma_alloc() 63 dma->pages = kmalloc_objs(struct page *, dma->nr_pages); in bcm_vk_dma_alloc() 64 if (!dma->pages) in bcm_vk_dma_alloc() 67 dev_dbg(dev, "Alloc DMA Pages [0x%llx+0x%x => %d pages]\n", in bcm_vk_dma_alloc() 72 /* Get user pages into memory */ in bcm_vk_dma_alloc() 76 dma->pages); in bcm_vk_dma_alloc() 101 /* Map all pages into DMA */ in bcm_vk_dma_alloc() 105 dma->pages[0], in bcm_vk_dma_alloc() 111 __free_page(dma->pages[0]); in bcm_vk_dma_alloc() [all …]
|
| /linux/drivers/gpu/drm/amd/amdgpu/ |
| H A D | amdgpu_gart.c | 44 * in the GPU's address space. System pages can be mapped into 45 * the aperture and look like contiguous pages from the GPU's 46 * perspective. A page table maps the pages in the aperture 47 * to the actual backing pages in system memory. 72 * when pages are taken out of the GART 137 /* assign pages to this device */ in amdgpu_gart_table_ram_alloc() 142 * then set_memory_wc() could be used as a workaround to mark the pages in amdgpu_gart_table_ram_alloc() 298 * amdgpu_gart_unbind - unbind pages from the gart page table 302 * @pages: number of pages to unbind 304 * Unbinds the requested pages from the gart page table and [all …]
|