try_to_migrate(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so bestie, you opened the try_to_migrate(9) page from the Kernel API Manual, and it’s literally about one thing: try to replace all page table mappings with swap entries πŸ’…βœ¨


πŸ“œ SYNOPSIS πŸ“œ

void try_to_migrate (struct folio *folio , enum ttu_flags flags );

🧚 ARGUMENTS 🧚

  • folio β€” the folio you’re replacing page table entries for. That’s the main character of this whole operation 🫢
  • flags β€” the action and flags. That’s it, she’s lowkey concise πŸ’…

🌸 DESCRIPTION 🌸

This function tries to remove all the page table entries which are mapping this folio and replace them with special swap entries. Slay, but carefully πŸ’–

⚠️ lock check, bestie: the caller must hold the folio lock. No cap, don’t fumble that one πŸ˜­πŸ”’

πŸ‘€ SEE ALSO πŸ‘€

The kernel file is ./mm/rmap.c, and the whole squad is: __anon_vma_prepare(9), anon_vma_clone(9), unlink_anon_vmas(9), page_address_in_vma(9), folio_referenced(9), mapping_wrprotect_range(9), pfn_mkclean_range(9), folio_move_anon_rmap(9), __folio_set_anon(9), __page_check_anon_rmap(9), folio_add_anon_rmap_ptes(9), folio_add_anon_rmap_pmd(9), folio_add_new_anon_rmap(9), folio_add_file_rmap_ptes(9), folio_add_file_rmap_pmd(9), folio_add_file_rmap_pud(9), folio_remove_rmap_ptes(9), folio_remove_rmap_pmd(9), folio_remove_rmap_pud(9), try_to_unmap(9), make_device_exclusive(9), __rmap_walk_file(9).

mwah πŸ’‹ this page’s source/version is ./mm and its date is October 2026 β€” that’s the footer, bestie, and we’re so done πŸ«ΆπŸ’–

πŸ“¦ where this page comes from