[libvirt] [PATCH 2/5] numad: Copy 'placement' of <numatune> to <vcpu> if its placement is not specified

Eric Blake eblake at redhat.com
Tue May 8 22:08:27 UTC 2012


On 05/08/2012 10:04 AM, Osier Yang wrote:
> With this patch, one can also fully drive numad by:
> 
>   <vcpu>2</vcpu>
>   <numatune>
>     <memory placement='auto'/>
>   </numatune>
> 
> New tests are added, and s/"/'/ on tests (*.xml) added in previous patch.

That feels like churn; I might float those hunks to 1/5.

> +++ b/docs/formatdomain.html.in
> @@ -362,14 +362,14 @@
>          0.9.11 (QEMU and KVM only)</span>, the optional attribute
>          <code>placement</code> can be used to indicate the CPU placement
>          mode for domain process, its value can be either "static" or
> -        "auto", defaults to "static" if <code>cpuset</code> is specified,
> -        "auto" indicates the domain process will be pinned to the advisory
> -        nodeset from querying numad, and the value of attribute
> -        <code>cpuset</code> will be ignored if it's specified. If both
> -        <code>cpuset</code> and <code>placement</code> are not specified,
> -        or if <code>placement</code> is "static", but no <code>cpuset</code>
> -        is specified, the domain process will be pinned to all the
> -        available physical CPUs.
> +        "auto", defaults to <code>placement</code> of <code>numatune</code>,
> +         or "static" if <code>cpuset</code> is specified. "auto" indicates
> +        the domain process will be pinned to the advisory nodeset from querying
> +        numad, and the value of attribute <code>cpuset</code> will be ignored
> +        if it's specified. If both <code>cpuset</code> and <code>placement</code>

s/both...and...are not/neither...nor...is/

> +        are not specified, or if <code>placement</code> is "static", but no
> +        <code>cpuset</code> is specified, the domain process will be pinned to
> +        all the available physical CPUs.

Nice addition; I'll probably also float this to 1/5.

>        </dd>
>      </dl>
>  
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index e9c9db7..14b94d3 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -7958,9 +7958,9 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
>              if (virDomainCpuSetParse(set, 0, def->cpumask,
>                                       def->cpumasklen) < 0)
>                  goto error;
> -            VIR_FREE(tmp);
>              if (def->placement_mode == VIR_DOMAIN_CPU_PLACEMENT_MODE_DEFAULT)
>                  def->placement_mode = VIR_DOMAIN_CPU_PLACEMENT_MODE_STATIC;
> +            VIR_FREE(tmp);
>          }
>      }

Churn.

Everything else looks okay.

ACK; again, I'll probably push this once I finish the series review.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120508/625c42d9/attachment-0001.sig>


More information about the libvir-list mailing list