memory_block_add_nid_early(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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:


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