STRUCT DRM_GPUSVM_CTX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct drm_gpusvm_ctx(9) β€” DRM GPU SVM context πŸŽ€

okay bestie, welcome to the Kernel API Manual β€” yes we're in the kernel today, and yes you're gonna slay it. this page is literally all about struct drm_gpusvm_ctx, the DRM GPU SVM context. it's giving "user arguments but make it a struct." let's get into it πŸ¦‹


✨ NAME ✨

struct drm_gpusvm_ctx β€” the DRM GPU SVM context, periodt. no cap, that's the whole vibe πŸ’…


🫢 SYNOPSIS 🫢

here's the struct in all its iconic glory β€” copy it exactly, don't you dare touch a single space:

struct drm_gpusvm_ctx {
    void *device_private_page_owner;
    unsigned long check_pages_threshold;
    unsigned long timeslice_ms;
    unsigned int in_notifier :1;
    unsigned int read_only :1;
    unsigned int devmem_possible :1;
    unsigned int devmem_only :1;
    unsigned int allow_mixed :1;
 };

look at those bitfields. chef's kiss 🧚


🌸 Members 🌸

  • device_private_page_owner β€” the device-private page owner you're rolling with for this operation. it's the main character of this field, fr fr πŸ‘‘
  • check_pages_threshold β€” check CPU pages for present if the chunk is less than or equal to this threshold. and if it's not present? reduce the chunk size. simple as that πŸ’–
  • timeslice_ms β€” the timeslice MS, which is the minimum time a piece of memory remains with either exclusive GPU or CPU access. like a custody arrangement but for memory 😭
  • in_notifier β€” entering from a MMU notifier πŸ¦‹
  • read_only β€” operating on read-only memory. hands off πŸ”₯
  • devmem_possible β€” possible to use device memory ✨
  • devmem_only β€” use only device memory. no mixing, no sharing, we're exclusive πŸ’€
  • allow_mixed β€” allow mixed mappings in get pages. mixing between system and single dpagemap is supported, but mixing between multiple dpagemap is unsupported. so like, know the difference, iykyk πŸ™ˆ

⭐ Description ⭐

this is the context that DRM GPUSVM is operating in β€” basically, it's the user arguments. the whole vibe check of "what are we even doing here." 🌈


πŸ’œ SEE ALSO πŸ’œ

go read these next, bestie, they're all linked:


bestie reminder: this page lives in ./include/drm and it's dated October 2026 β€” yes, the future. we stay ahead πŸ’…

okay that's the whole page, you ate that πŸ“ mwah, go read the range and notifier pages next, ily! πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from