[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 Fri, Sep 13, 2013 at 9:50 AM, Elena Ufimtseva <ufimtseva@xxxxxxxxx> wrote:
> vNUMA VM config parsing functions.
> Parses VM vNUMA related config, verifies and
> sets default values for errorneous parameters.
> If sum of all vnodes memory sizes does not match
> memory, it will be adjusted accordingly;

Minor thing: this should be "xl/vnuma", since everything is in xl.

> Required configuration options:
> - nr_vnodes - number of vNUMA nodes;
> - vnumamem - vnodes memory ranges list;
> optional:
> - vdistance - array of distances;
> default values: 10 for same node, 20 for the rest;
> - vcpu_to_vnode - maps vcpu to vnode;
> should be specified for each node, otherwise default
> interleaved initialization used;
>
> Examples:
> a)
> vnodes = 2
> vnumamem = "512m, 512m"
> b)
> memory = 2048
> vcpus = 6
> vnodes = 2
> vnumamem = "1g, 1g"
> vnuma_distance = "10 20, 10 20"
> vcpu_to_vnode ="1, 0, 0, 0, 1, 1"

If you make these lists python lists (i.e., [1, 0, 0, 0, 1, 1]), then
not only will the file format be more consistent, but you should be
able to adapt xlu_cfg_get_list() to do most of the parsing for you.
(You may need to copy xlu_cfg_get_list_as_string_list() as
xlu_cfg_get_list_as_int_list() or something.)

I think probably that when specifying memory sizes, we should follow
suit with the "memory" and "maxmem" parameters, and just always use
megabytes.  That simplifies the parsing too.

Not sure about vnuma_distance -- I suppose to be completely consistent
we'd have to do nested lists, like so: [[10, 20], [20, 10]]  But that
may make parsing a lot more complicated.  Since we're passing a big
array to the domain builder anyway, would it be bad just to make it
one long array, like so?  [10, 20, 20, 10]  Or maybe we can just not
have the parameter for this series and use the default distance array
you have here; then we can add node distance parsing later.

IanC / IanJ -- thoughts?

I'll save a detailed review until we have a better idea what the
interface will be.  The big thing would be adding blank lines to break
the code into "paragraphs".

 -George

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