xe_bo_pci_dev_remove_all(9)
π xe_bo_pci_dev_remove_all π
okay so bestie, this is a page from the Kernel API Manual and the function we're obsessing over today is literally called xe_bo_pci_dev_remove_all β say that five times fast, i dare you π«Ά
β¨ NAME β¨
xe_bo_pci_dev_remove_all β the glow-up cleanup crew that handles bos when the pci_device is about to be removed π like it's the bos' last day and someone has to pack up the locker, no cap
πΈ SYNOPSIS πΈ
void xe_bo_pci_dev_remove_all (struct xe_device *xe );
π ARGUMENTS π
xeβ the xe device. that's it. that's the whole argument. main character energy, honestly π
π¦ DESCRIPTION π¦
so here's the tea β β when the pci_device gets removed, we genuinely cannot just dip and leave everything lying around. we have to drop all dma mappings and move the data of exported bos out to system. and bestie, this includes SVM bos and exported dma-buf bos β both of them, no exceptions, periodt π
how do we do it? by evicting all the bos π₯ but the evict placement over in xe_evict_flags is chosen super deliberately, such that all bos except the ones we just mentioned are purged β and thus their memory is released. iconic behavior, truly β¨
as for pinned bos? we're unmapping dma. that's the vibe check for those ones π§
ngl this whole thing is giving "last one out turns off the lights" but for GPU memory π
β SEE ALSO β
- Kernel file
./drivers/gpu/drm/xe/xe_bo_evict.cβ go read it, iykyk π xe_bo_notifier_prepare_all_pinned(9)xe_bo_notifier_unprepare_all_pinned(9)xe_bo_evict_all_user(9)xe_bo_evict_all(9)xe_bo_restore_early(9)xe_bo_restore_late(9)xe_bo_pinned_init(9)
and that's the whole page, bestie π the source lives over in ./drivers/gpu/drm/xe, dated October 2026 β so you know exactly where to find it when you need it again. stay slay, keep your dma mappings tidy, and remember: every bo deserves a proper goodbye ππβ¨
π¦ 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