[libvirt] [PATCH 6/9] conf: extract ignoring of inactive vcpu pinning information

Peter Krempa pkrempa at redhat.com
Wed Mar 9 09:33:50 UTC 2016


On Fri, Mar 04, 2016 at 07:30:39 -0500, John Ferlan wrote:
> 
> 
> On 02/24/2016 09:22 AM, Peter Krempa wrote:
> > Introduce VIR_DOMAIN_DEF_FEATURE_OFFLINE_CPUPIN domain feature flag
> 
> Should it be VCPUPIN ?

Yep.

> 
> > whcih will allow to skip ignoring of the pinning information for
> > hypervisor drivers which will want to implement forward-pinning of
> > vcpus.
> > ---
> >  src/conf/domain_conf.c | 28 +++++++++++++++++++++++-----
> >  src/conf/domain_conf.h |  1 +
> >  2 files changed, 24 insertions(+), 5 deletions(-)
> > 
> > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> > index 101fae2..4220448 100644
> > --- a/src/conf/domain_conf.c
> > +++ b/src/conf/domain_conf.c
> > @@ -4215,6 +4215,25 @@ virDomainDeviceDefPostParseInternal(virDomainDeviceDefPtr dev,
> >  }
> > 
> > 
> 
> A little intro would be nice...
> 
> > +static void
> > +virDomainDefRemoveOfflineVcpuPin(virDomainDefPtr def)
> > +{
> > +    size_t i;
> > +    virDomainVcpuInfoPtr vcpu;
> > +
> > +    for (i = 0; i < virDomainDefGetVcpusMax(def); i++) {
> > +        vcpu = virDomainDefGetVcpu(def, i);
> > +
> > +        if (!vcpu->online && vcpu->cpumask) {
> > +            virBitmapFree(vcpu->cpumask);
> > +            vcpu->cpumask = NULL;
> > +
> > +            VIR_WARN("Ignoring unsupported vcpupin for offline vcpu '%zu'", i);
> 
> Is/was this for debugging?  Do we really want to WARN or just go with INFO?

No, this is basically stolen from the original place where this
operation was done just with a more specific message. I did not attempt
to do anything different.

I'll push this with the message and we can get rid of it with a patch
specifically describing the semantic change.

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160309/ae7c8fb9/attachment-0001.sig>


More information about the libvir-list mailing list