xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen:rtds: Update last_start whenever cur_budget is updated
@ 2016-10-26 19:06 Meng Xu
  2016-10-27  9:14 ` Dario Faggioli
  0 siblings, 1 reply; 6+ messages in thread
From: Meng Xu @ 2016-10-26 19:06 UTC (permalink / raw)
  To: xen-devel
  Cc: Wei Liu, Dagaen Golomb, George Dunlap, Haoran Li, Dario Faggioli,
	Linh Thi Xuan Phan, Meng Xu, Meng Xu, Tianyang Chen

We keep last_start updated whenever cur_budget is updated.
This avoids subtle bugs in case burn_budget() will be called
in other places in the future.

Signed-off-by: Meng Xu <mengxu@cis.upenn.edu>
---
Cc: Dario Faggioli <dario.faggioli@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Linh Thi Xuan Phan <linhphan@cis.upenn.edu>
Cc: Haoran Li <lihaoran@wustl.edu>
Cc: Meng Xu <xumengpanda@gmail.com>
Cc: Dagaen Golomb <dgolomb@cis.upenn.edu>
Cc: Tianyang Chen <tiche@cis.upenn.edu>
---
 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 4b4f232..434b773 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 )
     {
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-10-27 13:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-26 19:06 [PATCH] xen:rtds: Update last_start whenever cur_budget is updated Meng Xu
2016-10-27  9:14 ` Dario Faggioli
2016-10-27 10:03   ` Wei Liu
2016-10-27 13:40     ` Meng Xu
2016-10-27 13:42     ` Meng Xu
2016-10-27 13:43       ` Wei Liu

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).