* [PATCH] mm: numa_memblks: Don't skip reserved areas before DRAM
@ 2024-10-22 18:41 Kyle Meyer
0 siblings, 0 replies; only message in thread
From: Kyle Meyer @ 2024-10-22 18:41 UTC (permalink / raw)
To: akpm, rppt, david, dan.j.williams, Jonathan.Cameron, linux-mm,
linux-kernel
Cc: Kyle Meyer
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 <kyle.meyer@hpe.com>
---
mm/numa_memblks.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/mm/numa_memblks.c b/mm/numa_memblks.c
index be52b93a9c58..384397d39d6d 100644
--- a/mm/numa_memblks.c
+++ b/mm/numa_memblks.c
@@ -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);
--
2.35.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-10-22 18:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-22 18:41 [PATCH] mm: numa_memblks: Don't skip reserved areas before DRAM Kyle Meyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®