|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC 6/9] sched:rtds: get guest time from time accounting code
From: Andrii Anisov <andrii_anisov@xxxxxxxx>
While the RTDS scheduler code does not use guest time from the
other pcpu, we are free to go with lockless time accounting.
Signed-off-by: Andrii Anisov <andrii_anisov@xxxxxxxx>
---
xen/common/sched_rt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c
index e0e350b..2ce200b 100644
--- a/xen/common/sched_rt.c
+++ b/xen/common/sched_rt.c
@@ -945,8 +945,9 @@ burn_budget(const struct scheduler *ops, struct rt_vcpu
*svc, s_time_t now)
if ( is_idle_vcpu(svc->vcpu) )
return;
+ ASSERT(svc->vcpu == current);
/* burn at nanoseconds level */
- delta = now - svc->last_start;
+ delta = tacc_get_guest_time_delta();
/*
* delta < 0 only happens in nested virtualization;
* TODO: how should we handle delta < 0 in a better way?
@@ -960,7 +961,6 @@ burn_budget(const struct scheduler *ops, struct rt_vcpu
*svc, s_time_t now)
}
svc->cur_budget -= delta;
- svc->last_start = now;
if ( svc->cur_budget <= 0 )
{
--
2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |