Skip to content

Commit 503b71a

Browse files
JasonChenCJdbkinder
authored andcommitted
doc: add guideline for RTVM workload design
a quick guideline document help RTOS designer/developer to design RT workload based on RTVM Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
1 parent 93659f0 commit 503b71a

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
.. _rtvm_workload_guideline:
2+
3+
Real time VM application design guidelines
4+
##########################################
5+
6+
An RTOS developer must be aware of the differences between running applications on a native
7+
platform and a real time virtual machine (RTVM), especially issues impacting real time
8+
performance. For example, a real time thread should avoid triggering any VM-Exit. If a VM-Exit
9+
is triggered, the developer must account for an additional margin of CPU cycles for the
10+
incremental runtime overhead.
11+
12+
This document provides some application design guidelines when using an RTVM within the ACRN hypervisor.
13+
14+
Run RTVM with dedicated resources/devices
15+
*****************************************
16+
17+
For best practice, ACRN allocates dedicated CPU, memory resources, and cache resources (using Intel
18+
Cache Allocation Technology, aka CAT) to RTVMs. For best real time performance of I/O devices,
19+
we recommend using dedicated (pass-thru) PCIe devices to avoid VM-Exit at run time.
20+
21+
.. note::
22+
The configuration space for pass-thru PCI devices is still emulated and the accessing it will
23+
trigger a VM-Exit.
24+
25+
RTVM with virtio PMD (Polling Mode Driver) for I/O sharing
26+
**********************************************************
27+
28+
If the RTVM must use shared devices, we recommend using PMD drivers that can eliminate the
29+
unpredictable latency caused by guest I/O trap-and-emulate access. The RTVM application must be
30+
aware that the packets in the PMD driver may arrive or be sent later than expected.
31+
32+
RTVM with HV Emulated Device
33+
****************************
34+
35+
ACRN uses hypervisor emulated virtual UART (vUART) devices for inter-VM synchronization such as
36+
logging output, or command send/receive. Currently, the vUART only works in polling mode, but
37+
may be extended to support interrupt mode in a future release. In the meantime, for better RT
38+
behavior, the RT application using the vUART shall reserve a margin of CPU cycles to accommodate
39+
for the additional latency introduced by the VM-Exit to the vUART I/O registers (~2000--3000 cycles
40+
per register access).
41+
42+
DM emulated device (Except PMD)
43+
*******************************
44+
45+
We recommend **not** using DM-emulated devices in a RTVM.

0 commit comments

Comments
 (0)