mm: numa_memblks: Don't skip reserved areas before DRAM
PATCH 1/1 mm: numa_memblks: Don't skip reserved areas before DRAM
memblock_start_of_DRAM() returns the base address of the 1st usable memory region. Reserved memory regions can start before that address.
Instead of skipping the truncated portions of NUMA memory blocks that start before DRAM, add them to 'numa_reserved_meminfo'. Without this patch, reserved areas present in the SRAT before the start of DRAM are not assigned a node ID.
Fixes f7feea289f9a ("mm: numa_memblks: use memblock_{start,end}_of_DRAM() when sanitizing meminfo")
Signed-off-by Kyle Meyer <[email protected]>
--- mm/numa_memblks.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
mm/numa_memblks.c +7 -3
@@ -227,10 +227,14 @@ int __init numa_cleanup_meminfo(struct numa_meminfo *mi)continue ; } -/* make sure all non-reserved blocks are inside the limits */ - bi->start =max (bi->start, low); +/* preserve info for reserved areas before DRAM */ +if (bi->start < low) { +numa_add_memblk_to (bi->nid, bi->start, low, + &numa_reserved_meminfo); + bi->start = low; + } -/* preserve info for non-RAM areas above 'max_pfn': */ +/* preserve info for reserved areas after DRAM */ if (bi->end > high) {numa_add_memblk_to (bi->nid, high, bi->end, &numa_reserved_meminfo);
Signature · 1 line
2.35.3