memblock_add_node(9)
π memblock_add_node(9) π
okay so bestie, welcome to the Kernel API Manual β this is memblock_add_node(9), and honestly? she's a baddie. this is the page for the function that literally adds a brand new memblock region inside a NUMA node. no cap.
β¨ NAME β¨
memblock_add_node β add new memblock region within a NUMA node π«Ά
πΈ SYNOPSIS πΈ
int __init_memblock memblock_add_node (phys_addr_t base , phys_addr_t
size , int nid , enum memblock_flags flags );
like, that's the whole signature. __init_memblock, returns an int, takes four args. iconic behavior tbh π
π ARGUMENTS π
baseβ the base address of the new region. where the vibe starts β¨sizeβ the size of the new region. how much room she's taking up πnidβ thenidof the new region. that's her NUMA node, her home base πflagsβ the flags of the new region. her whole personality, basically π
π¦ DESCRIPTION π¦
so what she actually does: she adds a new memblock region, [base, base + size), into the "memory" type. like, the region is half-open β base is in, base + size is out. standard. slay π₯
for the mode details, she says "See memblock_add_range description" β so if you want the deep lore, that's where you go. iykyk π
β RETURN β
0 on success, -errno on failure. no in-between, she's very binary about it π
π SEE ALSO π
okay this list is LONG but every single one of these is on the page so we're listing all of them, periodt:
- 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(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_noinit(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)
ngl that's a whole friend group. read them all, bestie, they're all worth it π
and that's the page!! mwah π this one comes from source ./mm, dated October 2026 β so like, mark your calendars, she's stamped and official. go forth and add your nodes, queen πβ¨π
π¦ 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