linux/arch/x86/kernel/acpi
Jiang Liu 896dc50640 x86, acpi: Fix bug in associating hot-added CPUs with corresponding NUMA node
Current ACPI cpu hotplug driver fails to associate hot-added CPUs with
corresponding NUMA node when doing socket online. The code path to
associate CPU with NUMA node is as below:
acpi_processor_add()
    ->acpi_processor_get_info()
	->acpi_processor_hotadd_init()
	    ->acpi_map_lsapic()
		->_acpi_map_lsapic()
		    ->acpi_map_cpu2node()
cpu_subsys_online()
    ->try_online_node()
	->node_set_online()

When doing socket online, a new NUMA node is introduced in addition to
hot-added CPU and memory device. And the new NUMA node is marked as
online when onlining hot-added CPUs through sysfs interface
/sys/devices/system/cpu/cpuxx/online.

On the other hand, acpi_map_cpu2node() will only build the CPU to node
map if corresponding NUMA node is already online, so it always fails
to associate hot-added CPUs with corresponding NUMA node because the
NUMA node is still in offline state.

For the fix, we could safely remove the "node_online(node)" check in
function acpi_map_cpu2node() because it's only called for hot-added CPUs
by acpi_processor_hotadd_init().

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Link: http://lkml.kernel.org/r/1390185115-26850-1-git-send-email-jiang.liu@linux.intel.com
Acked-by: Rafael J. Wysocki <rjw@rjwysocki.net>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-02-20 19:01:22 -08:00
..
boot.c x86, acpi: Fix bug in associating hot-added CPUs with corresponding NUMA node 2014-02-20 19:01:22 -08:00
cstate.c x86, acpi, idle: Restructure the mwait idle routines 2013-12-19 11:54:44 -08:00
Makefile x86, realmode: Move ACPI wakeup to unified realmode code 2012-05-08 11:46:05 -07:00
sleep.c ACPICA: Cleanup asmlinkage for ACPICA APIs. 2013-10-31 14:37:35 +01:00
sleep.h ACPICA: Cleanup asmlinkage for ACPICA APIs. 2013-10-31 14:37:35 +01:00
wakeup_32.S ACPICA: Cleanup asmlinkage for ACPICA APIs. 2013-10-31 14:37:35 +01:00
wakeup_64.S ACPICA: Cleanup asmlinkage for ACPICA APIs. 2013-10-31 14:37:35 +01:00