memory_block_add_nid_early(9)
okay so bestie, welcome to the Kernel API Manual β todayβs main character is literally memory_block_add_nid_early(9) and she has lore π
β¨
πΈ NAME πΈ
memory_block_add_nid_early β Indicate that early system RAM falling into this memory block device (partially) belongs to the given node. periodt.
β¨ SYNOPSIS β¨
void memory_block_add_nid_early (struct memory_block *mem , int nid );
π«Ά ARGUMENTS π«Ά
memβ The memory block device. thatβs the vibe.nidβ The node id. yep, that one.
π DESCRIPTION π
Okay so picture this: you gotta indicate that early system RAM falling into this memory block (partially) belongs to the given node. thatβs the whole assignment, no cap π
And not only that β this will also properly set/adjust mem->zone based on the zone ranges of the given node. iconic behavior, ngl β¨
Memory hotplug handles this on memory block creation, where we can only have a single nid span a memory block. thatβs the rule, fr fr π
π₯ SEE ALSO π₯
Kernel file ./drivers/base/memory.c β go read it, iykyk β plus these besties:
memory_block_advise_max_size(9)memory_block_advised_max_size(9)walk_memory_blocks(9)for_each_memory_block(9)memory_group_register_static(9)memory_group_register_dynamic(9)memory_group_unregister(9)
mwah π this lil page comes from ./drivers/base, is dated October 2026, and itβs literally memory_block_add_nid_early(9) β slay and goodbye π¦π
π¦ 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