drm_gem_for_...puvm_bo_safe(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_gem_for_each_gpuvm_bo_safe(9) β€” the kernel API manual, bestie edition πŸŽ€

okay so first things first: this is a page from the Kernel API Manual, and the function we're obsessing over today is drm_gem_for_each_gpuvm_bo_safe. Yes, the title up top is literally drm_gem_for_...puvm_bo_safe(9) because kernel manpage headers love to abbreviate, but we know her full name now. πŸ’–


✨ NAME ✨

drm_gem_for_each_gpuvm_bo_safe β€” an iterator that safely walks over a list of &drm_gpuvm_bo. No cap, "safe" is the whole personality here. πŸ¦‹


🌸 SYNOPSIS 🌸

drm_gem_for_each_gpuvm_bo_safe (entry__ , next__ , obj__ );

Three args, all vibing in a row. Let's meet them πŸ‘‡


πŸŽ€ ARGUMENTS πŸŽ€

  • entry__ β€” the drm_gpuvm_bo structure you assign to on every single iteration step. She's the main character of each loop pass. πŸ‘‘
  • next__ β€” stores the next drm_gpuvm_bo so you've always got the next step queued up. Girl is literally holding your place in line. πŸ™ˆ
  • obj__ β€” the drm_gem_object that the drm_gpuvm_bos you're walking are associated with. It's giving "these are my friends, actually." 🫢

πŸ’œ DESCRIPTION πŸ’œ

So here's the tea: this iterator walks over all the drm_gpuvm_bo structures associated with the drm_gem_object. All of them. Every last one. πŸ”₯

And the way it does that? It's implemented with list_for_each_entry_safe β€” which, yeah, is why she's got "safe" right there in the name. That means it is safe against removal of elements. So go ahead and unlink stuff mid-walk, she's not gonna melt down over it. πŸ˜­πŸ’…

fr fr though, "safe" here means safe against removal β€” that's the specific promise. Don't go reading extra superpowers into it. ✨

🌈 SEE ALSO 🌈

Kernel file ./include/drm/drm_gem.h, plus the whole friend group:


and that's the page, bestie πŸ§šπŸ’– she lives in ./include/drm, the source/version stamp on this one is October 2026, and the footer still reads drm_gem_for_...puvm_bo_safe(9) because the header never lets go of her ✨ iconic ✨ abbreviated name. slay, go read the header file, periodt. πŸ“β­

πŸ“¦ where this page comes from