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

Re: [Xen-devel] [PATCH v10 5/9] libxl: vnuma types declararion





On Tue, Sep 16, 2014 at 3:16 AM, Dario Faggioli <dario.faggioli@xxxxxxxxxx> wrote:
On Tue, 2014-09-16 at 02:17 -0400, Elena Ufimtseva wrote:

>
>Â Â Â Â ÂThen I would take the rest and wrap them in a libxl_vnode_info
>Â Â Â Â Âstruct:
>
>Â Â Â Â Âlibxl_vnode_info = Struct("libxl_vnode_info", [
>Â Â Â Â Â Â Â("mem", MemKB), # Size of this node's memory
>Â Â Â Â Â Â Â("distances", Array(...)), # Distances from this node to
>Â Â Â Â Âthe others (single dimensional array)
>Â Â Â Â Â Â Â("pnode", TYPE), # which pnode this vnode is associated
>Â Â Â Â Âwith
>Â Â Â Â Â])
>
>Â Â Â Â ÂThen in the (b|c)_config
>Â Â Â Â Â Â Â ("vnuma_nodes", Array(libxl_vnode_info...))
>
>
> Hi Ian
>
>
> Is there a better mechanism to parse first vnuma_nodes, and within it
> to parse distances array?
>
Parse? Why parse? The above is the suggested look of the _libxl_
interface, not of the xl config file.

For the xl config file, IMO, what you have in place is already fine,
with the modification of the name of the various options, as I mentioned
in one of my review message.

> So lets say config will be looking like this:
>
>
> vnuma_nodes = [ a b c, d e f, g e k,... ]
> but c, f, k cannot be arrays. Parser does not expect to have one more
> string withing each element of a topmost string.
>
No need for the config file to look like this!

In the config file, you can have:

vnodes=4
vnodes_memory=[1024, 1024, 2048, 2048]
vnodes_distances=[20, 40]

etc.

Then, while parsing, you fill the libxl data structures defined in the
IDL file as Ian suggested.

> So this does not work:
>
>
> vnuma_nodes = [ a b "distance array1", d e "distance array2", ...]
> also this does not work:
>
>
> vnuma_node = [ [], [], [], ..]
> Looks like that I was trying to avoid with emulating multi dimensional
> array for distance still persists here.
>
>
> Maybe you know some tricky way to get around this?
>
The trick is, just don't do that!! :-P

Thank you Dario, makes sense, I somehow thought about parsing instead )

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