xen/sched: add is_running indicator to struct sched_unit
authorJuergen Gross <jgross@suse.com>
Fri, 27 Sep 2019 07:00:17 +0000 (09:00 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 27 Sep 2019 13:22:11 +0000 (15:22 +0200)
commit6533eb52e064b333cb688ff0ec30e40e2338a63b
tree37ffd4c8de987a36dfdd70bfd974b19465f18035
parentc7591deba8299bb39acd8e2efc63c28c7b23243b
xen/sched: add is_running indicator to struct sched_unit

Add an is_running indicator to struct sched_unit which will be set
whenever the unit is being scheduled. Switch scheduler code to use
unit->is_running instead of vcpu->is_running for scheduling decisions.

At the same time introduce a state_entry_time field in struct
sched_unit being updated whenever the is_running indicator is changed.
Use that new field in the schedulers instead of the similar vcpu field.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
xen/common/sched_credit.c
xen/common/sched_credit2.c
xen/common/sched_rt.c
xen/common/schedule.c
xen/include/xen/sched.h