From: Dario Faggioli <dario.faggioli@citrix.com>
To: Meng Xu <xumengpanda@gmail.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>,
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: Fri, 5 Sep 2014 19:41:44 +0200 [thread overview]
Message-ID: <1409938904.16667.9.camel@Solace.lan> (raw)
In-Reply-To: <CAENZ-+kjCUhB1cJVPNq6-iVn_D0w4W__JmyPkoH9yTimhbHoWw@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 3894 bytes --]
On ven, 2014-09-05 at 11:45 -0400, Meng Xu wrote:
> 2014-09-05 6:21 GMT-04:00 Dario Faggioli <dario.faggioli@citrix.com>:
> > On dom, 2014-08-24 at 18:58 -0400, Meng Xu wrote:
> >> --- a/tools/libxl/libxl.c
> >> +++ b/tools/libxl/libxl.c
> >> @@ -5154,6 +5154,139 @@ static int sched_sedf_domain_set(libxl__gc *gc, uint32_t domid,
> >> return 0;
> >> }
> >>
> >> +static int sched_rt_domain_get(libxl__gc *gc, uint32_t domid,
> >> + libxl_domain_sched_params *scinfo)
> >> +{
> >> + struct xen_domctl_sched_rt_params* sdom;
> >> + uint16_t num_vcpus;
> >> + int rc, i;
> >> +
> >> + rc = xc_sched_rt_domain_get_num_vcpus(CTX->xch, domid, &num_vcpus);
> >> + if (rc != 0) {
> >> + LOGE(ERROR, "getting num_vcpus of domain sched rt");
> >> + return ERROR_FAIL;
> >> + }
> >>
> > As George pointed out already, you can get the num_vcpus via
> > xc_domain_getinfo().
> >
> > I agree with George's review about the rest of this function
> > (appropriately updated to take what we decided about the interface into
> > account :-) ).
> >
> >> +#define SCHED_RT_VCPU_PERIOD_MAX 31536000000000 /* one year in microsecond*/
> >> +#define SCHED_RT_VCPU_BUDGET_MAX SCHED_RT_VCPU_PERIOD_MAX
> >> +
> > This may be me not remembering correctly the outcome of a preceding
> > discussion... did we say we were going with _RT_ or with something like
> > _RTDS_ ?
> >
> > ISTR the latter...
>
> So I also need to change all RT to RT_DS in the tool stack, except
> keeping the command 'xl sched-rt'? If so, I will do that.
>
As I said in another email, the same reasons that called for renaming
inside Xen, applies to the other layers, I think.
I'm not sure about `xl sched-rt', but yes, I think that would be fine
like that. For one, xl interface/commands are not set in stone.
Moreover, when/if we'll have more policies, I think it could be fine to
add a new 'policy' parameter to `xl sched-rt', rather than adding
another `xl sched-xxx' thing.
But then again, we can decide this later.
> >
> > Also, macros like INT_MAX, UINT_MAX, etc., or << and ~ "tricks" are,
> > IMO, preferrable to the open coding of the value.
>
> What does open coding of the value mean? Do you mean (2^32-1) instead
> of 4294967295?
>
I mean use INT_MAX, UINT_MAX, or similar, if possible. :-)
> >
> > Finally, I wonder whether these would better live in some headers,
> > closer to the declaration of period and budget (where their type is also
> > visible) and, as a nice side effect of that, available to libxl callers
> > as well.
>
> I actually considered the possibility of adding it to
> xen/include/public/domctl.h, but other schedulers do not have such
> range macro in the domctl.h, so I'm not sure if it will cause
> inconsistence?
>
This is toolstack stuff, libxl stuff, to be more precise, so the public
header I'm mentioning is something like tools/libxl/libxl*.h.
> Yes. Now I didn't use any array in toolstack or kernel to set/get
> domain's parameters. So we don't use (budget == 0 && period == 0) to
> indicate the vcpus not changed. (Whenever user set a domain's vcpu's
> parameters, we set all vcpus' parameters of this domain, so we don't
> need such implication for 4.5 release. :-P) The array comes "only"
> when we allow users to set/get a specific vcpu's parameters and vcpus
> have different periods and budgets.
>
True. I was thinking at something different, but hey, let's see the new
version with the new interface implemented and comment on that! :-)
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
next prev parent reply other threads:[~2014-09-05 17:41 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
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 [this message]
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=1409938904.16667.9.camel@Solace.lan \
--to=dario.faggioli@citrix.com \
--cc=JBeulich@suse.com \
--cc=chaowang@wustl.edu \
--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=xen-devel@lists.xen.org \
--cc=xisisu@gmail.com \
--cc=xumengpanda@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).