xen:rtds: towards work conserving RTDS
authorMeng Xu <mengxu@cis.upenn.edu>
Tue, 10 Oct 2017 23:17:41 +0000 (19:17 -0400)
committerWei Liu <wei.liu2@citrix.com>
Wed, 11 Oct 2017 11:20:17 +0000 (12:20 +0100)
commit463b958317789db2bf9da0d9c3cd1f12a021957d
tree34fa43e99891a8cb63fff635fd0a5e0a58bb6ac9
parent5b42c82f5584ca8b0e169c6de1b6d81214ea07f2
xen:rtds: towards work conserving RTDS

Make RTDS scheduler work conserving without breaking the real-time guarantees.

VCPU model:
Each real-time VCPU is extended to have an extratime flag
and a priority_level field.
When a VCPU's budget is depleted in the current period,
if it has extratime flag set,
its priority_level will increase by 1 and its budget will be refilled;
othewrise, the VCPU will be moved to the depletedq.

Scheduling policy is modified global EDF:
A VCPU v1 has higher priority than another VCPU v2 if
(i) v1 has smaller priority_leve; or
(ii) v1 has the same priority_level but has a smaller deadline

Queue management:
Run queue holds VCPUs with extratime flag set and VCPUs with
remaining budget. Run queue is sorted in increasing order of VCPUs priorities.
Depleted queue holds VCPUs which have extratime flag cleared and depleted budget.
Replenished queue is not modified.

Distribution of spare bandwidth
Spare bandwidth is distributed among all VCPUs with extratime flag set,
proportional to these VCPUs utilizations

Signed-off-by: Meng Xu <mengxu@cis.upenn.edu>
Reviewed-by: Dario Faggioli <raistlin@linux.it>
xen/common/sched_rt.c
xen/include/public/domctl.h