drm_gpusvm_free_pages(9)
π drm_gpusvm_free_pages(9) β from the Kernel API Manual, bestie π
okay so bestie, this is a page from the Kernel API Manual, and it's about a function called drm_gpusvm_free_pages. yes the name is a mouthful, no we are not renaming it, it's iconic and it stays. let's get into it β¨
πΈ NAME πΈ
drm_gpusvm_free_pages β literally frees the dma-mapping that's chillin' on a GPU SVM pages struct π«Ά
β¨ SYNOPSIS β¨
void drm_gpusvm_free_pages (struct drm_gpusvm *gpusvm , struct
drm_gpusvm_pages *svm_pages , unsigned long npages );
that's the whole vibe. returns nothing (void), takes three things, done. π
π ARGUMENTS π
gpusvmβ a pointer to the GPU SVM structure. like, the main character of the whole operation πsvm_pagesβ a pointer to the GPU SVM pages structure. this is the one that's actually getting freed, no cap π¦npagesβ the number of mapped pages. gotta know how many, fr fr π’
π DESCRIPTION π
so what does it do?? it unmaps and frees the dma address array that's associated with a GPU SVM pages struct. that's it, that's the whole thing. clean, simple, slay. β¨ποΈ
π₯ SEE ALSO π₯
bestie there is a LOT here, buckle up, we're going down the whole list π:
- Kernel file
./drivers/gpu/drm/drm_gpusvm.c Overview(9)Locking(9)Partial Unmapping of Ranges(9)Examples(9)npages_in_range(9)drm_gpusvm_notifier_find(9)drm_gpusvm_range_find(9)drm_gpusvm_notifier_invalidate(9)drm_gpusvm_init(9)to_drm_gpusvm_notifier(9)drm_gpusvm_notifier_insert(9)drm_gpusvm_notifier_remove(9)drm_gpusvm_fini(9)drm_gpusvm_notifier_alloc(9)drm_gpusvm_notifier_free(9)to_drm_gpusvm_range(9)drm_gpusvm_range_insert(9)__drm_gpusvm_range_remove(9)drm_gpusvm_range_alloc(9)drm_gpusvm_hmm_pfn_to_order(9)drm_gpusvm_check_pages(9)drm_gpusvm_scan_mm(9)drm_gpusvm_range_chunk_size(9)drm_gpusvm_driver_lock_held(9)drm_gpusvm_find_vma_start(9)drm_gpusvm_range_find_or_insert(9)__drm_gpusvm_unmap_pages(9)__drm_gpusvm_free_pages(9)drm_gpusvm_range_remove(9)drm_gpusvm_range_get(9)drm_gpusvm_range_destroy(9)drm_gpusvm_range_put(9)drm_gpusvm_pages_valid(9)drm_gpusvm_pages_valid_unlocked(9)drm_gpusvm_get_pages(9)drm_gpusvm_unmap_pages(9)drm_gpusvm_range_evict(9)drm_gpusvm_has_mapping(9)drm_gpusvm_range_set_unmapped(9)
like I said. a whole friend group. go read them, iykyk ππ«Ά
and that's the page!! this one lives in ./drivers/gpu/drm, dated October 2026, and it's drm_gpusvm_free_pages(9) obviously π mwah, go free those pages, ily, bye!! π§ββοΈπ
π¦ 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