xe_bo_set_purgeable_state(9)
π xe_bo_set_purgeable_state(9) β like, the Kernel API Manual page, bestie π
okay so real quick β this is a page from the Kernel API Manual, and it's about xe_bo_set_purgeable_state, which sounds intimidating but honestly? It's giving "glorified setter with trust issues" and we're gonna get through it together. π«Ά
β¨ NAME β¨
xe_bo_set_purgeable_state β sets the BO purgeable state, but likeβ¦ with validation. She does not just take your word for it. π
πΈ SYNOPSIS πΈ
void xe_bo_set_purgeable_state (struct xe_bo *bo , enum
xe_madv_purgeable_state new_state );
no return value. void. she simply does the thing and leaves. main character energy fr fr. π
π¦ ARGUMENTS π¦
boβ the Buffer object in question. your little guy. πnew_stateβ the new purgeable state you want to give it. the glow-up you're proposing. β¨
π DESCRIPTION π
So what this does: it sets the purgeable state, and along the way it's got lockdep assertions doing vibe checks and it validates state transitions. No cap. π«Ά
And here's the big one, bestie β once a BO is PURGED, it cannot transition to any other state. That's it. That's the whole door. Locked. Permanently. Not me being dramatic, that's literally the rule. π
Invalid transitions get caught by xe_assert. So if you try something spicy and wrong, the assert will absolutely call you out in front of everyone. π
Oh and β shrinker page accounting is updated automatically. You don't gotta do a thing, it just handles itself. iconic behavior tbh. π
β οΈ lowkey important: PURGED is a one-way trip. don't go planning any transitions after that, because the assert said no. π
π SEE ALSO π
like a whole group chat of related functions, and you should absolutely go say hi to all of them β plus the kernel file itself, ./drivers/gpu/drm/xe/xe_bo.c:
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_ttm_bo_purge(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)
that's the whole page, bestie, you ate that πβ¨ and just so we're keeping it a hundred β this came from ./drivers/gpu/drm/xe, dated October 2026, and the page itself is xe_bo_set_purgeable_state(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