From: Ryan Harper <ryanh@us.ibm.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: Ryan Harper <ryanh@us.ibm.com>, xen-devel@lists.xensource.com
Subject: Re: [PATCH 2/3] xend: Add multiple cpumasks support
Date: Mon, 14 Aug 2006 12:48:12 -0500 [thread overview]
Message-ID: <20060814174812.GO1694@us.ibm.com> (raw)
In-Reply-To: <C1067361.DC3%Keir.Fraser@cl.cam.ac.uk>
* Keir Fraser <Keir.Fraser@cl.cam.ac.uk> [2006-08-14 12:37]:
> On 14/8/06 5:57 pm, "Ryan Harper" <ryanh@us.ibm.com> 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@us.ibm.com
next prev parent reply other threads:[~2006-08-14 17:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-14 16:57 [PATCH 2/3] xend: Add multiple cpumasks support Ryan Harper
2006-08-14 17:37 ` Keir Fraser
2006-08-14 17:48 ` Ryan Harper [this message]
2006-08-14 17:55 ` Keir Fraser
-- strict thread matches above, loose matches on Subject: below --
2006-08-14 18:10 Ian Pratt
2006-08-14 18:47 ` Ryan Harper
2006-08-15 8:44 ` Keir Fraser
2006-08-15 23:01 ` Ryan Harper
2006-08-14 18:55 Ian Pratt
2006-08-14 19:08 ` Ryan Harper
2006-08-14 20:15 ` Ryan Harper
2006-08-14 22:03 Ian Pratt
2006-08-14 22:20 ` Ryan Harper
2006-08-15 9:07 ` Keir Fraser
2006-08-15 22:58 ` Ryan Harper
2006-08-14 22:40 Ian Pratt
2006-08-14 22:46 ` Ryan Harper
2006-08-16 23:34 ` Ryan Grimm
2006-08-15 23:26 Ian Pratt
2006-08-16 11:15 ` Subrahmanian, Raj
2006-08-17 2:01 Ian Pratt
2006-08-17 15:27 ` Ryan Grimm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060814174812.GO1694@us.ibm.com \
--to=ryanh@us.ibm.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.