kho_preserve_pages(9)
π kho_preserve_pages(9) β like, the Kernel API Manual entry you actually wanna read π
okay so bestie, welcome to the Kernel API Manual page for kho_preserve_pages. this one's short and sweet and honestly kinda iconic for it β¨
πΈ NAME πΈ
kho_preserve_pages β preserve contiguous pages across kexec π¦
β¨ SYNOPSIS β¨
int kho_preserve_pages (struct page *page , unsigned long nr_pages );
π ARGUMENTS π
pageβ the first page in the list. yeah, the first one, she's the main character here πnr_pagesβ how many pages. the count. the vibe check number π
π₯ DESCRIPTION π₯
so what she does: she preserves a contiguous list of order 0 pages π like, a whole lil lineup of them, all order 0, all together.
β οΈ listen up though β you must restore them using kho_restore_pages to make sure the pages actually come back properly as order 0. no shortcuts, no cap π
β RETURN β
0 on success, error code on failure. that's it, that's the whole personality π
π«Ά SEE ALSO π«Ά
the kernel file in question, aka where the magic lives:
./kernel/liveupdate/kexec_handover.c
and the whole friend group π:
kho_encode_radix_key(9)kho_decode_radix_key(9)kho_radix_add_key(9)kho_radix_del_key(9)kho_radix_init_tree(9)kho_radix_destroy_tree(9)kho_radix_walk_tree(9)kho_restore_folio(9)kho_restore_pages(9)kho_reserve_scratch(9)kho_add_subtree(9)kho_preserve_folio(9)kho_unpreserve_folio(9)kho_unpreserve_pages(9)kho_preserve_vmalloc(9)kho_unpreserve_vmalloc(9)kho_restore_vmalloc(9)kho_alloc_preserve(9)kho_unpreserve_free(9)kho_restore_free(9)is_kho_boot(9)kho_retrieve_subtree(9)
mwah π that's the page! brought to you from ./kernel/liveupdate, dated October 2026 β go read the others too, iykyk π
π¦ 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