get_image_page(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– get_image_page(9) β€” like, the hibernation-image page hookup πŸ’–

okay bestie, buckle up, we're deep in the kernel's power-management brain and this is one of those lil functions from get_image_page(9) (yep, that's the manual page name, we're just vibing with it) ✨

🌸 SYNOPSIS 🌸

void * get_image_page (gfp_t gfp_mask , int safe_needed );

like, that's the whole signature, go off πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • gfp_mask β€” the GFP mask for the allocation, aka the vibe check you pass to the allocator so it knows how you want this page served up πŸ’…
  • safe_needed β€” if you set this, you get pages that were not used before hibernation (this is a restore-only situation, iykyk) 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

so during image restoration, when we're storing the PBE list and the image data, we literally can only use memory pages that don't conflict with the pages that were used before hibernation. no cap, that's the whole constraint πŸ”₯

the "unsafe" pages are the ones with PageNosaveFree set, and we keep track of how many of those we're dealing with by counting them with allocated_unsafe_pages πŸ’€

and every allocated image page gets marked as both PageNosave and PageNosaveFree, so that swsusp_free can come through and release it later. it's giving teamwork, it's giving ✨accountability✨ 🧚


⭐ SEE ALSO ⭐

the kernel file lives at ./kernel/power/snapshot.c, and here's the whole squad of related functions β€” literally the entire group chat, no one's left out πŸ™ˆ:


mwah πŸ’‹ that's the page, bestie. it shipped from the ./kernel/power directory and the date on it is October 2026 β€” so like, she's got a timestamp and she's proud of it. periodt. πŸŒˆπŸ’œ

πŸ“¦ where this page comes from