Re: [PATCHv2 05/14] API: Introduce VIR_DOMAIN_VCPU_AGENT, for agent based CPU hot(un)plug

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

 



On Wed, Jun 05, 2013 at 03:43:56PM +0200, Peter Krempa wrote:
> This flag will allow to use qemu guest agent commands to disable
> (offline) and enable (online) processors in a live guest that has the
> guest agent running.
> ---
>  include/libvirt/libvirt.h.in |  1 +
>  src/libvirt.c                | 24 ++++++++++++++++++++++--
>  tools/virsh-domain.c         | 25 +++++++++++++++++++++++--
>  tools/virsh.pod              | 13 ++++++++++---
>  4 files changed, 56 insertions(+), 7 deletions(-)
> 
> diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
> index 1804c93..e057be1 100644
> --- a/include/libvirt/libvirt.h.in
> +++ b/include/libvirt/libvirt.h.in
> @@ -2120,6 +2120,7 @@ typedef enum {
> 
>      /* Additionally, these flags may be bitwise-OR'd in.  */
>      VIR_DOMAIN_VCPU_MAXIMUM = (1 << 2), /* Max rather than current count */
> +    VIR_DOMAIN_VCPU_AGENT   = (1 << 3), /* Use guest-agent based cpu hotplug */
>  } virDomainVcpuFlags;

I'm thinking that perhaps a different name is better here. "guest agent"
is an implementation detail. What we're doing here is providing a way to
change the guest OS CPU online state. Whether this is via a guest agent
or paravirt channel, or something else, is a minor detail.

So how about:

    VIR_DOMAIN_VCPU_GUEST_USAGE

> diff --git a/src/libvirt.c b/src/libvirt.c
> index 6967613..820519a 100644
> --- a/src/libvirt.c
> +++ b/src/libvirt.c
> @@ -8906,6 +8906,12 @@ error:
>   * equal to virConnectGetMaxVcpus().  Otherwise, this call affects the
>   * current virtual CPU limit, which must be less than or equal to the
>   * maximum limit.
> + *
> + * If @flags includes VIR_DOMAIN_VCPU_AGENT, then a guest agent is used to
> + * modify the number of processors used by a domain. This flag can only be used
> + * with live guests and is incompatible with VIR_DOMAIN_VCPU_MAXIMUM as the
> + * maximum limit can't be changed using the guest agent.

I think we could be a little bit more explicit about the difference in
between. I'd like to see some text that explicitly says that the default
behaviour is to control the actual CPUs exposed to the guest, while this
flag is just controlling the guest OS CPU usage mask.

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 :|

--
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]