[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, 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_memory=[1024, 1024, 2048, 2048]
vnodes_distances=[20, 40]


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


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



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