Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: NUMA: Process hotpluggable memblocks when !CONFIG_MEMORY_HOTPLUG

Some systems (e.g. Hyper-V guests) have all their memory marked as
hotpluggable in SRAT. acpi_numa_memory_affinity_init(), however,
ignores all such regions when !CONFIG_MEMORY_HOTPLUG and this is
unfortunate as memory affinity (NUMA) information gets lost.

'Hot Pluggable' flag in SRAT only means that "system hardware supports
hot-add and hot-remove of this memory region", it doesn't prevent
memory from being cold-plugged there.

Ignore 'Hot Pluggable' bit instead of skipping the whole memory
affinity information when !CONFIG_MEMORY_HOTPLUG.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Vitaly Kuznetsov and committed by
Rafael J. Wysocki
bcf6f175 2585cf9d

+2 -3
+2 -3
drivers/acpi/numa/srat.c
··· 254 254 } 255 255 if ((ma->flags & ACPI_SRAT_MEM_ENABLED) == 0) 256 256 goto out_err; 257 - hotpluggable = ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE; 258 - if (hotpluggable && !IS_ENABLED(CONFIG_MEMORY_HOTPLUG)) 259 - goto out_err; 257 + hotpluggable = IS_ENABLED(CONFIG_MEMORY_HOTPLUG) && 258 + (ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE); 260 259 261 260 start = ma->base_address; 262 261 end = start + ma->length;