[libvirt] RFC: New CPU hot(un)plug API and XML
Daniel P. Berrange
berrange at redhat.com
Thu Jun 16 08:16:01 UTC 2016
On Thu, Jun 16, 2016 at 09:14:12AM +0200, Peter Krempa wrote:
> On Wed, Jun 15, 2016 at 18:10:01 +0100, Daniel Berrange wrote:
> > On Mon, Jun 13, 2016 at 02:48:51PM +0200, Peter Krempa wrote:
>
> TL;DR: I mostly agree with your suggestions altough there's a slight
> problem with the suggested XML format. See [1] at the bottom
>
> > > <domain>
> > > [...]
> > > <vcpu current='1'>3</vcpu>
> > > <vcpus>
> > > <vcpu id='0' state='enabled'/> <-- option 1, no extra data
> > > <vcpu id='1' state='disabled' cell='1'/> <--- option 2, just numa node,
> > > since it's non-obvious
> > > <vcpu id='2' state='disabled' cell='1' pin='1-2' scheduler='...'/>
> > > <!-- option 3 all the data duplicated -->
> > > </vcpus>
> > > [...]
> > > <cputune>
> > > <cpupin ... />
> > > </cputune>
> > > [...]
> > > <cpu>
> > > <numa>
> > > <cell id='0' cpus='0' memory='102400' unit='KiB/>
> > > <cell id='1' cpus='1-2' memory='102400' unit='KiB/>
> > > </numa>
> >
> > In the 'virsh capabilities' XML, the CPUs are listed underneath the
> > <cell>. So rather than adding <vcpu> as children of <vcpus>, I think
> > perhaps we should just put then under the <cell> here too. That would
> > avoid the need to add a cell=NN attribute.eg
> >
> > <cpu>
> > <numa>
> > <cell id='0' cpus='0' memory='102400' unit='KiB>
> > <cpus>
> > <cpu id="0" state="enabled"/>
> > </cpus>
> > </cell>
> > <cell id='1' cpus='1-2' memory='102400' unit='KiB>
> > <cpus>
> > <cpu id="1" state="disabled"/>
> > <cpu id="2" state="enabled"/>
> > </cpus>
> > </cell>
> > </numa>
>
> [1]
>
> I was thinking doing the same at first but there's one caveat. For
> non-numa guests you don't get the <numa> element at all. In such case
> the online/offline state would need to be kept somewhere else and I
> wanted to avoid having two places where to put the data.
>
> I've opted for adding a new element which would satisfy even non-numa
> guests at the expense that you'd need to collate from two places in case
> of numa guests.
Hmm, yes, I forgot about that, oh well.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list