[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 mer, 2013-11-20 at 12:26 +0000, Ian Campbell wrote:
> On Wed, 2013-11-20 at 13:18 +0100, Dario Faggioli wrote:

> > 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.
> 
Where? I mean what size are you talking about? In libxl, it is libxl
itself that allocates the bitmap and decides, at allocation time (with
the third parameter of libxl_cpu_bitmap_alloc()) how many bits I want
there, and nothing changes that. So, after having allocated a cpumap 64
bits big, there is no way it can tell that only 16 are worth.

I can allocate the cpumap more precisely but, for one, that would still
require figuring out the actual number of pcpus. Also, that would work
for 16, but for any other value that is not multiple of sizeof(uint8_t),
I'd have to face the same problem.

> It seems like it should be quite quick to wire up xc_get_nr_cpus based
> on xc_get_max_cpus and use that.
> 
No it's not. On it.

> Is there not a race condition here somewhere -- what happens if a CPU is
> on/offlined during all this?
> 
Again, I'm not getting. What's the window where you're worried about
races, if on/offlining is involved? What do you refer to with "during
all this" ?

Regards,
Dario

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
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®.