From: Meng Xu <xumengpanda@gmail.com>
To: Jan Beulich <JBeulich@suse.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>,
Linh Thi Xuan Phan <ptxlinh@gmail.com>,
Meng Xu <mengxu@cis.upenn.edu>, Chao Wang <chaowang@wustl.edu>,
Chong Li <lichong659@gmail.com>,
Dagaen Golomb <dgolomb@seas.upenn.edu>
Subject: Re: [PATCH v1 1/4] xen: add real time scheduler rt
Date: Wed, 27 Aug 2014 10:28:10 -0400 [thread overview]
Message-ID: <CAENZ-+=yN6XAKPGKqfFM2sp2OCHAXCS8NmLS1fUh7PtbGgzpig@mail.gmail.com> (raw)
In-Reply-To: <53FD963B020000780002DED0@mail.emea.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 5964 bytes --]
Hi Jan,
2014-08-27 2:26 GMT-04:00 Jan Beulich <JBeulich@suse.com>:
> >>> On 27.08.14 at 04:07, <xumengpanda@gmail.com> wrote:
> >> > + /* get vcpus' params */
> >> > + XEN_GUEST_HANDLE_64(xen_domctl_sched_rt_params_t) vcpu;
> >>
> >> Why does this need to be a handle? Do you permit setting these
> >> to different values for different vCPU-s? Considering that other
> >> schedulers don't do this, why does yours need to?
> >>
> >
> > Yes, we need a handler here to get each vcpu's parameters of a domain.
> >
> > let me explain why we need to set and get the parameters of "each" vcpu:
> > 1) A VCPU is the basic scheduling and accounting unit in the Global
> > Earliest Deadline First (gEDF) scheduling. We account the budget
> > consumption for each vcpu instead of each domain, while the credit or
> > credit2 scheduler account the credit consumption for each domain.
> > 2) Based on the Global Earliest Deadline First (gEDF) scheduling theory,
> > each vcpu's parameter will be used to decide the scheduling sequence of
> > these vcpus. Two vcpus with same utilization but different period and
> > budget can be scheduled differently. For example, the vcpu with budget
> > 10ms and period 20ms is less responsive than the vcpu with budget 2ms and
> > period 8ms, although they have the same utilization 0.5.
> >
> > Therefore, a domain's real-time performance is based on the parameters of
> > each VCPU of this domain.
> > Hence, users need to be able to set and get each vcpu's parameters of a
> > domain.
> >
> > This gEDF scheduler is different from the credit and credit2 schedulers.
> > The existing credit and credit2 scheduler account the credit for each
> > domain, instead of each vcpu, that's why they set parameter per domain
> > instead of per vcpu.
>
> Parameter setting and accounting aren't tied together, and both
> credit schedulers account on a per-vCPU basis afaict. Hence this
> doesn't really answer the question.
>
Let's me explain in another short and clearer way.
Because each vcpu's parameters can affect the scheduling sequence and thus
affect the real-time performance of a domain, users may want to know what
is the parameters of each vcpu of each domain so that they can have an
intuition of how the vcpus will be scheduled. (Do you agree? :-))
Users may also need to set each VCPU's parameter of a domain to achieve
their desired real-time performance for this domain. After they set a
vcpu's parameter of a domain, they need to have a way to check the new
parameters of this vcpu of this domain. right?
Because of the above two scenarios, users need to know each vcpu's
parameters of a domain. So we need the handler to pass each vcpu's
parameters from kernel to userspace to show to users.
One thing to note is that: this handler is only used to get each vcpu's
parameters of a domain. We don't need this handler to set a vcpu's
parameter.
> > In my memory, we had such discussion on this question in the mailing list
> > after the first RFC patch of this rt scheduler was released. We agreed
> that
> > the real-time scheduler should supports setting and getting each vcpu's
> > parameters. :-)
>
> If so, can you point me to the specific mails rather than have me go
> dig for them?
>
Sure! My bad.
We had a long discussion of the design of this functionality of getting
each vcpu's parameters. It's here:
http://www.gossamer-threads.com/lists/xen/devel/339146
Another thread that discusses the interface for improved SEDF also
discusses the idea of getting/setting each vcpu's parameters for a
real-time scheduler. This rt scheduler is supposed to replace the existing
SEDF scheduler.
Here is the link to this thread:
http://www.gossamer-threads.com/lists/xen/devel/339056
I extract the interesting part related to this question:
Quote from Dario
:
"I don't
think the renaming+SEDF deprecation should happen until proper SMP
support is implemented, and probably also not until support for per-VCPU
scheduling parameters (quite important for an advanced real-time
scheduling solution) is there."
"The problems SEDF has are:
1. it has really really really poor SMP support
2. it does not allow to specify scheduling parameters on a per-VCPU
basis, but only on a domain basis. This is fine for general purpose
schedulers, but can be quite important in real-time workloads "
Please let me know if you have further questions. Maybe Dario could also
give more insight on this, later. :-)
> >> > + uint16_t nr_vcpus;
> >> > + /* set one vcpu's params */
> >> > + uint16_t vcpu_index;
> >> > + uint16_t padding[2];
> >> > + uint64_t period;
> >> > + uint64_t budget;
> >>
> >> Are values overflowing 32 bits here really useful/meaningful?
> >>
> >
> > W
> > e allow the period and budget to be at most 31536000000000 (which is one
> > year in microsecond) in the libxl.c. 31536000000000 is larger than 2^32
> > =4294967296. So we have to use 64bit type here for period and budget.
> >
> > In addition, This is consistent with the period and budget type s_time_t
> > in the kernel space. In the kernel space (sched_rt.c), we represent the
> > period and budget in the type s_time_t, which is signed 64bit. So we use
> > the uint64_t for period and budget here to avoid some type conversion.
>
> Neither of this answers the question: Is this really a useful value
> range?
>
I see the issue. Is 31536000000000 a good upper bound for period and
budget?
Actually, I'm not sure. This totally depends on users' requirement.
4294967296us = 1.19hour. I'm not sure 1.19hour should be long enough for
real-time applications?
If it's enough, I can definitely change the type from uint64 to uint32.
Do you have any suggestion of how we can get a proper upper bound for
period and budget?
Thank you very much!
Best,
Meng
--
-----------
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
[-- Attachment #1.2: Type: text/html, Size: 9709 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-08-27 14:28 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 [this message]
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
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-+=yN6XAKPGKqfFM2sp2OCHAXCS8NmLS1fUh7PtbGgzpig@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=ptxlinh@gmail.com \
--cc=stefano.stabellini@eu.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).