try_to_migrate(9)
π 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
- 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