setup_numa_memblock(9)
โจ 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 ofMEM_SIZEthat lives in that node, measured in basis point units (that's one hundredth of 1%, or1/10000, iykyk). for example, if node 0 should hold1/8ofMEM_SIZE, thennode_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
- 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