Rendezvous selected cpus in softirq (stop_machine).
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · Xen staging patchbot-unstable
# HG changeset patch
# User Keir Fraser
# Date 1202745589 0
# Node ID2a3111016f88c22cbf1f24ca31b7f9ecf7a71e15# Parent7b0c0ab0566bbf241620db3fc94e791528a4503cRendezvous selected cpus in softirq (stop_machine).
Quoted 7 lines
This is similar to
stop_machine_runstub from Linux, to pull selected cpus in rendezvous point and the do some batch work under a safe environment. Current one usage is from S3 path, where individual cpu is pulled down with related online footprints being cleared. It's dangerous to have other cpus checking clobbered data structure in the middle, such ascpu_online_map,cpu_sibling_map, etc.
This needs some minor fixes to build on ia64. We don't fully support
CPU hotplug on Xen/ia64 yet, but we do define CONFIG_HOTPLUG_CPU for kexec. The patch below fixes the build issue and adds cpu_add_remove_lock with the expectation that we'll make use of it at some point. Thanks,
Alex
--
xen/arch/ia64/linux-xen/smpboot.c +3 -0
@@ -67,6 +67,9 @@#ifndef CONFIG_SMP cpumask_t cpu_online_map =CPU_MASK_CPU0 ;EXPORT_SYMBOL (cpu_online_map); +#endif +#ifdef CONFIG_HOTPLUG_CPU +spinlock_t cpu_add_remove_lock;#endif #endif
xen/common/stop_machine.c +1 -0
@@ -25,6 +25,7 @@#include <xen/spinlock.h> #include <asm/smp.h> #include <asm/current.h> +#include <xen/sched.h> #include <xen/softirq.h> #include <asm/processor.h> #include <xen/errno.h>
xen/include/xen/smp.h +1 -0
@@ -113,6 +113,7 @@ static inline int on_each_cpu(#define smp_processor_id () raw_smp_processor_id()#ifdef CONFIG_HOTPLUG_CPU +#include <xen/spinlock.h> extern spinlock_t cpu_add_remove_lock;/* * FIXME: need a better lock mechanism when real cpu hotplug is later
Quoted 5 lines · Alex Williamson
This needs some minor fixes to build on ia64. We don't fully support
CPU hotplug on Xen/ia64 yet, but we do defineCONFIG_HOTPLUG_CPUfor kexec. The patch below fixes the build issue and addscpu_add_remove_lockwith the expectation that we'll make use of it at some point. Thanks,
I'll apply a variant of this, probably tomorrow.
-- Keir
Quoted 5 lines · Alex Williamson
This needs some minor fixes to build on ia64. We don't fully support
CPU hotplug on Xen/ia64 yet, but we do defineCONFIG_HOTPLUG_CPUfor kexec. The patch below fixes the build issue and addscpu_add_remove_lockwith the expectation that we'll make use of it at some point. Thanks,
An alternative fix (and cleanup) is applied as changeset 17042.
-- Keir