numa_add_reserved_memblk(9)
π numa_add_reserved_memblk(9) π
okay so bestie, welcome to the Kernel API Manual β this one's a kernel function called numa_add_reserved_memblk, and honestly? it's giving "small function, big job." let's get into it π«Ά
β¨ NAME β¨
numa_add_reserved_memblk β literally just adds one numa_memblk to numa_reserved_meminfo. that's the whole vibe. no cap. π
πΈ SYNOPSIS πΈ
int numa_add_reserved_memblk (int nid , u64 start , u64 end );
π¦ ARGUMENTS π¦
nidβ the NUMA node ID of the new memblk. which node this lil guy belongs to, basically π«startβ the start address of the new memblk. where it begins, fr fr πendβ the end address</end> of the new memblk. where it wraps up π―
π DESCRIPTION π
so what it does: it adds a brand-new memblk to the numa_reserved_meminfo. slay. that's it. β¨
Usage Case: okay this is the fun part. numa_cleanup_meminfo reconciles all the numa_memblk instances against memblock_type information, and it moves any that intersect reserved ranges over to numa_reserved_meminfo. very "sorting your laundry into piles" energy π§Ί
but β and here's the plot twist β when that information is known ahead of time, we use numa_add_reserved_memblk to add the numa_memblk to numa_reserved_meminfo directly. no middleman, no cleanup pass, just straight in. main character energy honestly π
π₯ RETURN π₯
0on success π-errnoon failure π (yeah, it hands you back a negative errno, classic)
π SEE ALSO π
Kernel file ./mm/numa_memblks.c, plus the whole friend group:
numa_reset_distance(9)numa_set_distance(9)numa_remove_memblk_from(9)numa_move_tail_memblk(9)numa_add_memblk(9)numa_cleanup_meminfo(9)numa_fill_memblks(9)
ngl, that's a whole squad and they all live in ./mm/numa_memblks.c β go say hi π«Ά
and that's the page, bestie! sign-off time: this iconic little doc comes from the source tree at ./mm, dated October 2026. take care of her ππΈβ¨
π¦ 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