[libvirt] [PATCH 3/5 v3] numatune: Support persistent XML for numatune

Daniel P. Berrange berrange at redhat.com
Tue Jun 21 10:46:21 UTC 2011


On Fri, Jun 17, 2011 at 06:22:56PM +0800, Osier Yang wrote:
> diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
> index 1f4bf1d..3c54e8b 100644
> --- a/src/conf/domain_conf.h
> +++ b/src/conf/domain_conf.h
> @@ -1117,6 +1117,25 @@ virDomainVcpupinDefPtr virDomainVcpupinFindByVcpu(virDomainVcpupinDefPtr *def,
>                                                    int nvcpupin,
>                                                    int vcpu);
>  
> +enum virDomainNumatuneMemMode {
> +    VIR_DOMAIN_NUMATUNE_MEM_STRICT,
> +    VIR_DOMAIN_NUMATUNE_MEM_PREFERRED,
> +    VIR_DOMAIN_NUMATUNE_MEM_INTERLEAVE,
> +
> +    VIR_DOMAIN_NUMATUNE_MEM_LAST
> +};
> +
> +typedef struct _virDomainNumatuneDef virDomainNumatuneDef;
> +typedef virDomainNumatuneDef *virDomainNumatuneDefPtr;
> +struct _virDomainNumatuneDef {
> +    struct {
> +        char *nodemask;

This is a heap allocated string, but there was no addition
in domain_conf.c that ever frees it, so this leaks AFAICT.

> +        int mode;
> +    } memory;
> +
> +    /* Future NUMA tuning related stuff should go here. */
> +};
> +


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