memblock_re..._mark_noinit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… memblock_re..._mark_noinit(9) β€” from the Kernel API Manual (yes bestie, that manual)

okay so. this one is memblock_reserved_mark_noinit, and no, the title being all truncated to memblock_re..._mark_noinit isn't a you problem β€” that's just how the page got named. iconic behavior honestly. it lives in the Kernel API Manual, section 9, and it's about tagging a chunk of reserved memory with the MEMBLOCK_RSRV_NOINIT flag so the kernel can skip some boring init work later. very main character, very "i'm too busy for your struct pages."


✨ NAME ✨

memblock_reserved_mark_noinit β€” Mark a reserved memory region with flag MEMBLOCK_RSRV_NOINIT πŸŽ€


🌸 SYNOPSIS 🌸

int __init_memblock memblock_reserved_mark_noinit (phys_addr_t base ,
phys_addr_t size );

like, look at her. two args. returns an int. __init_memblock because she moves in memblock circles, you know how it is. πŸ¦‹


πŸ’– ARGUMENTS πŸ’–

  • base β€” the base phys addr of the region. that's the physical address where your little region starts, bestie. not virtual, physical. don't get it twisted πŸ’€
  • size β€” the size of the region. how big. the amount. the vibe check in bytes. ✨

πŸ‘‘ DESCRIPTION πŸ‘‘

The struct pages for the reserved regions marked MEMBLOCK_RSRV_NOINIT will not be fully initialized, and that is literally the whole point β€” it's so the caller can optimize their own initialization. you're telling the kernel "bestie leave these alone, i got it." 🫢

When CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled, setting this flag completely bypasses the initialization of struct pages for such region. not "partially." not "kinda." completely. like it's not even invited to the party. πŸŽ€

When CONFIG_DEFERRED_STRUCT_PAGE_INIT is disabled, struct pages in this region will be initialized with default values but won't be marked as reserved. important distinction, no cap. the init still happens (default values, nothing fancy) but the reserved marking does not. πŸ™ˆ

fr fr, read the two CONFIG_DEFERRED_STRUCT_PAGE_INIT paragraphs twice. they do genuinely different things depending on the config, and mixing them up is giving "i skimmed the docs" energy. πŸ’€

⭐ RETURN ⭐

0 on success, -errno on failure. classic. πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, in the order the page gave them (i'm not rearranging, that's rude):


and that's the page!! πŸŽ€ this little beauty comes from ./mm and is dated October 2026 β€” so yeah, mark your calendar, she's from the future (or at least from a future-ish manual stamp, iykyk). go mark some noinit regions, bestie, and remember: 0 on success, -errno on failure. periodt. πŸ’œβœ¨

πŸ“¦ where this page comes from