STRUCT DRM_PAGEMAP_DEVMEM(9)
π 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 thedevicestructure which the device memory allocation belongs to. It's giving "which device owns this" energy.mmβ pointer to themm_structfor 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. Thedrm_pagemap_devmem_opshookup, iykyk.dpagemapβ thestruct drm_pagemapof 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 beNULLβ 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:
- Kernel file
./include/drm/drm_pagemap.henum drm_interconnect_protocol(9)struct drm_pagemap_addr(9)drm_pagemap_addr_encode(9)struct drm_pagemap_ops(9)struct drm_pagemap(9)struct drm_pagemap_devmem_ops(9)drm_pagemap_get(9)drm_pagemap_get_unless_zero(9)struct drm_pagemap_migrate_details(9)drm_pagemap_page_zone_device_data(9)
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
- 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