翻译自:Virtualization and Performance: Understanding VM Exits

出于对特定指令 或 特定事件(eg.  page fault)的响应而导致的VM Exit(虚拟机退出)是造成虚拟化系统性能下降的主要原因。但是你有没有想过,为什么会这样?无论出于什么原因,VM Exit的背后究竟发生了什么?

VM Exit意味着从当前运行的VM 到 VMM之间存在一个转换点,而VMM出于特定原因必须执行系统控制。通常,处理器必须保存VM退出时运行状态的快照。对于英特尔架构,大概有如下几步:

  1. 在VM-exit information fields 处记录导致VM Eixt的信息(包括exit reason, exit qualification, guest address),并更新VM-entry control fields.
  2. 保存处于Guest Mode状态下的CPU状态,包括control registers(控制寄存器), debug registers(调试寄存器), MSRs  segment registers(段寄存器), descriptor-table registers, RIP, RSP, and RFLAGS, 以及非状态寄存器。
  3. MSRs  用于控制报告处理器性能,将MSRs  保存到VM-exit MSR-store area
  4. 根据host-state area和一些VM-exit controls加载processor state,包括control registers, debug registers, MSRs, host table and descriptor-table registers, RIP, RSP, and RFLAGS, page-directory pointer table entries, as well as non-register state.
  5. 从VM-exit MSR-store area加载MSRs

哦,不要忘记在VMM执行了系统管理功能之后,将执行相应的VM entry,将处理器控制从VMM转移到VM!

现在,您可以看到为什么VM退出会产生相当大的开销,为单个转换(VM到VMM)浪费数百或数千个CPU周期。 顺便说一下,为了缓解这个问题,Intel付出了相当大的努力减少了单个转换(VM到VMM)所需的时钟周期数。

Virtualization and Performance: Understanding VM Exits的更多相关文章

  1. Async Performance: Understanding the Costs of Async and Await

    Stephen Toub Download the Code Sample Asynchronous programming has long been the realm of only the m ...

  2. Better Linux Disk Caching & Performance with vm.dirty_ratio & vm.dirty_background_ratio

    In previous posts on vm.swappiness and using RAM disks we talked about how the memory on a Linux gue ...

  3. PatentTips - Control register access virtualization performance improvement

    BACKGROUND OF THE INVENTION A conventional virtual-machine monitor (VMM) typically runs on a compute ...

  4. PatentTips - Virtualizing performance counters

    BACKGROUND Generally, the concept of virtualization in information processing systems allows multipl ...

  5. System and method for controlling switching between VMM and VM using enabling value of VMM timer indicator and VMM timer value having a specified time

    In one embodiment, a method includes transitioning control to a virtual machine (VM) from a virtual ...

  6. vm.dirty_ratio & vm.dirty_background_ratio

    https://lonesysadmin.net/2013/12/22/better-linux-disk-caching-performance-vm-dirty_ratio/ Better Lin ...

  7. Vue2.x源码学习笔记-从一个小例子查看vm实例生命周期

    学习任何一门框架,都不可能一股脑儿的从入口代码从上到下,把代码看完, 这样其实是很枯燥的,我想也很少有人这么干,或者这么干着干着可能干不下去了. 因为肯定很无聊. 我们先从一个最最简单的小例子,来查看 ...

  8. Performance Tuning Guidelines for Windows Server 2012

    http://msdn.microsoft.com/en-us/library/windows/hardware/jj248719.aspx This guide describes importan ...

  9. PatentTips - System and method to deprivilege components of a virtual machine monitor

    BACKGROUND INFORMATION An embodiment of the present invention relates generally to virtualization pl ...

随机推荐

  1. 【SSH进阶之路】Spring的IOC逐层深入——依赖注入的两种实现类型(四)

    上篇博文,我们介绍了为什么使用IOC容器,和IOC的设计思想以及IOC容器的优缺点,并且给大家转载了一篇介绍IOC原理的博文,我们这篇主要给大家依赖注入的两种方式,以及他们的优缺点. 我们这篇博文还是 ...

  2. consul ACL 配置范例

    service "dashboard" { policy = "write" } service "dashboard-sidecar-proxy&q ...

  3. 解决Python模块报错:ModuleNotFoundError: No module name 'StringIO'

    下面是我在学习中遇到的问题,给大家分享一下:   ''' 这里是测试代码 '''# coding = utf-8from selenium import webdriverfrom selenium. ...

  4. 华为路由器+三层交换,路由器配置DHCP,交换机中继DHCP

    LSW14:undo terminal monitorsystem-viewsysname SW1vlan batch 10 20 30 40 66interface Ethernet0/0/1por ...

  5. hdfs、tfs、fastdfs、Tachyon

    hdfs 架构设计 HDFS按照Master和Slave的结构.分NameNode.SecondaryNameNode.DataNode这几个角色. NameNode:是Master节点,是管理者.. ...

  6. FZU2018级算法第一次作业 1.1fibonacci (矩阵快速幂)

    题目 Winder最近在学习fibonacci 数列的相关知识.我们都知道fibonacci数列的递推公式是F(n)=F(n-1)+F(n-2)(n>=2 且n 为整数). Winder想知道的 ...

  7. Vasya and Shifts CodeForces - 832E (高斯消元)

    大意: 给定$4n$个$m$位的五进制数, $q$个询问, 每个询问给出一个$m$位的五进制数$b$, 求有多少种选数方案可以使五进制异或和为$b$. 高斯消元入门题 每次询问相当于就是给定了$m$个 ...

  8. Linux 系统中如何进入退出 vim 编辑器

    在 Linux 中,vim 编辑器是系统自带的文本编辑器,但要修改某个文本文件,可不是像 Windows 那样操作,更有新手,进入 vi 编辑器后,无法退出以致于强制关机,其实,这个vim(vi)也是 ...

  9. 关于Java无法解码(ajax编码 Java解码)

    今天遇到了一个非常奇~~~~~~葩的问题,无解! 一向前端碰到中文,请求都使用encodeURI(encodeURI("中文"))编码,然后后端使用URLDecoder.decod ...

  10. Description Resource Path Location Type Unknown Unknown Unknown org.eclipse.core.internal.resources.Marker is not of a displayable type

    是访问限制报错. 方法一: 全局属性Project>preferences>java>Compiler>Errors/Warnings>把右侧的[Deprecated a ...