to_drm_gpusvm_range(9)
π to_drm_gpusvm_range(9) π
okay so this is a page from the Kernel API Manual and honestly? it's a tiny little glow-up of a function and i'm obsessed π it lives in the kernel's DRM/gpusvm corner and it's basically the "who's your real parent" moment for an rbtree node. iykyk.
β¨ NAME β¨
to_drm_gpusvm_range β retrieve the container struct for a given rbtree node π¦
like, the node is in the struct bestie, this is how you get back out to the whole thing.
πΈ SYNOPSIS πΈ
struct drm_gpusvm_range * to_drm_gpusvm_range (struct rb_node *node );
π ARGUMENTS π
nodeβ a pointer to the rbtree node embedded within adrm_gpusvm_rangestruct. yes, embedded, as in it's living inside the bigger struct, not off on its own little main character journey π
β RETURN β
A pointer to the containing drm_gpusvm_range structure. slay. that's the whole bit β you hand it the inner node, it hands you back the outer struct π«Ά
ngl it's giving "container_of energy" but we're not gonna put words in the manpage's mouth π
π SEE ALSO π
bestie the reading list is LONG but every single one of these is required viewing, no skipping π₯
- 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)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_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)
okay that's the whole page, short and sweet, icon behaviour only π this cutie came out of ./drivers/gpu/drm and it's dated October 2026, and the name on the birth certificate is to_drm_gpusvm_range(9) β periodt. π§ββοΈβ¨π
π¦ 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