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

Re: [Xen-devel] [PATCH v3 11/14] libxl: get and set soft affinity

On Wed, 2013-11-20 at 13:18 +0100, Dario Faggioli wrote:
> On mer, 2013-11-20 at 12:05 +0000, Ian Campbell wrote:
> > On Wed, 2013-11-20 at 13:00 +0100, Dario Faggioli wrote:
> > > I'll keep looking but, in case I really don't fine anything, do you want
> > > me to:
> > >  - stick with this, at least for now;
> > >  - introduce a new libxl (and probably libxc too) interface for this
> > 
> > I don't understand why libxl_get_max_cpus, which is certainly at least
> > as big as you need, isn't sufficient here. Especially since in the same
> > function you call libxl_cpu_bitmap_alloc(...,..., 0) which uses
> > libxl_get_max_cpus.
> > 
> As a matter of fact, it's _too_ big!
> The point here is that, whenever the caller gives me a cpumap that comes
> from him specifying "all" in the config file, this cpumap is, for
> instance, on my system, and unsigned int full of 1-s. If you manage to
> (pretty) print it, that would look like "0-63".
> After going down to Xen and then back from there, i.e., what happens to
> ecpumap, the "all" from above has become, again on my system, where I
> have 16 cpus, something like "0-15". That is, looking at the bits in the
> actual uint, the first 16 of them to 1, the other to 0.

And the returned bitmap doesn't have a size == 16? That's not very
helpful I suppose.

It seems like it should be quite quick to wire up xc_get_nr_cpus based
on xc_get_max_cpus and use that.

Is there not a race condition here somewhere -- what happens if a CPU is
on/offlined during all this?


Xen-devel mailing list



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