From: Meng Xu <mengxu@cis.upenn.edu>
To: xen-devel@lists.xenproject.org
Cc: wei.liu2@citrix.com, george.dunlap@eu.citrix.com,
dario.faggioli@citrix.com, ian.jackson@eu.citrix.com,
xumengpanda@gmail.com, Meng Xu <mengxu@cis.upenn.edu>
Subject: [PATCH RFC v1 2/3] libxl: enable per-VCPU work conserving flag for RTDS
Date: Tue, 1 Aug 2017 14:33:53 -0400 [thread overview]
Message-ID: <1501612434-5803-3-git-send-email-mengxu@cis.upenn.edu> (raw)
In-Reply-To: <1501612434-5803-1-git-send-email-mengxu@cis.upenn.edu>
Modify libxl_vcpu_sched_params_get/set and sched_rtds_vcpu_get/set
functions to support per-VCPU work conserving flag
Signed-off-by: Meng Xu <mengxu@cis.upenn.edu>
---
tools/libxl/libxl.h | 1 +
tools/libxl/libxl_sched.c | 3 +++
tools/libxl/libxl_types.idl | 2 ++
3 files changed, 6 insertions(+)
diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
index 7cf0f31..dd9c926 100644
--- a/tools/libxl/libxl.h
+++ b/tools/libxl/libxl.h
@@ -2058,6 +2058,7 @@ int libxl_sched_credit2_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_IS_WORK_CONSERVING_DEFAULT -1
/* Per-VCPU parameters */
#define LIBXL_SCHED_PARAM_VCPU_INDEX_DEFAULT -1
diff --git a/tools/libxl/libxl_sched.c b/tools/libxl/libxl_sched.c
index faa604e..fe92747 100644
--- a/tools/libxl/libxl_sched.c
+++ b/tools/libxl/libxl_sched.c
@@ -558,6 +558,7 @@ static int sched_rtds_vcpu_get_all(libxl__gc *gc, uint32_t domid,
for (i = 0; i < num_vcpus; i++) {
scinfo->vcpus[i].period = vcpus[i].u.rtds.period;
scinfo->vcpus[i].budget = vcpus[i].u.rtds.budget;
+ scinfo->vcpus[i].is_work_conserving = vcpus[i].u.rtds.is_work_conserving;
scinfo->vcpus[i].vcpuid = vcpus[i].vcpuid;
}
rc = 0;
@@ -607,6 +608,7 @@ static int sched_rtds_vcpu_set(libxl__gc *gc, uint32_t domid,
vcpus[i].vcpuid = scinfo->vcpus[i].vcpuid;
vcpus[i].u.rtds.period = scinfo->vcpus[i].period;
vcpus[i].u.rtds.budget = scinfo->vcpus[i].budget;
+ vcpus[i].u.rtds.is_work_conserving = scinfo->vcpus[i].is_work_conserving;
}
r = xc_sched_rtds_vcpu_set(CTX->xch, domid,
@@ -655,6 +657,7 @@ static int sched_rtds_vcpu_set_all(libxl__gc *gc, uint32_t domid,
vcpus[i].vcpuid = i;
vcpus[i].u.rtds.period = scinfo->vcpus[0].period;
vcpus[i].u.rtds.budget = scinfo->vcpus[0].budget;
+ vcpus[i].u.rtds.is_work_conserving = scinfo->vcpus[0].is_work_conserving;
}
r = xc_sched_rtds_vcpu_set(CTX->xch, domid,
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 8a9849c..f6c3ead 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -401,6 +401,7 @@ libxl_sched_params = Struct("sched_params",[
("period", integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT'}),
("extratime", integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT'}),
("budget", integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_BUDGET_DEFAULT'}),
+ ("is_work_conserving", integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_IS_WORK_CONSERVING_DEFAULT'}),
])
libxl_vcpu_sched_params = Struct("vcpu_sched_params",[
@@ -414,6 +415,7 @@ libxl_domain_sched_params = Struct("domain_sched_params",[
("cap", integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_CAP_DEFAULT'}),
("period", integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_PERIOD_DEFAULT'}),
("budget", integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_BUDGET_DEFAULT'}),
+ ("is_work_conserving", integer, {'init_val': 'LIBXL_DOMAIN_SCHED_PARAM_IS_WORK_CONSERVING_DEFAULT'}),
# The following three parameters ('slice', 'latency' and 'extratime') are deprecated,
# and will have no effect if used, since the SEDF scheduler has been removed.
--
1.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-08-01 18:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-01 18:33 [PATCH RFC v1 0/3] Enable XL to set and get per-VCPU work conserving flag for RTDS scheduler Meng Xu
2017-08-01 18:33 ` [PATCH RFC v1 1/3] xen:rtds: enable XL to set and get vcpu work conserving flag Meng Xu
2017-08-03 15:47 ` Dario Faggioli
2017-08-03 15:53 ` Meng Xu
2017-08-01 18:33 ` Meng Xu [this message]
2017-08-03 15:53 ` [PATCH RFC v1 2/3] libxl: enable per-VCPU work conserving flag for RTDS Dario Faggioli
2017-08-03 21:39 ` Meng Xu
2017-08-04 8:13 ` Dario Faggioli
2017-08-04 12:10 ` Wei Liu
2017-08-04 12:53 ` Dario Faggioli
2017-08-04 14:34 ` Wei Liu
2017-08-04 20:47 ` Dario Faggioli
2017-08-04 21:01 ` Meng Xu
2017-08-04 12:10 ` Wei Liu
2017-08-01 18:33 ` [PATCH RFC v1 3/3] xl: " Meng Xu
2017-08-03 16:03 ` Dario Faggioli
2017-08-03 22:02 ` Meng Xu
2017-08-04 9:01 ` Dario Faggioli
2017-08-04 20:56 ` Meng Xu
2017-08-01 19:08 ` [PATCH RFC v1 0/3] Enable XL to set and get per-VCPU work conserving flag for RTDS scheduler Meng Xu
2017-08-02 17:49 ` Dario Faggioli
2017-08-03 2:33 ` 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=1501612434-5803-3-git-send-email-mengxu@cis.upenn.edu \
--to=mengxu@cis.upenn.edu \
--cc=dario.faggioli@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
--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).