setup_numa_memblock(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

โœจ setup_numa_memblock(9) โœจ

okay so this is a page from the Kernel API Manual, and bestie, it's a short one but it's lowkey iconic ๐Ÿ’…


๐ŸŽ€ NAME ๐ŸŽ€

setup_numa_memblock โ€” sets up a memory layout with multiple NUMA nodes inside a dummy physical memory that was already allocated beforehand. no cap, that's literally the whole job ๐Ÿซถ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

void setup_numa_memblock (const unsigned int node_fracs[] );

yes, it returns void. it's giving "i do the work and i don't need credit" main character energy โœจ


๐Ÿ’– ARGUMENTS ๐Ÿ’–

  • node_fracs โ€” an array where each slot = the fraction of MEM_SIZE that lives in that node, measured in basis point units (that's one hundredth of 1%, or 1/10000, iykyk). for example, if node 0 should hold 1/8 of MEM_SIZE, then node_fracs[0] = 1250. math ate, honestly ๐Ÿงฎ๐Ÿ”ฅ

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

The nids get set to 0 through NUMA_NODES - 1. that's it. that's the description. short and slay ๐Ÿ’€๐Ÿ‘‘


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

  • Kernel file ./tools/testing/memblock/tests/common.c โ€” go read it, it's right there ๐Ÿ“

ngl this page is tiny but every single detail matters, so don't sleep on the basis points or the NUMA_NODES - 1 โ€” those are the whole vibe check ๐Ÿ’œ

and that's a wrap, bestie! ๐ŸŽ€ this one came from the ./tools/testing/memblock/tests source, dated October 2026 โ€” mwah, kisses, go set up those NUMA nodes ๐Ÿ’…โœจ๐Ÿซถ

๐Ÿ“ฆ where this page comes from