drm_pagemap...te_to_devmem(9)
β¨ NAME β¨
okay bestie, this is the drm_pagemap_migrate_to_devmem(9) page from the Kernel API Manual β and it's literally about migrating a struct mm_struct range to device memory π
π¦ SYNOPSIS π¦
the whole call looks like this:
int drm_pagemap_migrate_to_devmem (struct drm_pagemap_devmem
*devmem_allocation , struct mm_struct *mm , unsigned long start ,
unsigned long end , const struct drm_pagemap_migrate_details *mdetails
);
π ARGUMENTS π
devmem_allocationβ the device memory allocation you're migrating to π The caller should hold a reference to the device memory allocation, and that reference is consumed by this function even if it returns with an error. yes, consumed even on error β no take-backs πmmβ pointer to thestruct mm_struct.startβ start of the virtual address range to migrate.endβ end of the virtual address range to migrate.mdetailsβ the details that govern the migration.
πΈ DESCRIPTION πΈ
This function migrates the specified virtual address range to device memory. It does the necessary setup and invokes the driver-specific operations for migration to device memory. Expected to be called while holding the mmap lock in at least read mode π
π NOTE π
The timeslice_ms parameter can typically be used to force data to remain in pagemap pages long enough for a GPU to perform a task and to prevent a migration livelock. One alternative would be for the GPU driver to block in a mmu_notifier for the specified amount of time, but adding the functionality to the pagemap is likely nicer to the system as a whole β¨
π₯ RETURN π₯
0 on success, negative error code on failure π«Ά
π SEE ALSO π
Kernel file: ./drivers/gpu/drm/drm_pagemap.c β and the whole reference squad is:
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_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_migrate_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)
and that's the whole page, bestie π this one came from ./drivers/gpu/drm, dated October 2026 β mwah π
π¦ 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