From: Dario Faggioli <dario.faggioli@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>, Chong Li <lichong659@gmail.com>
Cc: Chong Li <chong.li@wustl.edu>, Sisu Xi <xisisu@gmail.com>,
george.dunlap@eu.citrix.com, xen-devel@lists.xen.org,
Meng Xu <mengxu@cis.upenn.edu>,
dgolomb@seas.upenn.edu
Subject: Re: [PATCH v5 for Xen 4.7 4/4] xl: enable per-VCPU parameter settings for RTDS scheduler
Date: Tue, 9 Feb 2016 19:25:02 +0100 [thread overview]
Message-ID: <1455042302.3148.110.camel@citrix.com> (raw)
In-Reply-To: <20160205145152.GB23178@citrix.com>
[-- Attachment #1.1: Type: text/plain, Size: 2344 bytes --]
On Fri, 2016-02-05 at 14:51 +0000, Wei Liu wrote:
> On Thu, Feb 04, 2016 at 04:50:44PM -0600, Chong Li wrote:
> >
> > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> > index 2b6371d..b843fa5 100644
> > --- a/tools/libxl/xl_cmdimpl.c
> > +++ b/tools/libxl/xl_cmdimpl.c
> >
> > - SWITCH_FOREACH_OPT(opt, "d:p:b:c:", opts, "sched-rtds", 0) {
> > + SWITCH_FOREACH_OPT(opt, "d:p:b:v:c", opts, "sched-rtds", 0) {
> > case 'd':
> > dom = optarg;
> > break;
> > case 'p':
> > - period = strtol(optarg, NULL, 10);
> > + if (p_index > b_index || p_index > v_index) {
> > + /* budget or vcpuID is missed */
> > + fprintf(stderr, "Must specify period, budget and
> > vcpuID\n");
> > + rc = 1;
> > + goto out;
> > + }
> > + if (p_index >= p_size) {
> > + p_size *= 2;
> > + periods = xrealloc(periods, p_size);
> > + if (!periods) {
>
> xreaalloc can't fail.
>
> > + fprintf(stderr, "Failed to realloc periods\n");
> > + rc = 1;
> > + goto out;
> > + }
> > + }
> > + periods[p_index++] = strtol(optarg, NULL, 10);
>
> You mix option parsing and validation in same place. I think you need
> to
> clearly separate them. It's very hard to review a function like this
> one.
>
Exactly.
So, considering this, and the fact that the libxl API is changing (the
_set_all() function is being added), I don't think there is much point
in reviewing this version of this patch.
So, good work following up on this! I know, it takes more time than one
would think... but interfaces are very important, so it's normal it
takes a bit to get them right (and convince people that that's the
case! :-P).
Looking forward to v6.
Thanks and 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)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2016-02-09 18:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-04 22:50 [PATCH v5 for Xen 4.7 0/4] Enable per-VCPU parameter settings for RTDS scheduler Chong Li
2016-02-04 22:50 ` [PATCH v5 for Xen 4.7 1/4] xen: enable " Chong Li
2016-02-09 18:17 ` Dario Faggioli
2016-03-01 17:58 ` Chong Li
2016-03-02 13:36 ` Jan Beulich
2016-03-02 14:06 ` George Dunlap
2016-02-04 22:50 ` [PATCH v5 for Xen 4.7 2/4] libxc: " Chong Li
2016-02-05 14:09 ` Wei Liu
2016-02-09 18:20 ` Dario Faggioli
2016-02-04 22:50 ` [PATCH v5 for Xen 4.7 3/4] libxl: " Chong Li
2016-02-05 14:44 ` Wei Liu
2016-02-05 15:59 ` Dario Faggioli
2016-02-05 16:19 ` Wei Liu
2016-02-06 0:10 ` Chong Li
2016-02-08 11:07 ` Wei Liu
2016-02-08 22:59 ` Chong Li
2016-02-09 10:19 ` Wei Liu
2016-02-09 11:05 ` Dario Faggioli
2016-02-09 12:00 ` Dario Faggioli
2016-02-09 16:48 ` Chong Li
2016-02-09 17:38 ` Wei Liu
2016-02-04 22:50 ` [PATCH v5 for Xen 4.7 4/4] xl: " Chong Li
2016-02-05 14:51 ` Wei Liu
2016-02-09 18:25 ` Dario Faggioli [this message]
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=1455042302.3148.110.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=chong.li@wustl.edu \
--cc=dgolomb@seas.upenn.edu \
--cc=george.dunlap@eu.citrix.com \
--cc=lichong659@gmail.com \
--cc=mengxu@cis.upenn.edu \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
--cc=xisisu@gmail.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.