]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cpu/mem hotplug: add try_online_node() for cpu_up()
authorToshi Kani <toshi.kani@hp.com>
Tue, 5 Nov 2013 05:55:30 +0000 (16:55 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:55:30 +0000 (16:55 +1100)
commitff102f390a0a1a7954c1732788c8560c4403d053
treea5ef837382315736131072ef52e65605dba183f5
parent71b529d6868c801ace89e24460b603e40c0574e6
cpu/mem hotplug: add try_online_node() for cpu_up()

cpu_up() has #ifdef CONFIG_MEMORY_HOTPLUG code blocks, which call
mem_online_node() to put its node online if offlined and then call
build_all_zonelists() to initialize the zone list.  These steps are
specific to memory hotplug, and should be managed in mm/memory_hotplug.c.
lock_memory_hotplug() should also be held for the whole steps.

For this reason, this patch replaces mem_online_node() with
try_online_node(), which performs the whole steps with
lock_memory_hotplug() held.  try_online_node() is named after
try_offline_node() as they have similar purpose.

There is no functional change in this patch.

Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/memory_hotplug.h
kernel/cpu.c
mm/memory_hotplug.c