/linux/drivers/gpu/drm/xe/ |
H A D | xe_bo_evict.c | 18 * Evict non-pinned user BOs first (via GPU), evict pinned external BOs next 19 * (via GPU), wait for evictions, and finally evict pinned kernel BOs via CPU. 60 /* Pinned user memory in VRAM */ in xe_bo_evict_all() 62 spin_lock(&xe->pinned.lock); in xe_bo_evict_all() 64 bo = list_first_entry_or_null(&xe->pinned.external_vram, in xe_bo_evict_all() 70 spin_unlock(&xe->pinned.lock); in xe_bo_evict_all() 77 spin_lock(&xe->pinned.lock); in xe_bo_evict_all() 79 &xe->pinned.external_vram); in xe_bo_evict_all() 80 spin_unlock(&xe->pinned.lock); in xe_bo_evict_all() 84 spin_lock(&xe->pinned.lock); in xe_bo_evict_all() [all …]
|
H A D | xe_bo_doc.h | 31 * are in the GGTT), are pinned (can't move or be evicted at runtime), have a 35 * More details of why kernel BOs are pinned and contiguous below. 43 * user BOs are evictable and user BOs are never pinned by XE. The allocation of 134 * A simple TTM call (ttm_resource_manager_evict_all) can move all non-pinned 135 * (user) BOs to sysmem. External BOs that are pinned need to be manually 141 * TTM memcpy (CPU) to move any kernel (pinned) BO on either suspend or resume. 145 * for simplity, we enforce that all kernel (pinned) BOs are contiguous and 148 * Pinned external BOs in VRAM are restored on resume via the GPU. 171 * Make some kernel BO evictable rather than pinned. An example of this would be
|
H A D | xe_device_types.h | 392 /** @pinned: pinned BO state */ 394 /** @pinned.lock: protected pinned BO list state */ 396 /** @pinned.kernel_bo_present: pinned kernel BO that are present */ 398 /** @pinned.evicted: pinned BO that have been evicted */ 400 /** @pinned.external_vram: pinned external BO in vram*/ 402 } pinned; member
|
/linux/drivers/infiniband/hw/hfi1/ |
H A D | pin_system.c | 119 int pinned, cleared; in pin_system_pages() local 138 pinned = hfi1_acquire_user_pages(current->mm, start_address, npages, 0, in pin_system_pages() 141 if (pinned < 0) { in pin_system_pages() 143 SDMA_DBG(req, "pinned %d", pinned); in pin_system_pages() 144 return pinned; in pin_system_pages() 146 if (pinned != npages) { in pin_system_pages() 147 unpin_vector_pages(current->mm, pages, node->npages, pinned); in pin_system_pages() 148 SDMA_DBG(req, "npages %u pinned %d", npages, pinned); in pin_system_pages() 155 atomic_add(pinned, &pq->n_locked); in pin_system_pages() 156 SDMA_DBG(req, "done. pinned %d", pinned); in pin_system_pages() [all …]
|
H A D | user_exp_rcv.c | 122 * Release pinned receive buffer pages. 161 int pinned; in pin_rcv_pages() local 179 * pages, accept the amount pinned so far and program only that. in pin_rcv_pages() 187 pinned = hfi1_acquire_user_pages(current->mm, vaddr, npages, true, pages); in pin_rcv_pages() 188 if (pinned <= 0) { in pin_rcv_pages() 190 return pinned; in pin_rcv_pages() 193 fd->tid_n_pinned += pinned; in pin_rcv_pages() 194 return pinned; in pin_rcv_pages() 249 int ret = 0, need_group = 0, pinned; in hfi1_user_exp_rcv_setup() local 288 pinned = pin_rcv_pages(fd, tidbuf); in hfi1_user_exp_rcv_setup() [all …]
|
/linux/drivers/infiniband/core/ |
H A D | umem.c | 140 * @access: IB_ACCESS_xxx flags for memory being pinned 153 int pinned, ret; in ib_umem_get() local 213 pinned = pin_user_pages_fast(cur_base, in ib_umem_get() 218 if (pinned < 0) { in ib_umem_get() 219 ret = pinned; in ib_umem_get() 223 cur_base += pinned * PAGE_SIZE; in ib_umem_get() 224 npages -= pinned; in ib_umem_get() 226 &umem->sgt_append, page_list, pinned, 0, in ib_umem_get() 227 pinned << PAGE_SHIFT, ib_dma_max_seg_size(device), in ib_umem_get() 230 unpin_user_pages_dirty_lock(page_list, pinned, 0); in ib_umem_get() [all …]
|
/linux/Documentation/core-api/ |
H A D | pin_user_pages.rst | 35 In other words, use pin_user_pages*() for DMA-pinned pages, and 89 Tracking dma-pinned pages 92 Some of the key design constraints, and solutions, for tracking dma-pinned 98 * False positives (reporting that a page is dma-pinned, when in fact it is not) 105 the upper bits in that field for a dma-pinned count. "Sort of", means that, 109 on it 1024 times, then it will appear to have a single dma-pinned count. 121 * Callers must specifically request "dma-pinned tracking of pages". In other 152 NOTE: Some pages, such as DAX pages, cannot be pinned with longterm pins. That's 202 The whole point of marking folios as "DMA-pinned" or "gup-pinned" is to be able 203 to query, "is this folio DMA-pinned?" That allows code such as folio_mkclean() [all …]
|
/linux/rust/kernel/init/ |
H A D | macros.rs | 72 //! This macro is used to specify which fields are structurally pinned and which fields are not. It 153 //! // Now we only want to implement `Unpin` for `Bar` when every structurally pinned field is 154 //! // `Unpin`. In other words, whether `Bar` is `Unpin` only depends on structurally pinned 178 //! // access to `&mut self` inside of `drop` even if the struct was pinned. This could lead to 394 //! let pinned = unsafe { ::core::pin::Pin::new_unchecked(self) }; 398 //! ::kernel::init::PinnedDrop::drop(pinned, token); 527 /// This macro first parses the struct definition such that it separates pinned and not pinned 546 // identify fields marked with `#[pin]`, these fields are the 'pinned fields'. The user 547 // wants these to be structurally pinned 955 let pinned = unsafe { ::core::pin::Pin::new_unchecked(self) }; global() localVariable [all...] |
/linux/Documentation/arch/powerpc/ |
H A D | pmu-ebb.rst | 53 existing "pinned" and "exclusive" attributes of perf_events. This means EBB 54 events will be given priority over other events, unless they are also pinned. 55 If an EBB event and a regular event are both pinned, then whichever is enabled 70 An EBB event must be created with the "pinned" and "exclusive" attributes set. 100 This behaviour occurs because the EBB event is pinned and exclusive. When the 101 EBB event is enabled it will force all other non-pinned events off the PMU. In 103 pinned on the PMU then the enable will not be successful.
|
/linux/tools/bpf/bpftool/Documentation/ |
H A D | bpftool-map.rst | 47 | *MAP* := { **id** *MAP_ID* | **pinned** *FILE* | **name** *MAP_NAME* } 49 | *PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* | **name** *PROG_NAME* } 166 Show file names of pinned maps. 216 | **# bpftool map del pinned /sys/fs/bpf/map key 13 00 07 00** 224 processing. Note that the prog array map MUST be pinned into the BPF virtual 238 pinned /sys/fs/bpf/foo/xdp 242 pinned /sys/fs/bpf/foo/process 246 pinned /sys/fs/bpf/foo/debug 258 | **# bpftool map dump pinned /sys/fs/bpf/bar** 265 | **# bpftool map update pinned /sys/fs/bpf/bar key 0 0 0 0 value pinned /sys/fs/bpf/foo/debug** [all …]
|
/linux/include/trace/events/ |
H A D | xen.h | 287 TP_PROTO(struct mm_struct *mm, unsigned long pfn, unsigned level, bool pinned), 288 TP_ARGS(mm, pfn, level, pinned), 293 __field(bool, pinned) 298 __entry->pinned = pinned), 301 __entry->pinned ? "" : "un") 305 TP_PROTO(unsigned long pfn, unsigned level, bool pinned), 306 TP_ARGS(pfn, level, pinned), 310 __field(bool, pinned) 314 __entry->pinned = pinned), 317 __entry->pinned ? "" : "un")
|
/linux/kernel/events/ |
H A D | hw_breakpoint.c | 54 /* Number of pinned CPU breakpoints in a CPU. */ 56 /* Histogram of pinned task breakpoints in a CPU. */ 67 /* Number of pinned CPU breakpoints globally. */ 69 /* Number of pinned CPU-independent task breakpoints. */ 300 * Return the maximum number of pinned breakpoints a task has in this CPU. 366 * Returns the max pinned breakpoint slots in a given 418 * Update the pinned CPU slots, in per-CPU bp_cpuinfo and in the in toggle_bp_slot() 439 * Update the pinned task slots, in per-CPU bp_cpuinfo and in the global in toggle_bp_slot() 485 /* Add this first CPU-pinned task breakpoint. */ in toggle_bp_slot() 488 /* Rebalance global task pinned histogram. */ in toggle_bp_slot() [all …]
|
/linux/drivers/iommu/iommufd/ |
H A D | iova_bitmap.c | 21 * subset of said IOVA space that is pinned by its parent structure (struct 44 /* page offset of the first user page pinned */ 47 /* number of pages pinned */ 50 /* pinned pages representing the bitmap data */ 63 * The bitmap object uses one base page to store all the pinned pages 66 * 2M of bitmap data is pinned at a time. If the iova_bitmap page size is 184 * Bitmap address to be pinned is calculated via pointer arithmetic in iova_bitmap_get() 206 * offset of the page where pinned pages bit 0 is located. in iova_bitmap_get() 301 * the currently pinned bitmap pages. 328 * pinned data can cover. Afterwards, that is capped to in iova_bitmap_mapped_length() [all …]
|
/linux/arch/powerpc/platforms/8xx/ |
H A D | Kconfig | 170 bool "Pinned Kernel TLBs" 174 table 4 TLBs can be pinned. 183 bool "Pinned TLB for DATA" 190 bool "Pinned TLB for IMMR" 199 bool "Pinned TLB for TEXT"
|
/linux/drivers/fpga/ |
H A D | dfl-afu-dma-region.c | 29 * @region: dma memory region to be pinned 39 int ret, pinned; in afu_dma_pin_pages() local 51 pinned = pin_user_pages_fast(region->user_addr, npages, FOLL_WRITE, in afu_dma_pin_pages() 53 if (pinned < 0) { in afu_dma_pin_pages() 54 ret = pinned; in afu_dma_pin_pages() 56 } else if (pinned != npages) { in afu_dma_pin_pages() 61 dev_dbg(dev, "%d pages pinned\n", pinned); in afu_dma_pin_pages() 66 unpin_user_pages(region->pages, pinned); in afu_dma_pin_pages()
|
/linux/mm/ |
H A D | gup.c | 42 * We only pin anonymous pages if they are exclusive. Once pinned, we in sanity_check_pinned_pages() 46 * We'd like to verify that our pinned anonymous pages are still mapped in sanity_check_pinned_pages() 167 * so that the page really is pinned. in try_grab_folio() 183 * unpin_user_page() - release a dma-pinned page 186 * Pages that were pinned via pin_user_pages*() must be released via either 199 * unpin_folio() - release a dma-pinned folio 202 * Folios that were pinned via memfd_pin_folios() or other similar routines 212 * folio_add_pin - Try to get an additional pin on a pinned folio 213 * @folio: The folio to be pinned 226 * pinned. in folio_add_pin() [all …]
|
/linux/drivers/gpu/drm/i915/gt/ |
H A D | intel_gt_buffer_pool.c | 107 if (node->pinned) { in pool_retire() 112 node->pinned = false; in pool_retire() 129 if (node->pinned) in intel_gt_buffer_pool_mark_used() 133 /* Hide this pinned object from the shrinker until retired */ in intel_gt_buffer_pool_mark_used() 135 node->pinned = true; in intel_gt_buffer_pool_mark_used() 153 node->pinned = false; in node_create()
|
H A D | intel_context.h | 73 * parent is pinned. in intel_context_to_parent() 99 * intel_context_lock_pinned - Stablises the 'pinned' status of the HW context 102 * Acquire a lock on the pinned status of the HW context, such that the context 113 * intel_context_is_pinned - Reports the 'pinned' status 117 * tables is pinned into memory and the GTT. 119 * Returns: true if the context is currently pinned for use by the GPU. 135 * intel_context_unlock_pinned - Releases the earlier locking of 'pinned' status
|
/linux/drivers/s390/cio/ |
H A D | vfio_ccw_cp.c | 25 /* Array that receives the pinned pages. */ 27 /* Number of pages pinned from @pa_iova. */ 38 /* Pinned PAGEs for the original data. */ 45 * @len: number of pages that should be pinned from @iova 88 * Only unpin if any pages were pinned to begin with, i.e. pa_nr > 0, 121 * Returns number of pages pinned upon success. 133 int pinned = 0, npage = 1; in page_array_pin() local 136 while (pinned < pa->pa_nr) { in page_array_pin() 137 dma_addr_t *first = &pa->pa_iova[pinned]; in page_array_pin() 140 if (pinned + npage < pa->pa_nr && in page_array_pin() [all …]
|
/linux/Documentation/infiniband/ |
H A D | user_verbs.rst | 54 amount of memory pinned in the process's pinned_vm, and checks that 57 Pages that are pinned multiple times are counted each time they are 58 pinned, so the value of pinned_vm may be an overestimate of the 59 number of pages pinned by a process.
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | pinning.c | 65 /* check that pinmap was pinned */ in test_pinning() 70 /* check that nopinmap was *not* pinned */ in test_pinning() 76 /* check that nopinmap2 was *not* pinned */ in test_pinning() 151 /* check that nopinmap was pinned at the custom path */ in test_pinning() 196 /* nopinmap2 should have been pinned and cleaned up again */ in test_pinning() 220 /* check that pinmap was pinned at the custom path */ in test_pinning() 265 /* check that pinmap was pinned at the custom path */ in test_pinning()
|
/linux/drivers/gpu/drm/i915/selftests/ |
H A D | i915_gem_evict.c | 114 /* Fill the GGTT with pinned objects and try to evict one. */ in igt_evict_something() 120 /* Everything is pinned, nothing should happen */ in igt_evict_something() 162 /* Fill the GGTT with pinned objects and then try to pin one more. in igt_overcommit() 201 /* Fill the GGTT with pinned objects and try to evict a range. */ in igt_evict_for_vma() 207 /* Everything is pinned, nothing should happen */ in igt_evict_for_vma() 309 /* Attempt to remove the first *pinned* vma, by removing the (empty) in igt_evict_for_cache_color() 340 /* Fill the GGTT with pinned objects and try to evict everything. */ in igt_evict_vm() 346 /* Everything is pinned, nothing should happen */ in igt_evict_vm() 480 /* Keep every request/ctx pinned until we are full */ in igt_evict_contexts()
|
/linux/drivers/gpu/drm/i915/gem/ |
H A D | i915_gem_userptr.c | 239 int pinned, ret; in i915_gem_object_userptr_submit_init() local 267 pinned = 0; in i915_gem_object_userptr_submit_init() 268 while (pinned < num_pages) { in i915_gem_object_userptr_submit_init() 269 ret = pin_user_pages_fast(obj->userptr.ptr + pinned * PAGE_SIZE, in i915_gem_object_userptr_submit_init() 270 num_pages - pinned, gup_flags, in i915_gem_object_userptr_submit_init() 271 &pvec[pinned]); in i915_gem_object_userptr_submit_init() 275 pinned += ret; in i915_gem_object_userptr_submit_init() 303 unpin_user_pages(pvec, pinned); in i915_gem_object_userptr_submit_init() 452 * restriction is that we do not allow userptr surfaces to be pinned to the
|
/linux/tools/testing/selftests/powerpc/pmu/ebb/ |
H A D | cpu_event_pinned_vs_ebb_test.c | 18 * Tests a pinned cpu event vs an EBB - in that order. The pinned cpu event 26 event->attr.pinned = 1; in setup_cpu_event()
|
H A D | task_event_pinned_vs_ebb_test.c | 18 * Tests a pinned per-task event vs an EBB - in that order. The pinned per-task 26 event->attr.pinned = 1; in setup_child_event()
|