Thread (63 messages) 63 messages, 3 authors, 2021-03-26

Re: [PATCH v5 1/5] mm,memory_hotplug: Allocate memmap from the added memory range

From: Oscar Salvador <osalvador@suse.de>
Date: 2021-03-19 10:32:09
Also in: lkml

On Fri, Mar 19, 2021 at 11:20:19AM +0100, David Hildenbrand wrote:
quoted
+bool mhp_supports_memmap_on_memory(unsigned long size)
+{
+	unsigned long nr_vmemmap_pages = size / PAGE_SIZE;
+	unsigned long vmemmap_size = nr_vmemmap_pages * sizeof(struct page);
+	unsigned long remaining_size = size - vmemmap_size;
+
+	/*
+	 * Besides having arch support and the feature enabled at runtime, we
+	 * need a few more assumptions to hold true:
+	 *
+	 * a) We span a single memory block: memory onlining/offlinin;g happens
s/offlinin;g/offlining;/
Bleh, terrible :-(
IS_ALIGNED(remaining_size, pageblock_nr_pages << PAGE_SHIFT);
Yaiks

Hopefully Andrew can amend these two nits? 
(another pair of eyes certainly wouldn't hurt :) )
definitely, but those are pricy as you may know :-D
Reviewed-by: David Hildenbrand <redacted>
Thanks a lot for the throughout review David, highly appreciated!
 

-- 
Oscar Salvador
SUSE L3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help