memblock_re..._mark_noinit(9)
π 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):
- Kernel file
./mm/memblock.c memblock overview(9)__memblock_find_range_bottom_up(9)__memblock_find_range_top_down(9)memblock_find_in_range_node(9)memblock_find_in_range(9)memblock_discard(9)memblock_double_array(9)memblock_merge_regions(9)memblock_insert_region(9)memblock_add_range(9)memblock_add_node(9)memblock_add(9)memblock_validate_numa_coverage(9)memblock_isolate_range(9)memblock_free(9)memblock_phys_free(9)memblock_setclr_flag(9)memblock_mark_hotplug(9)memblock_clear_hotplug(9)memblock_mark_mirror(9)memblock_mark_nomap(9)memblock_clear_nomap(9)memblock_reserved_mark_kern(9)memblock_mark_kho_scratch(9)memblock_clear_kho_scratch(9)__next_mem_range(9)__next_mem_range_rev(9)memblock_set_node(9)memblock_alloc_range_nid(9)memblock_phys_alloc_range(9)memblock_phys_alloc_try_nid(9)memblock_alloc_internal(9)memblock_alloc_exact_nid_raw(9)memblock_alloc_try_nid_raw(9)memblock_alloc_hugetlb(9)memblock_alloc_try_nid(9)__memblock_alloc_or_panic(9)memblock_estimated_nr_free_pages(9)memblock_is_region_memory(9)memblock_is_region_reserved(9)memblock_free_all(9)reserve_mem_find_by_name(9)reserve_mem_release_by_name(9)
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
- 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