From: Meng Xu <mengxu@cis.upenn.edu>
To: xen-devel@lists.xen.org
Cc: george.dunlap@eu.citrix.com, dario.faggioli@citrix.com,
ian.jackson@eu.citrix.com, xumengpanda@gmail.com,
Meng Xu <mengxu@cis.upenn.edu>,
wei.liu@citrix.com
Subject: [PATCH v1 2/3] libxl: enable per-VCPU extratime flag for RTDS
Date: Sun, 6 Aug 2017 12:22:42 -0400 [thread overview]
Message-ID: <1502036563-4275-3-git-send-email-mengxu@cis.upenn.edu> (raw)
In-Reply-To: <1502036563-4275-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 extratime flag
Signed-off-by: Meng Xu <mengxu@cis.upenn.edu>
---
Changes from RFC v1
Change work_conserving flag to extratime flag
---
tools/libxl/libxl_sched.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tools/libxl/libxl_sched.c b/tools/libxl/libxl_sched.c
index faa604e..4ebed96 100644
--- a/tools/libxl/libxl_sched.c
+++ b/tools/libxl/libxl_sched.c
@@ -558,6 +558,10 @@ 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;
+ if ( vcpus[i].u.rtds.flags & XEN_DOMCTL_SCHED_RTDS_extratime )
+ scinfo->vcpus[i].extratime = 1;
+ else
+ scinfo->vcpus[i].extratime = 0;
scinfo->vcpus[i].vcpuid = vcpus[i].vcpuid;
}
rc = 0;
@@ -607,6 +611,10 @@ 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;
+ if ( scinfo->vcpus[i].extratime )
+ vcpus[i].u.rtds.flags |= XEN_DOMCTL_SCHED_RTDS_extratime;
+ else
+ vcpus[i].u.rtds.flags &= ~XEN_DOMCTL_SCHED_RTDS_extratime;
}
r = xc_sched_rtds_vcpu_set(CTX->xch, domid,
@@ -655,6 +663,10 @@ 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;
+ if ( scinfo->vcpus[0].extratime )
+ vcpus[i].u.rtds.flags |= XEN_DOMCTL_SCHED_RTDS_extratime;
+ else
+ vcpus[i].u.rtds.flags &= ~XEN_DOMCTL_SCHED_RTDS_extratime;
}
r = xc_sched_rtds_vcpu_set(CTX->xch, domid,
--
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-06 16:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-06 16:22 [PATCH v1 0/3] Towards work-conserving RTDS Meng Xu
2017-08-06 16:22 ` [PATCH v1 1/3] xen:rtds: towards work conserving RTDS Meng Xu
2017-08-08 14:57 ` Dario Faggioli
2017-08-08 19:06 ` Meng Xu
2017-08-08 22:52 ` Dario Faggioli
2017-08-08 22:56 ` Meng Xu
2017-08-06 16:22 ` Meng Xu [this message]
2017-08-08 15:37 ` [PATCH v1 2/3] libxl: enable per-VCPU extratime flag for RTDS Dario Faggioli
2017-08-06 16:22 ` [PATCH v1 3/3] xl: " Meng Xu
2017-08-07 2:43 ` Meng Xu
2017-08-08 16:09 ` Dario Faggioli
2017-08-08 19:16 ` Meng Xu
2017-08-08 22:24 ` Dario Faggioli
2017-08-08 22:55 ` Meng Xu
2017-08-09 10:32 ` Dario Faggioli
2017-08-09 17:12 ` Meng Xu
2017-08-08 22:54 ` [PATCH v1 0/3] Towards work-conserving RTDS Dario Faggioli
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=1502036563-4275-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.liu@citrix.com \
--cc=xen-devel@lists.xen.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).