[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210319103120.GB6868@linux>
Date: Fri, 19 Mar 2021 11:31:21 +0100
From: Oscar Salvador <osalvador@...e.de>
To: David Hildenbrand <david@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...nel.org>,
Anshuman Khandual <anshuman.khandual@....com>,
Vlastimil Babka <vbabka@...e.cz>,
Pavel Tatashin <pasha.tatashin@...een.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
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@...hat.com>
Thanks a lot for the throughout review David, highly appreciated!
--
Oscar Salvador
SUSE L3
Powered by blists - more mailing lists