xe_bo_pci_dev_remove_all(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 ⭐


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