Re: [libvirt] [PATCH] Prefer xend setmaxmem interface

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

 



On Wed, Nov 26, 2008 at 04:06:14PM -0700, Jim Fehlig wrote:
> Err, maybe a patch that actually compiles would be useful ..

ACK, this patch   looks good to me.

> Index: libvirt-0.4.6/src/xen_unified.c
> ===================================================================
> --- libvirt-0.4.6.orig/src/xen_unified.c
> +++ libvirt-0.4.6/src/xen_unified.c
> @@ -799,8 +799,15 @@ xenUnifiedDomainSetMaxMemory (virDomainP
>      GET_PRIVATE(dom->conn);
>      int i;
>  
> +    /* Prefer xend for setting max memory */
> +    if (priv->opened[XEN_UNIFIED_XEND_OFFSET]) {
> +        if (xenDaemonDomainSetMaxMemory (dom, memory) == 0)
> +            return 0;
> +    }
> +
>      for (i = 0; i < XEN_UNIFIED_NR_DRIVERS; ++i)
> -        if (priv->opened[i] &&
> +        if (i != XEN_UNIFIED_XEND_OFFSET &&
> +            priv->opened[i] &&
>              drivers[i]->domainSetMaxMemory &&
>              drivers[i]->domainSetMaxMemory (dom, memory) == 0)
>              return 0;

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

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