[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YFNBrzNFpyKLORfe@localhost.localdomain>
Date: Thu, 18 Mar 2021 13:03:59 +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 v4 1/5] mm,memory_hotplug: Allocate memmap from the added
memory range
On Thu, Mar 18, 2021 at 12:24:16PM +0100, David Hildenbrand wrote:
> I don't follow. 2MB == 2MB. And if there would be difference then we would
> be in the problem I brought up: vmemmap code allocating too much via the
> altmap, which can be very bad because might be populating more vmemmap than
> we actually need.
Yes, I meant to say nr_vmemmap_pages won't match, or IOW, won't have the
same meaning.
The end result is the same.
> vmemmap_size = 512 * 4KiB = 2 MiB.
>
> That calculation wasn't very useful (/ PAGE_SIZE * PAGE_SIZE)?
Yeah, somewhat redundant.
>
> > unsigned long remaining_size = size - vmemmap_size;
>
> And here we could get something like
>
> remaining_size = 2 GiB - 2 MiB
Yes, vmemmap_size would need to scale with nr_sections to be relative to
size.
Just wanted to bring it up, because somene might wonder
"ok, why do we have altmap->nr_pfns = X, and here nr_vmemmap_pages
is Y"
It was an effort to make it consistent, although I see it would bring
more confusion other than anything, so disregard.
--
Oscar Salvador
SUSE L3
Powered by blists - more mailing lists