翻译自: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. Visual Studio 2017 vcvarsall.bat 环境配置对应关系

    博客参考:https://chenzehe.iteye.com/blog/1703429 安装Visual Studio 2017之后,vcvarsall.bat ,vcvars32.bat,vcva ...

  2. linux升级python到2.7版本

    linux的python安装包默认版本是2.6.6,yum程序默认也是依赖这个版本的python包的,但是其他一些程序如nodejs,却要的是2.7版本,因此必须要考虑升级后与yum的兼容问题.两步走 ...

  3. vue 框架安装系列问题

    npm install --global vue-cli 错误提示:vue-cli-service' 不是内部或外部命令,也不是可运行的程序或批处理文件解决:如果是npm安装的 执行 npm -g b ...

  4. 【交互】抖音VS快手

    从能量节约,懒惰的人性本质角度来分析,有点意思. https://www.ui.cn/detail/506135.html

  5. .Net 配置 swagger 使用nginx反向代理后请求带端口号导致无法正常访问---解决方法

    1 webconfig中 appsetting 中增加配置 <appSettings> <add key="aspnet:UseHostHeaderForRequestUr ...

  6. list<Integer>,Integer[],int[]之间的互转(jdk1.8)

    偶然在开发过程中需要将int[] 转成 List<Integer>,采用了遍历的方式,写的代码实在太多. List<Integer> list = new ArrayList& ...

  7. STL源码剖析——序列式容器#2 List

    list就是链表的实现,链表是什么,我就不再解释了.list的好处就是每次插入或删除一个元素,都是常数的时空复杂度.但遍历或访问就需要O(n)的时间. List本身其实不难理解,难点在于某些功能函数的 ...

  8. XGBoost 重要参数(调参使用)

    XGBoost 重要参数(调参使用) 数据比赛Kaggle,天池中最常见的就是XGBoost和LightGBM. 模型是在数据比赛中尤为重要的,但是实际上,在比赛的过程中,大部分朋友在模型上花的时间却 ...

  9. Linux组管理、用户管理、查看用户信息、usermod、which、切换用户、修改文件具体权限

    组管理 提示:创建组/删除组的终端命令都需要通过sudo执行 序号 命令 作用 01 groupadd组名 添加组 02 groupdel组名 删除组 03 cat/etc/group 确认组信息 0 ...

  10. wireshark抓包新手教程(win10空包问题)

    首先下载官网的wireshark,下载地址https://www.wireshark.org/ 下载完按照提示一步步安装 安装完打开wireshark,安装中文包 安装之前首先讲一下win10截图工具 ...