amdgpu_vm_clear_freed(9)
π amdgpu_vm_clear_freed β a Kernel API Manual moment (section 9, bestie)
okay so you're looking at amdgpu_vm_clear_freed(9), and honestly? iconic function name. it's giving "cleanup era." let's get into it π
β¨ NAME β¨
amdgpu_vm_clear_freed β clears freed BOs in the PT. that's it, that's the whole vibe. no cap. π§Ή
πΈ SYNOPSIS πΈ
int amdgpu_vm_clear_freed (struct amdgpu_device *adev , struct amdgpu_vm
*vm , struct dma_fence **fence );
like, three args, returns an int, we love a tidy signature π«Ά
π¦ ARGUMENTS π¦
adevβ anamdgpu_devicepointer, aka the whole GPU situation πvmβ the requested vm, the one you're asking about specificallyfenceβ optional resulting fence. big "optional" energy here: it stays unchanged if there was no work that needed doing, or if an error happened π so don't go reading it expecting a fresh fence, girlies
π₯ DESCRIPTION π₯
Make sure all the freed BOs are cleared in the PT. that's the job, that's the mission, and it will be done π
but listen β the PTs have to be reserved and the mutex must be locked! this is not a drill, this is a hard requirement, do not skip it π
β RETURN β
0 for success. slay. that's the documented return value, periodt π
π SEE ALSO π
so there's a lot of friends in this section and we are NOT leaving a single one out, because every single one of them is linked here:
Kernel file ./drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c β and then, in order:
GPUVM(9), struct amdgpu_prt_cb(9), struct amdgpu_vm_tlb_seq_struct(9), amdgpu_vm_assert_locked(9), amdgpu_vm_is_bo_always_valid(9), amdgpu_vm_bo_evicted(9), amdgpu_vm_bo_needs_update(9), amdgpu_vm_bo_idle(9), amdgpu_vm_bo_reset_state_machine(9), amdgpu_vm_update_shared(9), amdgpu_vm_bo_update_shared(9), amdgpu_vm_update_stats_locked(9), amdgpu_vm_update_stats(9), amdgpu_vm_bo_base_init(9), amdgpu_vm_lock_pd(9), amdgpu_vm_lock_individual(9), amdgpu_vm_move_to_lru_tail(9), amdgpu_vm_generation(9), amdgpu_vm_validate(9), amdgpu_vm_ready(9), amdgpu_vm_check_compute_bug(9), amdgpu_vm_need_pipeline_sync(9), amdgpu_vm_flush(9), amdgpu_vm_bo_find(9), amdgpu_vm_map_gart(9), amdgpu_vm_update_pdes(9), amdgpu_vm_tlb_seq_cb(9), amdgpu_vm_tlb_flush(9), amdgpu_vm_update_range(9), amdgpu_vm_bo_update(9), amdgpu_vm_update_prt_state(9), amdgpu_vm_prt_get(9), amdgpu_vm_prt_put(9), amdgpu_vm_prt_cb(9), amdgpu_vm_add_prt_cb(9), amdgpu_vm_free_mapping(9), amdgpu_vm_prt_fini(9), amdgpu_vm_handle_moved(9), amdgpu_vm_flush_compute_tlb(9), amdgpu_vm_bo_add(9), amdgpu_vm_bo_insert_map(9), amdgpu_vm_bo_map(9), amdgpu_vm_bo_replace_map(9), amdgpu_vm_bo_unmap(9), amdgpu_vm_bo_clear_mappings(9), amdgpu_vm_bo_lookup_mapping(9), amdgpu_vm_bo_trace_cs(9), amdgpu_vm_bo_del(9), amdgpu_vm_evictable(9), amdgpu_vm_bo_invalidate(9), amdgpu_vm_bo_move(9), amdgpu_vm_get_block_size(9), amdgpu_vm_adjust_size(9), amdgpu_vm_wait_idle(9), amdgpu_vm_put_task_info(9), amdgpu_vm_get_task_info_vm(9), amdgpu_vm_get_task_info_pasid(9), amdgpu_vm_set_task_info(9), amdgpu_vm_init(9), amdgpu_vm_make_compute(9), amdgpu_vm_fini(9), amdgpu_vm_manager_init(9), amdgpu_vm_manager_fini(9), amdgpu_vm_ioctl(9), amdgpu_vm_lock_by_pasid(9), amdgpu_vm_handle_fault(9), amdgpu_debugfs_vm_bo_info(9), amdgpu_vm_update_fault_cache(9)
like I said. everyone's invited to the party π
and that's the whole page, bestie β nothing skipped, nothing invented, we keep the facts and bring the flair π
oh and for the sign-off: this one lives under ./drivers/gpu/drm/amd/amdgpu, it's dated October 2026, and it's part of the Kernel API Manual set. mwah π β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms