drm_pagemap_...rivate_pages(9)
πΈ drm_pagemap_...rivate_pages(9) πΈ
ok so bestie, welcome to the Kernel API Manual, section 9 β this is the page for drm_pagemap_migrate_map_device_private_pages, and yes the title is literally truncated like that, that's not me being lazy, that's just how the page is named π
β¨ NAME β¨
drm_pagemap_migrate_map_device_private_pages β maps device private migration pages for GPU SVM migration π¦
π SYNOPSIS π
int drm_pagemap_migrate_map_device_private_pages (struct device *dev ,
struct drm_pagemap *local_dpagemap , struct drm_pagemap_addr
*pagemap_addr , unsigned long *migrate_pfn , unsigned long npages , enum
dma_data_direction dir , const struct drm_pagemap_migrate_details
*mdetails );
π ARGUMENTS π
devβ the device that's doing the migrating. main character of the operation tbh.local_dpagemapβ thedrm_pagemapthat's local to the migrating device. iykyk.pagemap_addrβ array where the DMA info for the mapped pages gets stored.migrate_pfnβ array of page frame numbers of system pages or peer pages to map.npagesβ how many system pages or peer pages to map.dirβ direction of the data transfer (e.g.,DMA_BIDIRECTIONAL).mdetailsβ the details governing the migration behaviour. the vibe check for the migration, fr.
π DESCRIPTION π
okay so here's the tea β β this function maps pages of memory for migration usage in GPU SVM.
It literally iterates over each page frame number you hand it in migrate_pfn, maps the corresponding page, and stores the DMA address in the provided dma_addr array. That's it, that's the whole job, and it ate. π₯
π RETURN π
0on success π-EFAULTif an error occurs during mapping π
π«Ά SEE ALSO π«Ά
Kernel file ./drivers/gpu/drm/drm_pagemap.c β and the whole extended fam:
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)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_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 babes π this one lives in ./drivers/gpu/drm, dated October 2026, and it'll answer to the name drm_pagemap_...rivate_pages(9) whenever you call it. slay, go map some pages, ily, bye πβ¨
π¦ 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