drm_gpusvm_pages_valid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_gpusvm_pages_valid β€” the Kernel API Manual page, bestie edition

okay so this is drm_gpusvm_pages_valid(9) from the Kernel API Manual, and it's literally the vibe check for your GPU SVM range pages ✨ no cap, let's get into it.


πŸŽ€ NAME

drm_gpusvm_pages_valid β€” GPU SVM range pages valid. that's it, that's the whole name, it does exactly what it says on the tin πŸ’–


🌸 SYNOPSIS

bool drm_gpusvm_pages_valid (struct drm_gpusvm *gpusvm , struct
       drm_gpusvm_pages *svm_pages );

it returns a bool, it takes two pointers, and yes bestie the line break in the middle is exactly how the original does it 🫢


✨ ARGUMENTS

  • gpusvm β€” pointer to the GPU SVM structure, the main character of this whole situation πŸ‘‘
  • svm_pages β€” pointer to the GPU SVM pages structure, aka the pages that are getting their vibe checked πŸ”

πŸ’… DESCRIPTION

okay so here's the tea β˜• β€” this function determines if a GPU SVM range's pages are valid.

it's expected to be called holding gpusvm->notifier_lock, and it's supposed to be the last step before committing a GPU binding. so like, it's the final check before you hit send on that binding, yk? πŸ”₯

this is akin to a notifier seqno check in the HMM documentation, but β€” and this is the important part β€” because of wider notifiers (i.e., notifiers which span multiple ranges), this function is required for finer grained checking (i.e., per range) to see if the pages are valid. so yeah, it's giving per-range precision in a multi-range world, and we're obsessed 🌈


⭐ RETURN

True if the GPU SVM range has valid pages, False otherwise. iconic binary behaviour, honestly πŸ’€


πŸ¦‹ SEE ALSO

this list is long, bestie, so buckle up β€” every single one of these is here, no skipping, periodt:

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_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_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)


πŸ’‘ little reminder bestie: hold gpusvm->notifier_lock when you call this, and call it right before committing a GPU binding. that's the whole point, iykyk πŸ™ˆ

and that's a wrap, bestie 🫢✨ this page came from ./drivers/gpu/drm, dated October 2026, and it's drm_gpusvm_pages_valid(9) β€” go forth and validate those pages, you've got this πŸ’œπŸŽ€πŸŒΈ

πŸ“¦ where this page comes from