xe_bo_willneed_put_locked(9)
π xe_bo_willneed_put_locked(9) π
okay so bestie, we're in the Kernel API Manual today and this is literally the page for xe_bo_willneed_put_locked β yes the whole name, say it with your chest π«Ά
β¨ NAME β¨
xe_bo_willneed_put_locked β the function that releases a WILLNEED holder on a BO. that's it. that's the vibe. π
π¦ SYNOPSIS π¦
void xe_bo_willneed_put_locked (struct xe_bo *bo );
no cap, that's the whole signature, keep it exactly like that pls π
π ARGUMENTS π
boβ the buffer object in question. the main character of this whole function ngl π
πΈ DESCRIPTION πΈ
so here's the tea β β this function decrements willneed_count, and on a 1->0 transition, it marks the BO DONTNEED... but ONLY if the BO still has VMAs (which implies all the active VMAs are already DONTNEED). conditional queen π
and if the last VMA is the one being removed? then it preserves the current BO state, so it matches the previous VMA-walk semantics. iykyk π§
PURGED is terminal and the BO state is never modified. like, ever. that's a hard no. π
β οΈ big one bestie: the caller must hold the BO's dma-resv lock. do not skip this. this is not a drill. π₯
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/xe/xe_bo.henumβ that's right, a whole enum, go look at it π xe_madv_purgeable_state(9)xe_bo_is_purged(9)xe_bo_madv_is_dontneed(9)xe_bo_willneed_get_locked(9)xe_bo_vma_count_inc_locked(9)xe_bo_vma_count_dec_locked(9)xe_bo_size(9)xe_bo_has_valid_ccs_bb(9)xe_bo_put_deferred(9)xe_bo_put_async(9)xe_bo_sg_is_contiguous(9)struct xe_bo_shrink_flags(9)xe_bo_is_mem_type(9)
and that's the page!! π«Ά this came from the source at ./drivers/gpu/drm/xe, dated October 2026, and the header/footer kept whispering xe_bo_willneed_put_locked(9) at me the whole time so like. here it is. slay. βππ
π¦ 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