acrn-hypervisor/hypervisor
Conghui 51e6dc5864 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
smaller than it's avt, it will keep the original avt. With the svt, it
can prevent a thread from claiming an excessive share of CPU after
sleepting for a long time.

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 catch up 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, update svt in pick_next handler to make sure svt is align
with the avt of the first obj in runqueue.

Tracked-On: #7944
Signed-off-by: Conghui <conghui.chen@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
2022-08-05 02:39:54 +08:00
..
acpi_parser Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
arch/x86 hv: shell: improve console to modify input easier 2022-07-28 23:31:43 +08:00
boot hv: tsc: calibrate TSC by HPET 2022-07-17 16:48:47 +08:00
bsp/ld HV: fix MISRA violation of _ld_ram_xxx 2021-11-26 16:45:17 +08:00
common hv: sched: fix bug when reboot vm 2022-08-05 02:39:54 +08:00
debug hv: shell: improve console to modify input easier 2022-07-28 23:31:43 +08:00
dm hv: validate inputs in vpci_mmio_cfg_access 2022-07-29 10:30:08 +08:00
hw Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
include hv: sched: fix bug when reboot vm 2022-08-05 02:39:54 +08:00
lib Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
quirks Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
release Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
scripts Update copyright year range in code headers 2022-07-15 11:48:35 +08:00
Makefile config_tools: verify "iasl" version against IASL_MIN_VER 2022-07-13 14:01:01 +08:00
README.rst doc: fix utf-8 punctuation, branding, spelling 2019-03-14 09:13:58 -07:00

README.rst

ACRN Hypervisor
###############

The open source `Project ACRN`_ defines a device hypervisor reference stack and
an architecture for running multiple software subsystems, managed securely, on
a consolidated system by means of a virtual machine manager. It also defines a
reference framework implementation for virtual device emulation, called the
"ACRN Device Model".

The ACRN Hypervisor is a Type 1 reference hypervisor stack, running directly on
the bare-metal hardware, and is suitable for a variety of IoT and embedded
device solutions. The ACRN hypervisor addresses the gap that currently exists
between datacenter hypervisors, and hard partitioning hypervisors. The ACRN
hypervisor architecture partitions the system into different functional
domains, with carefully selected guest OS sharing optimizations for IoT and
embedded devices.

You can find out more about Project ACRN on the `Project ACRN documentation`_
website.

.. _`Project ACRN`: https://projectacrn.org
.. _`ACRN Hypervisor`: https://github.com/projectacrn/acrn-hypervisor
.. _`Project ACRN documentation`: https://projectacrn.github.io/