STRUCT DRM_PAGEMAP_DEVMEM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

struct drm_pagemap_devmem β€” page struct drm_pagemap_devmem(9) from the Kernel API Manual, hi bestie 🫢 β€” is the structure representing a GPU SVM device memory allocation. That's the whole main-character job: it's the struct for a GPU SVM device memory allocation, periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's the struct, and we keep it exactly as-is because kernel code is not a vibe to freestyle, ngl:

       struct drm_pagemap_devmem {
           struct device *dev;
           struct mm_struct *mm;
           struct completion detached;
           const struct drm_pagemap_devmem_ops *ops;
           struct drm_pagemap *dpagemap;
           size_t size;
           u64 timeslice_expiration;
           struct dma_fence *pre_migrate_fence;
        };

That's the shape of it, bestie ✨ no cap.


🫢 Members 🫢

Members? More like the whole cast of this struct, and every single one gets their moment πŸ’…:

  • dev β€” pointer to the device structure which the device memory allocation belongs to. It's giving "which device owns this" energy.
  • mm β€” pointer to the mm_struct for the address space. Address-space bestie 🧚.
  • detached β€” the completion for when the device memory allocation is detached from the device pages. Lowkey important.
  • ops β€” pointer to the operations structure for GPU SVM device memory. The drm_pagemap_devmem_ops hookup, iykyk.
  • dpagemap β€” the struct drm_pagemap of the pages this allocation belongs to. Literally the pagemap home base.
  • size β€” size of the device memory allocation. Numbers don't lie πŸ’….
  • timeslice_expiration β€” timeslice expiration in jiffies. Tick tock, bestie ⏳.
  • pre_migrate_fence β€” fence to wait for or pipeline behind before migration starts. It may be NULL β€” so don't assume it's always there, fr fr.

πŸ”— SEE ALSO πŸ”—

go read these too, bestie β€” highkey obsessed with this whole kernel friend group, and they ate:


xoxo, your kernel bestie πŸ’– β€” fresh from ./include/drm, dated October 2026, signing off the struct drm_pagemap_devmem(9) page. slay and goodbye ✨

πŸ“¦ where this page comes from