xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Meng Xu <xumengpanda@gmail.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>,
	Sisu Xi <xisisu@gmail.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Meng Xu <mengxu@cis.upenn.edu>, Jan Beulich <JBeulich@suse.com>,
	Chao Wang <chaowang@wustl.edu>, Chong Li <lichong659@gmail.com>,
	Dagaen Golomb <dgolomb@seas.upenn.edu>
Subject: Re: [PATCH v1 3/4] libxl: add rt scheduler
Date: Mon, 25 Aug 2014 11:55:26 -0400	[thread overview]
Message-ID: <CAENZ-+kf-Qh+1D8ax+0XzhsYeJDFZ1ZHm0r-_s3RVrw2+USu5A@mail.gmail.com> (raw)
In-Reply-To: <20140825131740.GC32384@zion.uk.xensource.com>


[-- Attachment #1.1: Type: text/plain, Size: 2500 bytes --]

Hi Wei,

Thank you very much for your quick review! I really appreciate it. :-)

In summary, I correct those code you pointed out.


>
> > +        LOGE(ERROR, "Allocate sdom array fails\n");
> > +        return ERROR_INVAL;
> > +    }
> > +
> > +    rc = xc_sched_rt_domain_get(CTX->xch, domid, sdom, num_vcpus);
> > +    if (rc != 0) {
> > +        LOGE(ERROR, "getting domain sched rt");
> > +        return ERROR_FAIL;
> > +    }
> > +
> > +    /* FIXME: how to guarantee libxl_*_dispose be called exactly once?
> */
> > +    libxl_domain_sched_params_init(scinfo);
> > +
>
> libxl_*_dispose should be idempotent (as least we intent to make it so).
> And it's caller's responsibility to ensure it's called once if it wishes
> to.
>

​I see. Right now, it is disposed by the caller in xl.​


> > +    if (vcpu_index < 0 || vcpu_index > num_vcpus)
> > +    {
>
> Libxl coding style normally has { in the same line of "if" "for" etc.
> Please
> check and fix other occurences.
>

​A quick question:
Should I use the style "if () { " for all files in the tool stack or just
in libxl files?

If I need to use this style in all tool stack files, I will check and
modify them. (Right now, I just made the correction for this exact patch.)


> > diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
> > index bfeb3bc..4657056 100644
> > --- a/tools/libxl/libxl.h
> > +++ b/tools/libxl/libxl.h
> > @@ -1240,6 +1240,13 @@ int libxl_sched_credit_params_set(libxl_ctx *ctx,
> uint32_t poolid,
> >  #define LIBXL_DOMAIN_SCHED_PARAM_LATENCY_DEFAULT   -1
> >  #define LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT -1
> >
> > +#define LIBXL_DOMAIN_SCHED_PARAM_BUDGET_DEFAULT     -1
> > +#define LIBXL_DOMAIN_SCHED_PARAM_VCPU_DEFAULT       -1
> > +#define LIBXL_DOMAIN_SCHED_PARAM_NUM_VCPUS_DEFAULT  -1
> > +#define LIBXL_DOMAIN_SCHED_PARAM_VCPU_INDEX_DEFAULT -1
> > +/* Consistent with XEN_LEGACY_MAX_VCPUS xen/arch-x86/xen.h*/
> > +#define LIBXL_XEN_LEGACY_MAX_VCPUS                  32
> > +
>
> Where is this macro used? I cannot find it in this one and following xl
> patch.
>
>
​My bad. This should exist any more since we dynamically allocate vcpus
structure based on the number of vcpus in a domain to display vcpus'
information.
Delete it now.

Thank you again for your useful comments, Wei!

Best,

Meng



-- 


-----------
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania

[-- Attachment #1.2: Type: text/html, Size: 4673 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-08-25 15:55 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-24 22:58 Introduce rt real-time scheduler for Xen Meng Xu
2014-08-24 22:58 ` [PATCH v1 1/4] xen: add real time scheduler rt Meng Xu
2014-08-26 14:27   ` Jan Beulich
2014-08-27  2:07     ` Meng Xu
2014-08-27  6:26       ` Jan Beulich
2014-08-27 14:28         ` Meng Xu
2014-08-27 15:04           ` Jan Beulich
2014-08-28 16:06             ` Meng Xu
2014-08-29  9:05               ` Jan Beulich
2014-08-29 19:35                 ` Meng Xu
2014-09-03 14:08                 ` George Dunlap
2014-09-03 14:24                   ` Meng Xu
2014-09-03 14:35                     ` Dario Faggioli
2014-09-03 13:40   ` George Dunlap
2014-09-03 14:11     ` Meng Xu
2014-09-03 14:15       ` George Dunlap
2014-09-03 14:35         ` Meng Xu
2014-09-05  9:46     ` Dario Faggioli
2014-09-03 14:20   ` George Dunlap
2014-09-03 14:45     ` Jan Beulich
2014-09-03 14:59     ` Dario Faggioli
2014-09-03 15:27       ` Meng Xu
2014-09-03 15:46         ` Dario Faggioli
2014-09-03 17:13           ` George Dunlap
2014-09-03 15:13     ` Meng Xu
2014-09-03 16:06       ` George Dunlap
2014-09-03 16:57         ` Dario Faggioli
2014-09-03 17:18           ` George Dunlap
2014-09-04  2:15             ` Meng Xu
2014-09-04 14:27             ` Dario Faggioli
2014-09-04 15:30               ` Meng Xu
2014-09-05  9:36                 ` Dario Faggioli
2014-09-05 15:06                   ` Meng Xu
2014-09-05 15:09                     ` Dario Faggioli
2014-09-04  2:11         ` Meng Xu
2014-09-04 11:00           ` Dario Faggioli
2014-09-04 13:03           ` George Dunlap
2014-09-04 14:00             ` Meng Xu
2014-09-05 17:17   ` Dario Faggioli
2014-09-07  3:56     ` Meng Xu
2014-09-08 10:33       ` Dario Faggioli
2014-09-09 13:43         ` Meng Xu
2014-08-24 22:58 ` [PATCH v1 2/4] libxc: add rt scheduler Meng Xu
2014-09-05 10:34   ` Dario Faggioli
2014-09-05 17:17     ` Meng Xu
2014-09-05 17:50       ` Dario Faggioli
2014-08-24 22:58 ` [PATCH v1 3/4] libxl: " Meng Xu
2014-08-25 13:17   ` Wei Liu
2014-08-25 15:55     ` Meng Xu [this message]
2014-08-26  9:51       ` Wei Liu
2014-09-03 15:33   ` George Dunlap
2014-09-03 20:52     ` Meng Xu
2014-09-04 14:27     ` George Dunlap
2014-09-04 14:45       ` Dario Faggioli
2014-09-04 14:47       ` Meng Xu
2014-09-04 14:51         ` George Dunlap
2014-09-04 15:07           ` Meng Xu
2014-09-04 15:44             ` Dario Faggioli
2014-09-04 15:55               ` George Dunlap
2014-09-04 16:12                 ` Meng Xu
2014-09-05  9:19                   ` Dario Faggioli
2014-09-04 15:25         ` Dario Faggioli
2014-09-05 10:21   ` Dario Faggioli
2014-09-05 15:45     ` Meng Xu
2014-09-05 17:41       ` Dario Faggioli
2014-08-24 22:58 ` [PATCH v1 4/4] xl: introduce " Meng Xu
2014-08-25 13:31   ` Wei Liu
2014-08-25 16:12     ` Meng Xu
2014-09-03 15:52   ` George Dunlap
2014-09-03 22:28     ` Meng Xu
2014-09-05  9:40       ` Dario Faggioli
2014-09-05 14:43         ` Meng Xu

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=CAENZ-+kf-Qh+1D8ax+0XzhsYeJDFZ1ZHm0r-_s3RVrw2+USu5A@mail.gmail.com \
    --to=xumengpanda@gmail.com \
    --cc=JBeulich@suse.com \
    --cc=chaowang@wustl.edu \
    --cc=dario.faggioli@citrix.com \
    --cc=dgolomb@seas.upenn.edu \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=lichong659@gmail.com \
    --cc=mengxu@cis.upenn.edu \
    --cc=stefano.stabellini@eu.citrix.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).