drm_gpusvm_range_destroy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_gpusvm_range_destroy β€” from the Kernel API Manual, bestie

okay so bestie, welcome to drm_gpusvm_range_destroy(9) πŸ’– this is the little page that tells you how a GPU SVM range gets yeeted into the void when nobody's holding onto it anymore. it's short, it's sweet, it's iconic. let's go ✨


🌸 NAME 🌸

drm_gpusvm_range_destroy β€” Destroy GPU SVM range 🫢

literally what it says on the tin: it destroys the GPU SVM range.


πŸŽ€ SYNOPSIS πŸŽ€

void drm_gpusvm_range_destroy (struct kref *refcount );

that's the whole signature, no cap. one argument, returns void, does the thing πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • refcount β€” pointer to the reference counter that's embedded inside the GPU SVM range itself πŸ‘‘ so yeah, the refcount lives in the range, and you're handing us a pointer to it. that's the whole vibe.

✨ DESCRIPTION ✨

so here's the tea πŸ“ this function destroys the specified GPU SVM range when its reference count reaches zero β€” like, that's the trigger, that's the moment, that's the main character energy.

and then there's a fork in the road:

  • if a custom range-free function is provided, it gets invoked to free the range 🧚
  • otherwise, the range is deallocated using kfree πŸ’€

so either your custom free function handles the cleanup and slays, or the kernel just hits it with a plain old kfree. both valid, both fine, just depends on what was set up πŸ’œ

fr fr, the "reaches zero" part matters β€” this is a reference-counted teardown, not a "call it whenever" situation πŸ™ˆ

🌈 SEE ALSO 🌈

okay this is the part where the page just dumps the whole friend group on you 😭 and we do not skip a single one, because every single one of them is linked and we keep every detail. so, in the order the page gave them:

like, that's the whole squad 🫢 go read them, they're all right there, iykyk.


that's the page!! short, useful, and honestly kind of a banger πŸ’… and for the cute sign-off: this one lives under ./drivers/gpu/drm 🌸, it's from October 2026, and it's filed as drm_gpusvm_range_destroy(9) πŸŽ€ go destroy some ranges responsibly, bestie πŸ’–βœ¨

πŸ“¦ where this page comes from