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

Re: [Xen-devel] [PATCH v4 03/15] libxl: introduce libxl_get_nr_cpus()



On mar, 2013-12-03 at 18:09 +0000, George Dunlap wrote:
> On 12/03/2013 05:54 PM, Ian Jackson wrote:
> > Dario Faggioli writes ("Re: [PATCH v4 03/15] libxl: introduce 
> > libxl_get_nr_cpus()"):
> >> On mar, 2013-12-03 at 17:48 +0000, Ian Jackson wrote:
> >>> This number might be out of date as soon as it is read, won't it ?
> >>
> >> Quite possible, yes.
> >>
> >> So, are you suggesting that we shouldn't even allow the user to read it?
> >> Or that I should mention that in the comment? (Or something else?)
> >
> > Perhaps I didn't explain my concerns clearly enough.
> >
> > I wonder what is it for ?  Isn't it difficult to use correctly ?
> 
> Dario uses it in the new version of libxl_vcpu_set_affinity() to limit 
> what was considered an "unreachable cpu" in its warning.  (v5 14/17) 
> That is, if you set the affinity to 1111111111111111111111..., and there 
> are only 4 pcpus, it will return 111100000.....  These don't match, and 
> yet there are no unreachable cpus.  So it asks nr_cpus first, then only 
> compares bits 1..[nr_cpus-1].
> 
Yes, and also in the new dryrun_only mode I'm introducing for `xl
vcpu-pin', as print_bitmap() in xl wants to know the total number of
pcpus, so that, if the mask is <11110000>, but we only have 4 pcpus, it
can print "all".

> I'm not sure how often that would change, but if there was a race, I 
> think it would just be a spurious error message (or lack thereof).
> 
Exactly. Also, as mentioned in the other e-mail I just sent, I'm up for
trying to figure out a better way to handle this, as soon as 4.5 begins.

Thanks and 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®.