mark_nosave_pages(9)
πΈ mark_nosave_pages(9) πΈ
okay so bestie, welcome to the Kernel API Manual β yes we're doing kernel internals today, and yes you're gonna slay it π this one lives in the hibernate/suspend girlie corner of the kernel and it's honestly so iconic once you get it.
β¨ NAME β¨
mark_nosave_pages β literally marks the pages that should not be saved π«πΎ no cap, that's the whole vibe.
π¦ SYNOPSIS π¦
void mark_nosave_pages (struct memory_bitmap *bm );
that's it. one function, one argument, zero drama β¨
π ARGUMENTS π
bmβ the memory bitmap π it's astruct memory_bitmap, and it's the thing getting its bits set. main character energy fr.
π DESCRIPTION π
okay so here's the tea π: this function sets the bits in bm that correspond to the page frames whose contents should not be saved. that's the whole job. it doesn't save anything, it doesn't free anything β it just goes through and flips the bits for the pages that are getting left behind when the snapshot happens π
think of it as the "do not pack this" sticker on the boxes π¦β¨ except the boxes are page frames and the stickers are bits. iykyk.
π SEE ALSO π
bestie there are so many friends in this family, buckle up π«Ά all of these hang out in the kernel file ./kernel/power/snapshot.c:
get_image_page(9)free_image_page(9)alloc_rtree_node(9)free_mem_extents(9)create_mem_extents(9)memory_bm_next_pfn(9)create_basic_memory_bitmaps(9)free_basic_memory_bitmaps(9)snapshot_additional_pages(9)count_free_highmem_pages(9)count_highmem_pages(9)count_data_pages(9)swsusp_free(9)preallocate_image_pages(9)free_unnecessary_pages(9)minimum_image_size(9)hibernate_preallocate_memory(9)pack_pfns(9)snapshot_read_next(9)unpack_orig_pfns(9)count_highmem_image_pages(9)prepare_highmem_image(9)copy_last_highmem_page(9)prepare_image(9)snapshot_write_next(9)restore_highmem(9)
go read them if you're nosy (respectfully) π they're all part of the same hibernate-and-snapshot friend group.
that's the whole page, bestie β you ate that π
β¨ this cutie is brought to you by ./kernel/power, dated October 2026, and it's filed under mark_nosave_pages(9) in the Kernel API Manual ππ¦ see you in the next one, mwah π«Άπ
π¦ 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