Skip to contentSkip to conversation

PATCH: split smpboot.c and create cpuhotplug.c

PATCH Tristan Gingold 2 participants 3 messages May 22, 2006 – May 23, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

this patch creates a new file: cpuhotplug.c. The content is the xenbus handler part of smpboot.c. The purpose is to be able to share this part with other architectures.

Tested by compiling on i386.

Tristan.

# HG changeset patch
# User gingold@sun477
# Node ID 3aa29135597a5c85464dfb85b69217aeae6465fd
# Parent 14717dedba028c7e98bff1f67c6e9e25b42b5661 Xenbus vcpu hotplug control moved to cpuhotplug.c
So that this code can be easily shared with other architecture.

linux-2.6-xen-sparse/drivers/xen/core/Makefile +1 -0
diff -r 14717dedba02 -r 3aa29135597a linux-2.6-xen-sparse/drivers/xen/core/Makefile
@@ -7,5 +7,6 @@ obj-$(CONFIG_PROC_FS) += xen_proc.o
 obj-$(CONFIG_PROC_FS) += xen_proc.o
 obj-$(CONFIG_NET)     += skbuff.o
 obj-$(CONFIG_SMP)     += smpboot.o
+obj-$(CONFIG_HOTPLUG_CPU) += cpuhotplug.o
 obj-$(CONFIG_SYSFS)   += hypervisor_sysfs.o
 obj-$(CONFIG_XEN_SYSFS) += xen_sysfs.o
linux-2.6-xen-sparse/drivers/xen/core/smpboot.c +8 -71

108 lines not on this page · raw message

linux-2.6-xen-sparse/drivers/xen/core/cpuhotplug.c new file +93 -0

93 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 5 lines · Tristan Gingold

this patch creates a new file: cpuhotplug.c. The content is the xenbus handler part of smpboot.c. The purpose is to be able to share this part with other architectures.

Tested by compiling on i386.

This raises the obvious question: why don't you use the rest of our smpboot.c to implement SMP bringup? It's all generic except the bit that sets up VCPU initial context.

-- Keir

#2 lore raw
Quoted 11 lines · Keir Fraser
Quoted 6 lines · Tristan Gingold

this patch creates a new file: cpuhotplug.c. The content is the xenbus handler part of smpboot.c. The purpose is to be able to share this part with
other architectures.

Tested by compiling on i386.

This raises the obvious question: why don't you use the rest of our smpboot.c to implement SMP bringup? It's all generic except the bit that sets up VCPU initial context.

I can see three reasons:

* Only a 10 lines change (IPI handling) was required in the linux kernel to run SMP on Xen. All the other changes were in Xen.

* xen/core/smpboot.c is not a drop in replacement for arch/ia64/kernel/smpboot.c Surgery will be required.

* If we used xen/core/smpboot.c, we'd lose transparent virtualization. To re-enable it we had to do surgery again.

Tristan.