sparse_add_section(9)
π NAME π
okay bestie, welcome to sparse_add_section(9) from the Kernel API Manual β she adds a memory section, or populates one thatβs already there. lowkey iconic. β¨
β¨ SYNOPSIS β¨
int sparse_add_section (int nid , unsigned long start_pfn , unsigned
long nr_pages , struct vmem_altmap *altmap , struct dev_pagemap *pgmap
);
π ARGUMENTS π
nidβ the node to add the section on. like, which node bestie πstart_pfnβ start pfn of the memory range. periodt.nr_pagesβ number of pfns to add in the section.altmapβ alternate pfns to allocate the memmap backing store.pgmapβ alternate compound page geometry for devmap mappings.
π¦ DESCRIPTION π¦
so this one is only intended for hotplug. no cap. π«Ά
note bestie: onlyVMEMMAPsupports sub-section aligned hotplug, and the proper alignment and size are gated bycheck_pfn_span. that part is literally the vibe check. π
π₯ RETURN π₯
0β on success. slay. π-EEXISTβ section has been present. like, itβs already there, bestie. π-ENOMEMβ out of memory. π
π SEE ALSO π
kernel file ./mm/sparse-vmemmap.c β go peek, iykyk. π¦
mwah π β source/version: ./mm, date: October 2026, page: sparse_add_section(9). thatβs the cute little sign-off, bestie πβ¨
π¦ 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