xe_ttm_bo_purge(9)
π xe_ttm_bo_purge(9) π
okay so bestie, welcome to the Kernel API Manual β yes we're reading kernel docs for fun now, this is who we are π
β¨ NAME β¨
xe_ttm_bo_purge β Purge buffer object backing store π§Ή
πΈ SYNOPSIS πΈ
int xe_ttm_bo_purge (struct ttm_buffer_object *ttm_bo , struct
ttm_operation_ctx *ctx );
π¦ ARGUMENTS π¦
ttm_boβ The TTM buffer object to purge. this is the one we're cleaning out, bestie π«§ctxβ The TTM operation context. it's giving "the vibe check parameters" β¨
π DESCRIPTION π
okay so here's the tea β β this function purges the backing store of a BO that's been marked as DONTNEED, and then it triggers a rebind to invalidate stale GPU mappings. literally spring cleaning for your buffer object, no cap π§Ό
For fault-mode VMs, this zaps the PTEs. gone. deleted. π
The next GPU access will trigger a page fault and perform a NULL rebind β and that means scratch pages or clear PTEs based on VM config, iykyk. so it's not broken, it's just the design, periodt π
π RETURN π
0on success π- negative error code on failure π
π SEE ALSO π
the whole squad, fr fr β Kernel file ./drivers/gpu/drm/xe/xe_bo.c plus:
xe_bo_has_single_placement(9)xe_bo_is_stolen_devmem(9)xe_bo_is_vm_bound(9)xe_bo_pin_account(9)xe_bo_unpin_account(9)xe_bo_is_visible_vram(9)xe_bo_move_notify(9)xe_bo_set_purgeable_shrinker(9)xe_bo_set_purgeable_state(9)xe_bo_shrink(9)xe_bo_notifier_prepare_pinned(9)xe_bo_notifier_unprepare_pinned(9)xe_bo_evict_pinned(9)xe_bo_restore_pinned(9)xe_bo_read(9)xe_bo_alloc(9)xe_bo_free(9)xe_bo_init_locked(9)xe_bo_create_locked(9)xe_bo_create_user(9)xe_bo_create_pin_range_novm(9)xe_bo_create_pin_map_at_novm(9)xe_bo_create_pin_map(9)xe_bo_create_pin_map_novm(9)xe_managed_bo_reinit_in_vram(9)xe_bo_pin_external(9)xe_bo_pin(9)xe_bo_unpin_external(9)xe_bo_validate(9)xe_bo_decompress(9)xe_bo_lock(9)xe_bo_unlock(9)xe_bo_can_migrate(9)xe_bo_migrate(9)xe_bo_evict(9)xe_bo_needs_ccs_pages(9)__xe_bo_release_dummy(9)xe_bo_put_commit(9)xe_bo_dev_init(9)xe_bo_dev_fini(9)xe_bo_dumb_create(9)
and that's the whole page, bestie! π
this lil masterpiece lives in ./drivers/gpu/drm/xe and it's dated October 2026 β so yeah, we're reading from the future, main character energy fr π
β¨π«Ά
π¦ 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