[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] xen:rtds:Clear __RTDS_depleted bit once replenish vcpu
We should clear the __RTDS_depleted bit once a VCPU budget is replenished. Because repl_timer_handler may be called after rt_schedule but before rt_context_saved, the VCPU may be not on CPU or on queue when the VCPU is the middle of context switch Signed-off-by: Meng Xu <mengxu@xxxxxxxxxxxxx> --- Cc: Dario Faggioli <dario.faggioli@xxxxxxxxxx> Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx> Cc: Wei Liu <wei.liu2@xxxxxxxxxx> Cc: Linh Thi Xuan Phan <linhphan@xxxxxxxxxxxxx> Cc: Haoran Li <lihaoran@xxxxxxxxx> Cc: Meng Xu <xumengpanda@xxxxxxxxx> Cc: Dagaen Golomb <dgolomb@xxxxxxxxxxxxx> Cc: Tianyang Chen <tiche@xxxxxxxxxxxxx> --- 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 ff17bd2..16b5691 100644 --- a/xen/common/sched_rt.c +++ b/xen/common/sched_rt.c @@ -1488,8 +1488,8 @@ static void repl_timer_handler(void *data){ if ( svc->cur_deadline > next_on_runq->cur_deadline ) runq_tickle(ops, next_on_runq); } - else if ( vcpu_on_q(svc) && - __test_and_clear_bit(__RTDS_depleted, &svc->flags) ) + else if ( __test_and_clear_bit(__RTDS_depleted, &svc->flags) && + vcpu_on_q(svc) ) runq_tickle(ops, svc); list_del(&svc->replq_elem); -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |