翻译自: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. CFCA证书工具类

    jar:com.cfca.pkibase-1.0.jar import java.io.UnsupportedEncodingException; import java.security.Secur ...

  2. python初级(302) 2 easygui简单使用

    一.复习之前的两个练习,巩固计数循环和条件循环 1.系统生成一个随机数1到5,然后让用户的猜测,若猜对了,提示恭喜你,猜对了,否则提示,对不起,你猜错了(提示,1到5的随机数为:secret = ra ...

  3. [LeetCode] 112. Path Sum 路径和

    Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all ...

  4. [LeetCode] 412. Fizz Buzz 嘶嘶嗡嗡

    Write a program that outputs the string representation of numbers from 1 to n. But for multiples of ...

  5. 通过ip远程控制电脑

    现在,很多人都用了不止一台电脑,而同时操作两台电脑是一件比较麻烦的事情,所以,如果能够使用一台电脑的鼠标键盘显示器,去远程控制另一台电脑,那就方便多了. 远程计算机设置 1.先确保本地计算机和远程计算 ...

  6. 【原创】C++11:左值和右值(深度分析)

    ——原创,引用请附带博客地址 2019-12-06 23:42:18 这篇文章分析的还是不行,先暂时放在这以后再更新. 本篇比较长,需要耐心阅读 以一个实际问题开始分析 class Sub{} Sub ...

  7. CF1260D A Game with Traps

    http://codeforces.com/problemset/problem/1260/D 首先很明显可以想到二分答案,把能力值数组排个序就好. 考虑怎么check. 设当前二分值为w,即不能直接 ...

  8. Mysql查看优化后的SQL 语句

    EXPLAIN  EXTENDED 1先执行 EXPLAIN  EXTENDED 2 show warnings: EXPLAIN EXTENDED SELECT * FROM `receivable ...

  9. js 获取服务端时间,并实现时钟

    本例子以vue语法伪代码书写: 1,获取服务端北京时间 getRealTime() { let that = this; var xhr = new XMLHttpRequest(); if( !xh ...

  10. [Oracle] - 查看数据库中每个表占用空间大小,及进行表压缩

    查询用户创建的表 select * from user_tab_comments; -- 查询本用户的表,视图等. select * from user_col_comments; -- 查询本用户的 ...