Messages in this thread | | | Date | Fri, 19 Mar 2021 11:31:21 +0100 | From | Oscar Salvador <> | Subject | Re: [PATCH v5 1/5] mm,memory_hotplug: Allocate memmap from the added memory range |
| |
On Fri, Mar 19, 2021 at 11:20:19AM +0100, David Hildenbrand wrote: > > +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 <david@redhat.com>
Thanks a lot for the throughout review David, highly appreciated!
-- Oscar Salvador SUSE L3
| |