From a418ec07cf2668197548c6503924139a2098e41d Mon Sep 17 00:00:00 2001 From: Meng Xu Date: Wed, 26 Oct 2016 15:06:29 -0400 Subject: [PATCH] xen: rtds: Update last_start whenever cur_budget is updated Make budget accounting code more consistent by making sure the values used to compute how much budget has been consumed are updated together. This makes code resilient to calling burn_budget() from more than just one place -- in case we will need to do that -- without risking subtle bugs. No functional changes are intended. Signed-off-by: Meng Xu Acked-by: Dario Faggioli Release-acked-by: Wei Liu --- xen/common/sched_rt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c index 2119199205..24b4b22a31 100644 --- a/xen/common/sched_rt.c +++ b/xen/common/sched_rt.c @@ -953,6 +953,7 @@ 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.39.5