drm_pagemap_...te_src_pages(9)
πΈ NAME πΈ
drm_pagemap_migrate_populate_src_pages β Populate the source page array. That's the assignment, bestie, no cap.
This is the Kernel API Manual page for drm_pagemap_migrate_populate_src_pages(9) β the header squeezes it down to drm_pagemap_...te_src_pages(9), which is iconic truncation behavior tbh π
.
β¨ SYNOPSIS β¨
void drm_pagemap_migrate_populate_src_pages (struct page **pages ,
unsigned long *src_mpfn , unsigned long *dst_mpfn , unsigned long npages
);
It returns void, so there's no return value to catch. Just vibes, no little gift coming back. π«Ά
π ARGUMENTS π
pagesβ Array of source pages to populate. This is the array that gets filled up, bestie.src_mpfnβ Source array of migrate PFNs.dst_mpfnβ Destination array of migrate PFNs.npagesβ Number of pages in the arrays. Like, the count of entries across the arrays.
π DESCRIPTION π
The job here is to fill pages with the device pages that the copy callback is gonna read from. That's the main character task. β¨
Usually, entries only get populated at the head of each source folio β the copy callback derives the rest of the folio from the order recorded in the matching drm_pagemap_addr. That trick stops working when drm_pagemap_migrate_populate_ram_pfn had to demote a higher-order source folio down to order-0 destination folios. In that case the drm_pagemap_addr entries are per-page, and the copy callback needs a source page for each one. So for those ranges, populate every single entry. Periodt.
Also note: the source folio itself isn't split until later, by migrate_vma_pages / migrate_device_pages. So you can't use its order to detect the demotion β you have to inspect the destination instead. That's the plot twist. π
π SEE ALSO π
Go bless your brain with these related icons, bestie:
- Kernel file
./drivers/gpu/drm/drm_pagemap.cOverview(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_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)
mwah π β footer deets: source/version is ./drivers/gpu/drm, date is October 2026, and the manual name down there is drm_pagemap_...te_src_pages(9). That's the whole page, bestie β go populate those source pages and slay. π«Ά
π¦ 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