About cpu_set, CPU hotplug and related subjects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi folks, 

I've implemented a functional test for the cpu_set feature some time
ago. I was going through the patch queue and realized the patch needed
some respin, so I did it. I decided to try and see what is the state of
the feature, considering last time I tried it was not working
(segfaulting).

Now, with the latest qemu-kvm things are on a much better shape, cpu_set
is not giving me segfaults, and qemu monitor reports the new cpus added.

10:21:20 INFO | Adding 1 CPUs to guest
10:21:20 DEBUG| Sending monitor command: cpu_set 0 online
10:21:20 DEBUG| Sending monitor command: cpu_set 1 online
10:21:20 DEBUG| Sending monitor command: info cpus
10:21:20 DEBUG| Output of info cpus:
* CPU #0: pc=0xffffffff8102e23d thread_id=11035 
  CPU #1: pc=0x0000000000000000 thread_id=11065 

The address of the CPU #1 seems a little strange. The guest OS is
completely unaware of any changes to the number of CPUs though.

After doing some reading it seems to me that the reason why that is not
happening is because SeaBIOS still doesn't have code to support CPU hot
plugging as BochsBIOS did. I also looked after some documentation about
how that feature is supposed to work, and didn't find it. So, assuming
my understanding about the current status is correct:

1) Is anybody planning on adding the necessary support to SeaBIOS
anytime soon?
2) How the whole functionality is supposed to work? My mental model goes
like this:

* cpu_set [total number of CPUs you want the system to have] online
* Guest should notice new CPUS added to the system and they appear
under /sys/devices/system/cpu/cpu*, initially offlined
* The online status of each CPU is
in /sys/devices/system/cpu/cpu*/online, and onlining it is just a matter
of writing 1 to this file
* It is not possible to downgrade the number of CPUs of the system
during the lifetime of the VM process

Thanks for your attention,

Lucas


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux