Re: [PATCH 2/7] conf: Do not allow vcpupin's cpuid exceed current vcpus number

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

 



On 10/12/2012 11:50 AM, Osier Yang wrote:
> Setting pinning policy for vcpu which exceed current vcpus number
> makes no sense, and it could cause problem for APIs which
> associate the vcpu thread id with cgroup.
> ---
>  src/conf/domain_conf.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 3c3d0ae..d8ea8ce 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -8784,9 +8784,9 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
>      if (n && VIR_ALLOC_N(def->cputune.vcpupin, n) < 0)
>          goto no_memory;
>  
> -    if (n > def->maxvcpus) {
> +    if (n > def->vcpus) {
>          virReportError(VIR_ERR_INTERNAL_ERROR,
> -                       "%s", _("vcpupin nodes must be less than maxvcpus"));
> +                       "%s", _("vcpupin nodes must be less than current vcpus"));
>          goto error;
>      }
>  
> 

Old machines wouldn't be loaded with newer libvirt with this change.  I
propose silently ignoring all the pinning over def->vcpus and error out
with the same condition as now.

Martin

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