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

Re: [Xen-devel] [PATCH V5 03/32] xl / libxl: push VCPU affinity pinning down to libxl



On Thu, May 15, 2014 at 06:06:50PM +0100, Wei Liu wrote:
[...]
> > > @@ -833,11 +823,30 @@ static void parse_config_data(const char 
> > > *config_source,
> > >                  exit(1);
> > >              }
> > >              libxl_bitmap_set(&b_info->cpumap, i);
> > > -            if (n_cpus < b_info->max_vcpus)
> > > -                vcpu_to_pcpu[n_cpus] = i;
> > > +            if (n_cpus < b_info->max_vcpus) {
> > > +                kvl = xrealloc(kvl, sizeof(char *) * (len * 2 + 2));
> > 
> > Can't you get the length of the input list and just allocate the right
> > size to start with?
> > 
> 
> That introduces extra overhead. Say if you have 32 VCPU but only want to
> pin a few.
> 

I misread this one. I think you're right. But how can I can the length
of this list? Could not find an appropriate API. I guess I need to do it
myself?

Wei.

> Wei.
> 
> > Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.