Re: [PATCH v8 2/3] x86: probe memory block size advisement value during mm init

From: Oscar Salvador
Date: Tue Apr 01 2025 - 14:52:10 EST


On Mon, Jan 27, 2025 at 10:34:04AM -0500, Gregory Price wrote:
> Systems with hotplug may provide an advisement value on what the
> memblock size should be. Probe this value when the rest of the
> configuration values are considered.
>
> The new heuristic is as follows
>
> 1) set_memory_block_size_order value if already set (cmdline param)
> 2) minimum block size if memory is less than large block limit
> 3) if no hotplug advice: Max block size if system is bare-metal,
> otherwise use end of memory alignment.
> 4) if hotplug advice: lesser of advice and end of memory alignment.
>
> Convert to cpu_feature_enabled() while at it.[1]
>
> [1] https://lore.kernel.org/all/20241031103401.GBZyNdGQ-ZyXKyzC_z@fat_crate.local/
>
> Suggested-by: Borislav Petkov <bp@xxxxxxxxx>
> Suggested-by: David Hildenbrand <david@xxxxxxxxxx>
> Acked-by: David Hildenbrand <david@xxxxxxxxxx>
> Acked-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
> Acked-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
> Acked-by: Dan Williams <dan.j.williams@xxxxxxxxx>
> Tested-by: Fan Ni <fan.ni@xxxxxxxxxxx>
> Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx>
> Signed-off-by: Gregory Price <gourry@xxxxxxxxxx>

Acked-by: Oscar Salvador <osalvador@xxxxxxx>


--
Oscar Salvador
SUSE Labs