drm_gpuvm_bo_is_zombie(9)
π§ NAME π§
drm_gpuvm_bo_is_zombie β check whether this vm_bo is scheduled for cleanup
okay so bestie, welcome to drm_gpuvm_bo_is_zombie(9) from the Kernel API Manual. This is the vibe check for a vm_bo: is it a zombie waiting for cleanup? π
β¨ SYNOPSIS β¨
bool drm_gpuvm_bo_is_zombie (struct drm_gpuvm_bo *vm_bo );
π ARGUMENTS π
vm_boβ thedrm_gpuvm_bo. That's the one getting the zombie check. π§
π DESCRIPTION π
When a vm_bo is scheduled for cleanup using the bo_defer list, it is not immediately removed from the evict and extobj lists. So if you're iterating those lists, skip any entries that are being destroyed. No cap, just skip 'em. π
Checking the refcount without incrementing it is okay as long as the lock protecting the evict/extobj list is held for as long as you are using the vm_bo, because even if the refcount hits zero while you are using it, freeing the vm_bo requires taking the list's lock. The lock is literally the safety rail, bestie. πβ¨
Zombie entries can be observed on the evict and extobj lists regardless of whether DRM_GPUVM_RESV_PROTECTED is used, but they remain on the lists for a longer time when the resv lock is used because we can't take the resv lock during run_job in immediate mode, meaning that they need to remain on the lists until drm_gpuvm_bo_deferred_cleanup is called. So yeah, longer zombie era with the resv lock. π§ββοΈβ³
π SEE ALSO π
like, go read these too π
Kernel file ./drivers/gpu/drm/drm_gpuvm.c Overview(9), Split and Merge(9), Madvise Logic - Splitting and Traversal(9), Locking(9), Examples(9), get_next_vm_bo_from_list(9), for_each_vm_bo_in_list(9), restore_vm_bo_list(9), drm_gpuvm_bo_list_add(9), drm_gpuvm_bo_list_del_init(9), drm_gpuvm_bo_list_del(9), drm_gpuvm_range_valid(9), drm_gpuvm_resv_object_alloc(9), drm_gpuvm_init(9), drm_gpuvm_put(9), drm_gpuvm_prepare_vm(9), drm_gpuvm_prepare_objects(9), drm_gpuvm_prepare_range(9), drm_gpuvm_exec_lock(9), drm_gpuvm_exec_lock_array(9), drm_gpuvm_exec_lock_range(9), drm_gpuvm_validate(9), drm_gpuvm_resv_add_fence(9), drm_gpuvm_bo_create(9), drm_gpuvm_bo_put(9), drm_gpuvm_bo_put_deferred(9), drm_gpuvm_bo_deferred_cleanup(9), drm_gpuvm_bo_find(9), drm_gpuvm_bo_obtain_locked(9), drm_gpuvm_bo_obtain_prealloc(9), drm_gpuvm_bo_extobj_add(9), drm_gpuvm_bo_evict(9), drm_gpuva_insert(9), drm_gpuva_remove(9), drm_gpuva_link(9), drm_gpuva_unlink(9), drm_gpuva_unlink_defer(9), drm_gpuva_find_first(9), drm_gpuva_find(9), drm_gpuvm_interval_empty(9), drm_gpuva_map(9), drm_gpuva_remap(9), drm_gpuva_unmap(9), drm_gpuvm_sm_map(9), drm_gpuvm_sm_unmap(9), drm_gpuvm_sm_map_exec_lock(9), drm_gpuvm_sm_unmap_exec_lock(9), drm_gpuvm_sm_map_ops_create(9), drm_gpuvm_madvise_ops_create(9), drm_gpuvm_sm_unmap_ops_create(9), drm_gpuvm_prefetch_ops_create(9), drm_gpuvm_bo_unmap_ops_create(9), drm_gpuva_ops_free(9)
okay that's the whole page! source/version: ./drivers/gpu/drm Β· date: October 2026 Β· page: drm_gpuvm_bo_is_zombie(9) β 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