[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/3] xend: Add multiple cpumasks support
* Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> [2006-08-14 12:37]: > On 14/8/06 5:57 pm, "Ryan Harper" <ryanh@xxxxxxxxxx> wrote: > > > This patch modifies xend to accept and parse multiple cpumask strings > > from the cpus parameter. The cpus string stays the same, but it now > > can parse either a python list of strings: > > > > [ '2-5, '2-5', '2-5' ] > > > > A regular string with ", " as the separator: > > > > "2-5, 2-5, 2-5, 2-5" > > > > or a mixture of both: > > > > [ 2-5, '2-5', 2-5, '2-5' ] > > This isn't really a mixture of both, is it? It looks syntactically incorrect > (e.g., first 2-5 is unquoted so not a string). create.py ends up passing the whole thing as a string even if you mark it up as a list with strings embedded which is why I can mix it. If you like, we can drop support for dealing with the [ ... ] form and just use cpus = "" > > I'm not sure about the use of ', ' as a delimiter. It would be less > confusing to strictly require the use of the list form. I would imagine it's > then clearest used as: > Cpus = [] > Cpus[0] = '2-5' > Cpus[1] = '3-4' > ... I'd prefer to not have to use any language arrays. I'm not sure how this will map to the xml-based config files that Ewan was talking about, but I suppose he will have to come up with something since we have things like the disk parameter which is in python list format. > > Trying to read long lists of cpu constraints with spaces in will make people > go cross-eyed! I agree. The point was that I'm attempting to parse as much as I can make sense of, not to indicate how we should tell the user to convey this information. I also like being able to retain the cpu=, cpus=, previous syntax while extending it to support multiple cpumasks. I think the following (which I added in the example files) is good enough without having to resort to arrays/dictionaries. cpus = "2-5, 2-5, 2-5, 2-5" I'm open to other field delimiters if that is a point of contention. -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx (512) 838-9253 T/L: 678-9253 ryanh@xxxxxxxxxx _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |