Re: [PATCH v2] x86/mm: use max memory block size on bare metal

From: Daniel Jordan
Date: Wed Jun 10 2020 - 13:17:14 EST


On Wed, Jun 10, 2020 at 09:30:00AM +0200, David Hildenbrand wrote:
> On 10.06.20 09:20, David Hildenbrand wrote:
> > On 10.06.20 00:54, Daniel Jordan wrote:
> >> @@ -1390,6 +1391,15 @@ static unsigned long probe_memory_block_size(void)
> >> goto done;
> >> }
> >>
> >> + /*
> >> + * Use max block size to minimize overhead on bare metal, where
> >> + * alignment for memory hotplug isn't a concern.
> >> + */
> >> + if (hypervisor_is_type(X86_HYPER_NATIVE)) {
> >> + bz = MAX_BLOCK_SIZE;
> >> + goto done;
> >> + }
> >
> > I'd assume that bioses on physical machines >= 64GB will not align
> > bigger (>= 2GB) DIMMs to something < 2GB.
> >
> > Acked-by: David Hildenbrand <david@xxxxxxxxxx>

Thanks!

> FTWT, setup_arch() does the init_hypervisor_platform() call. I assume
> that should be early enough.

I checked all the places where x86 uses memory_block_size_bytes(), it looks ok.