From: Chong Li <lichong659@gmail.com>
To: xen-devel@lists.xen.org
Cc: Chong Li <chong.li@wustl.edu>,
wei.liu2@citrix.com, george.dunlap@eu.citrix.com,
dario.faggioli@citrix.com, mengxu@cis.upenn.edu,
jbeulich@suse.com, lichong659@gmail.com, dgolomb@seas.upenn.edu
Subject: [PATCH v1 0/4] Enabling XL to set per-VCPU parameters of a domain for RTDS scheduler
Date: Thu, 7 May 2015 12:05:21 -0500 [thread overview]
Message-ID: <1431018326-3239-1-git-send-email-chong.li@wustl.edu> (raw)
[Goal]
The current xl sched-rtds tool can only set the VCPUs of a domain to the same parameter
although the scheduler supports VCPUs with different parameters. This patchset is to
enable xl sched-rtds tool to configure the VCPUs of a domain with different parameters.
This per-VCPU settings can be used in many scenarios. For example, based on Dario's statement in our pervious discussion(http://lists.xen.org/archives/html/xen-devel/2014-09/msg00423.html), if there are two real-time applications, which have different timing requirements, running in a multi-VCPU guest domain, it is beneficial to pin these two applications to two seperate VCPUs with different scheduling parameters.
What this patchset includes is a wanted and planned feature for RTDS scheudler(http://wiki.xenproject.org/wiki/RTDS-Based-Scheduler) in Xen 4.6. The interface design of the xl sched-rtds tool is based on Meng's previous discussion with Dario, George and Wei(http://lists.xen.org/archives/html/xen-devel/2015-02/msg02606.html). Basically, there are two main changes:
1) in xl, we create an array that records all VCPUs whose parameters are about to change.
2) in libxl, we receive the array and call different xc functions to handle it.
3) in xen and libxc, we use XEN_DOMCTL_SCHEDOP_getvcpuinfo/putvcpuinfo(introduced by this patchset) as the hypercall for per-VCPU operations(get/set method).
[Usage]
With this patchset in use, xl sched-rtds tool can:
1) show the budget and period of each VCPU of each domain, by using "xl sched-rtds" command. An example would be like:
# xl sched-rtds
Cpupool Pool-0: sched=RTDS
Name ID VCPU Period Budget
Domain-0 0 0 10000 4000
vm1 1 0 1000 500
vm1 1 1 2000 1000
vm2 2 0 4000 4000
vm2 2 1 10000 4000
2) show the budget and period of each VCPU of a specific domain, by using,
e.g., "xl sched-rtds -d vm1" command. The output would be like:
# xl sched-rtds -d vm1
Name ID VCPU Period Budget
vm1 1 0 1000 500
vm1 1 1 2000 1000
3) set the budget and period of each VCPU of a specific domain, by using,
e.g., "xl sched-rtds -d vm1 -v 0 -p 100 -b 50" command (where "-v 0" specifies
the VCPU with ID=0). The parameters would be like:
# xl sched-rtds -d vm1
Name ID VCPU Period Budget
vm1 1 0 100 50
vm1 1 1 2000 1000
Users can also set the budget and period of multiple VCPUs of a specific domain
with only one command, e.g., "xl sched-rtds -d vm1 -v 0 -p 100 -b 50 -v 1 -p 300 -b 150".
The parameters would be like:
# xl sched-rtds -d vm1
Name ID VCPU Period Budget
vm1 1 0 200 100
vm1 1 1 300 150
4) Users can still set the per-domain parameters (previous xl rtds tool already supported this).
e.g., "xl sched-rtds -d vm1 -p 500 -b 250". The parameters would be like:
# xl sched-rtds -d vm1
Name ID VCPU Period Budget
vm1 1 0 500 250
vm1 1 1 500 250
Chong Li (4):
xen: enabling XL to set per-VCPU parameters of a domain for RTDS
scheduler
libxc: enabling XL to set per-VCPU parameters of a domain for RTDS
scheduler
libxl: enabling XL to set per-VCPU parameters of a domain for RTDS
scheduler
xl: enabling XL to set per-VCPU parameters of a domain for RTDS
scheduler
tools/libxc/include/xenctrl.h | 9 +++
tools/libxc/xc_rt.c | 52 +++++++++++++++
tools/libxl/libxl.c | 143 ++++++++++++++++++++++++++++++++----------
tools/libxl/libxl.h | 6 ++
tools/libxl/libxl_types.idl | 11 ++++
tools/libxl/xl_cmdimpl.c | 131 +++++++++++++++++++++++++++++---------
xen/common/sched_rt.c | 64 +++++++++++++++++++
xen/common/schedule.c | 4 +-
xen/include/public/domctl.h | 22 ++++++-
9 files changed, 376 insertions(+), 66 deletions(-)
--
1.9.1
next reply other threads:[~2015-05-07 17:05 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-07 17:05 Chong Li [this message]
2015-05-07 17:05 ` [PATCH v1 1/4] xen: enabling XL to set per-VCPU parameters of a domain for RTDS scheduler Chong Li
2015-05-08 7:49 ` Jan Beulich
2015-05-10 22:04 ` Chong Li
2015-05-11 6:57 ` Jan Beulich
2015-05-14 22:27 ` Chong Li
2015-05-15 14:42 ` Dario Faggioli
2015-05-11 13:11 ` Dario Faggioli
2015-05-14 22:15 ` Chong Li
2015-05-07 17:05 ` [PATCH v1 2/4] libxc: " Chong Li
2015-05-11 13:27 ` Dario Faggioli
2015-05-07 17:05 ` [PATCH v1 3/4] libxl: " Chong Li
2015-05-11 14:06 ` Dario Faggioli
2015-05-15 15:24 ` Chong Li
2015-05-15 23:09 ` Dario Faggioli
2015-05-12 10:01 ` Dario Faggioli
2015-05-15 16:35 ` Chong Li
2015-05-15 23:02 ` Dario Faggioli
2015-05-22 17:57 ` Chong Li
2015-05-07 17:05 ` [PATCH v1 4/4] xl: " Chong Li
2015-05-14 14:24 ` Meng Xu
2015-05-14 14:39 ` Dario Faggioli
2015-05-14 14:43 ` Meng Xu
2015-05-11 9:56 ` [PATCH v1 0/4] Enabling " Dario Faggioli
2015-05-14 17:08 ` Chong Li
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=1431018326-3239-1-git-send-email-chong.li@wustl.edu \
--to=lichong659@gmail.com \
--cc=chong.li@wustl.edu \
--cc=dario.faggioli@citrix.com \
--cc=dgolomb@seas.upenn.edu \
--cc=george.dunlap@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=mengxu@cis.upenn.edu \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/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).