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

Re: [Xen-devel] [PATCH RFC v2 5/7] libxl/vNUMA: VM config parsing functions



On Mon, Oct 14, 2013 at 9:15 AM, Dario Faggioli
<dario.faggioli@xxxxxxxxxx> wrote:
>
> On ven, 2013-10-11 at 12:18 +0100, Ian Jackson wrote:
>> Dario Faggioli writes ("Re: [Xen-devel] [PATCH RFC v2 5/7] libxl/vNUMA: VM 
>> config parsing functions"):
>> > On gio, 2013-10-10 at 12:25 -0400, Elena Ufimtseva wrote:
>> > > 3) if vdistance number of elements = vnodes * vnodes, take as it is.
>> >
>> > Sure.
>>
>> I have some qualms about this:
>>
>> Aren't there some constraints that need to be imposed ?  For example,
>> distance[X,Y]==distance[Y,X] ?  What about the triangle inequality
>> (distance[A,B] + distance[B,C] >= distance[A,C]) ?
>>
> I think Linux does some sanity checking of the distance table (and I
> think it disables NUMA if finding out something weird, Elena?). However,
> this (what Linux expects/checks for) shouldn't really be the only
> criterion, since although Linux is the only current implementation,
> there is no reason why this can't be implemented by other OSes.
>

Yes, Linux does its sanity checking like the same node distance is
always 10, the
check for symmetrical distance table.
As I understand, all NUMA parameters are specified by vendor and OS can
run its own checks or error fixes.

> My point being that we can for sure identify some obviously pathological
> cases (after having reached an agreement on what that would mean), and
> either exit or print a warning if they show up, but I don't think it's
> libxl's job to fully ensure consistency.
>
>> Do we really want/need to allow the specification of any arbitrary
>> distance matrix (subject perhaps to such constraints) ?
>>
> Personally, yes, I think we should try to stick with what the user asks
> us to do. Again, we perhaps can have some checking in place (this is not
> an hot path) and print warnings.
>
> We can also consider a symmetric matrix as a sane default and hence
> allow the user to specify only half of the distances.
>
>> If we do need this I think the nested lists are probably a better
>> syntax for specifying the whole array.
>>
> Agreed. I actually wanted to say the same. Would something like this be
> ok?
>
> distances = [ [10, 20], [20, 10] ]
>
> Or this:
>
> distances = [ [10, 20, 30, 40],
>               [20, 10, 20, 30],
>               [30, 20, 10, 20],
>               [40, 30, 20, 10] ]
>
> Which, considering the above, could also be specified as this:
>
> distances = [ [10, 20, 30, 40],
>                   [10, 20, 30],
>                       [10, 20],
>                           [10] ]
>
> (I.e., "distances = [ [10, 20, 30, 40], [10, 20, 30], [10, 20], [10] ])
>
>
> Elena, what do you think?

yes, I like it.

>
>> That would also more easily
>> allow the user to specify only half of the symmetric matrix, and make
>> it syntactically clearer what's intended.
>>
> Wow, I seem we're on the same pitch here. :-D
>
> 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)



-- 
Elena

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