__drm_pagema...grate_to_ram(9)
π
__drm_pagema...grate_to_ram(9) π
okay so bestie, welcome to the Kernel API Manual, and specifically to this little internal icon, __drm_pagemap_migrate_to_ram. yes the header truncates it, yes it's giving "my name didn't fit in the group chat nickname field," we move.
β¨ NAME β¨
__drm_pagemap_migrate_to_ram β migrate a GPU SVM range to RAM, but make it internal π«Ά
πΈ SYNOPSIS πΈ
int __drm_pagemap_migrate_to_ram (struct vm_area_struct *vas , struct page *page , unsigned long fault_addr , unsigned long size );
like, that's the whole vibe right there, no cap.
π ARGUMENTS π
vasβ pointer to the VM area structure. literally thestruct vm_area_struct, the main character of the address space.pageβ pointer to the page being handled for the fault. the one going through it rn πfault_addrβ the fault address. yes bestie, exactly what it says.sizeβ size of the migration. how much we're moving, periodt.
π¦ DESCRIPTION π¦
so this is an internal function (iykyk, not for you to call directly, it's a backstage-pass situation) and what it does is perform the migration of the specified GPU SVM range to RAM. the way it does that:
- it sets up the migration,
- populates + dma maps RAM PFNs,
- and then invokes the driver-specific operations for migration to RAM.
that's the whole pipeline, slay. π₯
β RETURN β
0 on success, negative error code on failure. so like, zero is the good ending π and anything negative means something went off, check it.
π SEE ALSO π
bestie there are SO many siblings, buckle up π§:
- Kernel file
./drivers/gpu/drm/drm_pagemap.c Overview(9)Migration(9)struct drm_pagemap_zdd(9)drm_pagemap_zdd_alloc(9)drm_pagemap_zdd_get(9)drm_pagemap_zdd_destroy(9)drm_pagemap_zdd_put(9)drm_pagemap_migration_unlock_put_folio(9)drm_pagemap_migration_unlock_put_pages(9)drm_pagemap_get_devmem_page(9)drm_pagemap_migrate_map_device_private_pages(9)struct drm_pagemap_iova_state(9)drm_pagemap_migrate_map_system_pages(9)drm_pagemap_migrate_populate_src_pages(9)drm_pagemap_migrate_unmap_pages(9)struct migrate_range_loc(9)drm_pagemap_cpages(9)drm_pagemap_migrate_to_devmem(9)drm_pagemap_migrate_populate_ram_pfn(9)struct drm_pagemap_dev_hold(9)drm_pagemap_reinit(9)drm_pagemap_init(9)drm_pagemap_put(9)drm_pagemap_page_get_flags(9)drm_pagemap_page_set_flags(9)drm_pagemap_retire_migrated_pages(9)drm_pagemap_skip_retired_pages(9)drm_pagemap_evict_to_ram(9)drm_pagemap_folio_free(9)drm_pagemap_migrate_to_ram(9)drm_pagemap_pagemap_ops_get(9)drm_pagemap_devmem_init(9)drm_pagemap_page_to_dpagemap(9)drm_pagemap_populate_mm(9)
ok that's the whole page, no notes π go read the friends, they ate.
and finally, the cute little sign-off: this one lives in ./drivers/gpu/drm (yes, that's the source/version line bestie), dated October 2026, and the footer is also __drm_pagema...grate_to_ram(9) because the truncation is iconic at this point. bye pookie, happy migrating ππ
π¦ 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