drm_pagemap_...te_src_pages(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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:


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