Re: [PATCH 19/34] qemu: Split up vCPU hotplug and hotunplug

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

 



On Mon, Nov 23, 2015 at 14:19:58 -0500, John Ferlan wrote:
> On 11/20/2015 10:22 AM, Peter Krempa wrote:
> > There's only very little common code among the two operations. Split the
> > functions so that the internals are easier to understand and refactor
> > later.
> > ---
> >  src/qemu/qemu_driver.c | 210 ++++++++++++++++++++++++++++++++-----------------
> >  1 file changed, 136 insertions(+), 74 deletions(-)

[...]

> > 
> >      if (def) {
> > -        if (qemuDomainHotplugVcpus(driver, vm, nvcpus) < 0)
> > -            goto endjob;
> > +        if (nvcpus > virDomainDefGetVCpus(def)) {
> > +            if (qemuDomainHotplugVcpus(driver, vm, nvcpus) < 0)
> > +                goto endjob;
> > +        } else {
> > +            if (qemuDomainHotunplugVcpus(driver, vm, nvcpus) < 0)
> > +                goto endjob;
> > +        }
> 
> Could have gone with HotplugAddVcpus and HotplugDelVcpus  (similar to
> IOThreads).  Whether you change is up to you.

I decided to go with 'qemuDomainHotplugAddVcpu' without the plural form.
It will be misleading a bit until one of the later commits removes the
loop to the caller.

> 
> ACK -
> 
> John

Peter

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]