vmPTP: Precise Time Protocol for Inter-VM Communication in Embedded Virtualized Systems
System virtualization techniques are gradually applied to embedded systems with the performance improvement of embedded devices; however, there is a large time offset (i.e., deviation) of hundreds of ms between virtual machines (VMs) due to the drift of the virtualization abstraction layer and the jitter phenomenon. It is urgent to significantly reduce this offset by time synchronization techniques. Unfortunately, the current mainstream time synchronization software (e.g., Chrony and LinuxPTP) cannot be used in the embedded virtualized system connected by the fieldbus, such as controller area network (CAN); meanwhile, drift correction-based time synchronization techniques dedicated to CAN bus cannot be utilized for virtualized systems. In this study, we design a general vmPTP, which is a precise time protocol (PTP) for inter-VM communication in embedded virtualized systems based on Linux kernel-based VM (KVM). This is the first time synchronization work focused on embedded virtualized systems. We implement two vmPTP versions based on VirtIO and inter-VM shared memory (IVSHMEM) according to the four message (i.e., packet) exchanges of PTP. We propose an asymmetry compensation strategy to solve the problem of asymmetric rate of I/O operations in the message exchange process, which optimizes the offset computation. We further produce a convergence stopping approach which can continuously converge the offset until the offset is within the given bound and stop. We conduct experimental evaluations on both X86-64 and ARM64 architectures. For two versions of vmPTP, the experimental results show that: 1) the offsets are always within <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <tex-math notation="LaTeX">$1~{\mu }$ </tex-math></inline-formula>s on two architectures; 2) the offsets are less than that of LinuxPTP and Chrony; and 3) the vmPTP’s CPU and memory utilization on the X86-64 architecture are merely 0.3% and 0.1%, respectively, whereas those on the ARM64 architecture are 3.8% and 0.1%, respectively. We experiment with vmPTP in real-time application and the result demonstrates that vmPTP is feasible and reliable in the real platform.
Authors
- Wenhong Ma (ORCID: https://orcid.org/0000-0001-7289-4734)
- Guoqi Xie (ORCID: https://orcid.org/0000-0001-6625-0350)
- Wei Ren (ORCID: https://orcid.org/0000-0003-4869-2731)
- Sirong Zhao (ORCID: https://orcid.org/0000-0003-3363-4192)
- Kenli Li (ORCID: https://orcid.org/0000-0002-2635-7716)
Institutions
- Hunan University (CN)
- Huawei Technologies (China) (CN)
Publication Details
- Journal
- IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems
- Published
- 2024-08-26
- DOI
- https://doi.org/10.1109/tcad.2024.3450411
- Primary Topic
- Network Time Synchronization Technologies
- Type
- article
- Field-Weighted Citation Impact
- 0.00