acrn-hypervisor/hypervisor/common
Conghui 8c13ff78f9 hv: sched: fix bug when reboot vm
BVT schedule rule:
When a new thread is wakeup and added to runqueue, it will get the
smallest avt (svt) from runqueue to initiate its avt. If the svt is
small than it's avt, it will keep the original avt.

For the reboot issue, when the VM is reboot, it means a new vcpu thread
is wakeup, but at this time, the Service VM's vcpu thread is blocked,
and removed from the runqueue, and the runqueue is empty, so the svt is
0. The new vcpu thread will get avt=0. avt=0 means very high priority,
and can run for a very long time until it catchup with other thread's
avt in runqueue.
At this time, when Service VM's vcpu thread wakeup, it will check the
svt, but the svt is very small, so will not update it's avt according to
the rule, thus has a very low priority and cannot be scheduled.

To fix it, adjust the new thread's avt when there is another thread in
runqueue.

Tracked-On: #7692
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-06-07 11:20:21 +08:00
..
delay.c hv/mod_timer: separate delay functions from the timer module 2021-05-18 16:43:28 +08:00
efi_mmap.c HV: fix build issue on RELEASE version 2021-11-16 19:01:44 +08:00
event.c Remove "All rights reserved" string headers 2022-04-06 13:21:02 +08:00
hv_main.c Remove "All rights reserved" string headers 2022-04-06 13:21:02 +08:00
hypercall.c Remove "All rights reserved" string headers 2022-04-06 13:21:02 +08:00
irq.c Remove "All rights reserved" string headers 2022-04-06 13:21:02 +08:00
ptdev.c hv: ptdev: address vector scalability problem by interrupt posting 2022-04-19 14:54:04 +08:00
sched_bvt.c hv: sched: fix bug when reboot vm 2022-06-07 11:20:21 +08:00
sched_iorr.c Remove "All rights reserved" string headers 2022-04-06 13:21:02 +08:00
sched_noop.c Remove "All rights reserved" string headers 2022-04-06 13:21:02 +08:00
sched_prio.c hv: add priority based scheduler 2021-09-24 09:32:18 +08:00
schedule.c Remove "All rights reserved" string headers 2022-04-06 13:21:02 +08:00
softirq.c Remove "All rights reserved" string headers 2022-04-06 13:21:02 +08:00
ticks.c hv/mod_timer: split tsc handling code from timer. 2021-05-18 16:43:28 +08:00
timer.c Remove "All rights reserved" string headers 2022-04-06 13:21:02 +08:00
trusty_hypercall.c Remove "All rights reserved" string headers 2022-04-06 13:21:02 +08:00
vm_load.c Remove "All rights reserved" string headers 2022-04-06 13:21:02 +08:00