[Kimchi-devel] [RFC] Guest/Template CPU setup with topology

Daniel Henrique Barboza dhbarboza82 at gmail.com
Tue Nov 8 19:14:45 UTC 2016


Hi there,

At this moment Kimchi support for guest and template CPU setup is
underwhelming. Here's what I've found that needs improving:

- edit template:

* calculation of max CPUs is wrong when considering a topology. Max CPU
is the value of sockets * cores *  threads. At this moment it is 
considering only
cores * threads, defaulting sockets to 1.

* There is no way to set or even see the value of sockets. Given that 
this value
is used in the calculation of the max CPUs, it should be at least 
visible and, in my
opinion, editable


- edit guest (not running):
* If the guest was created with a CPU topology, there is no way to edit 
it. The only
way to edit a topology at this moment is on the template level.


My proposal is:

edit template:
- fix the max CPU calculation to consider the sockets.
- add a field to allow the 'sockets' to be set at will. Default value 
will be retrieved
by the kimchi/host/cpuinfo API as a reference (same think as with cores 
and threads
today).

edit guest:
- if the guest was created with a CPU topology, allow the topology to be 
edited when
the guest is turned OFF.


Thoughts?



ps: this RFC is also related to the feedback of "Bug fix #1072 - 
changing vpus
verification​".


Daniel






More information about the Kimchi-devel mailing list