Commit 76bba1423f6313ccf7bd7cd400f1f2049bbc740a

Authored by Wen Congyang
Committed by Linus Torvalds
1 parent 90b30cdc1d

cpu-hotplug, memory-hotplug: try offlining the node when hotremoving a cpu

The node will be offlined when all memory/cpu on the node is hotremoved.
So we should try offline the node when hotremoving a cpu on the node.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Jiang Liu <liuj97@gmail.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

drivers/acpi/processor_driver.c
... ... @@ -45,6 +45,7 @@
45 45 #include <linux/cpuidle.h>
46 46 #include <linux/slab.h>
47 47 #include <linux/acpi.h>
  48 +#include <linux/memory_hotplug.h>
48 49  
49 50 #include <asm/io.h>
50 51 #include <asm/cpu.h>
... ... @@ -641,6 +642,7 @@
641 642  
642 643 per_cpu(processors, pr->id) = NULL;
643 644 per_cpu(processor_device_array, pr->id) = NULL;
  645 + try_offline_node(cpu_to_node(pr->id));
644 646  
645 647 free:
646 648 free_cpumask_var(pr->throttling.shared_cpu_map);