numa_add_reserved_memblk(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ”₯

  • 0 on success πŸ’š
  • -errno on failure 😭 (yeah, it hands you back a negative errno, classic)

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./mm/numa_memblks.c, plus the whole friend group:

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