請用此 Handle URI 來引用此文件:
http://tdr.lib.ntu.edu.tw/jspui/handle/123456789/94324完整後設資料紀錄
| DC 欄位 | 值 | 語言 |
|---|---|---|
| dc.contributor.advisor | 黎士瑋 | zh_TW |
| dc.contributor.advisor | Shih-Wei Li | en |
| dc.contributor.author | 陳建豪 | zh_TW |
| dc.contributor.author | Jian-Hao Chen | en |
| dc.date.accessioned | 2024-08-15T16:49:20Z | - |
| dc.date.available | 2024-08-16 | - |
| dc.date.copyright | 2024-08-15 | - |
| dc.date.issued | 2024 | - |
| dc.date.submitted | 2024-08-05 | - |
| dc.identifier.citation | [1] N. Amit, A. Gordon, N. Har’El, M. Ben-Yehuda, A. Landau, A. Schuster, and D. Tsafrir. Bare-metal performance for virtual machines with exitless interrupts. Commun. ACM, 59(1):108 – 116, dec 2015.
[2] Arm. Coresight architecture. https://developer.arm.com/Architectures/CoreSight [3] D. Bakhvalov. Understanding performance events skid. https://easyperf.net/blog/2018/08/29/Understanding-performance-events-skid, 2018. [4] K. Developers. Kvm-unit-tests. https://www.linux-kvm.org/page/KVM-unit-tests, 2020. [5] J. Du, N. Sehrawat, and W. Zwaenepoel. Performance profiling of virtual machines. In Proceedings of the 7th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments, VEE ’11, page 3 – 14, New York, NY, USA, 2011. Association for Computing Machinery. [6] Google. Syzkaller. https://github.com/google/syzkaller, 2019. [7] Intel. Intel vtune. https://www.intel.com/content/www/us/en/developer/tools/oneapi/vtune-profiler.html. [8] Intel. Perfmon events. https://perfmon-events.intel.com/. [9] A. Kivity, Y. Kamay, D. Laor, U. Lublin, and A. Liguori. kvm: the linux virtual machine monitor. In Proceedings of the Linux symposium, volume 1, pages 225–230. Dttawa, Dntorio, Canada, 2007. [10] A. Kleen. An introduction to last branch records. https://lwn.net/Articles/680985/, 2016. [11] linux perf maintainer. Perf wiki. https://perf.wiki.kernel.org/index.php/Main_Page. [12] D. Song, F. Hetzelt, J. Kim, B. B. Kang, J.-P. Seifert, and M. Franz. Agamotto: Accelerating kernel driver fuzzing with lightweight virtual machine checkpoints. In 29th USENIX Security Symposium (USENIX Security 20), pages 2541–2557. USENIX Association, Aug. 2020. [13] G. Will. wrk - a http benchmarking tool. https://github.com/wg/wrk, 2012. [14] A. Yasin. A top-down method for performance analysis and counters architecture. In 2014 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS), ISPASS 2014, pages 35–44, Monterey, CA, USA, March 2014. [15] X. Zhang. Kvm: x86/pmu: Introduce passthrough vpm. https://lwn.net/Articles/959653, 2024. | - |
| dc.identifier.uri | http://tdr.lib.ntu.edu.tw/jspui/handle/123456789/94324 | - |
| dc.description.abstract | 當今的處理器會透過特殊的性能分析硬體將架構相關的事件的資訊提供給使用者。具體而言,大部分的處理器架構都有提供效能監測單位 (PMU) 來記錄並且回報硬體事件的資訊。此外,有些供應商亦會在處理器上提供其他專門的性能分析功能,例如 Intel 處理器提供的最後分支紀錄 (LBR) 能夠提供最近執行的分支指令的詳細資訊。軟體開發者可以利用這些處理器提供的功能來對自己的程式做性能分析,並且根據分析的結果來優化程式。由於開發者越來越傾向於把程式部署於雲端服務所提供的虛擬機器,主流的虛擬機器監測器會虛擬化這些性能分析硬體,並且將虛擬的性能分析硬體提供給虛擬機器使用。然而,目前針對性能分析硬體的虛擬化會導致虛擬機器頻繁的退出到虛擬機器監測器,這也大幅提升了在虛擬機器中使用性能分析硬體的開銷。因此,這篇論文旨在優化 Intel 處理器的性能分析硬體的虛擬化的性能。我們在確保性能分析硬體被正確地多工複用的前提下虛擬機器直接存取性能分析硬體。此外,我們也把性能分析硬體產生的中斷直接傳遞給虛擬機器以降低頻繁取樣下造成的陷入。我們對我們在 Linux KVM 虛擬機器監測器上的實作原型進行評估,結果顯示我們能夠顯著地提高性能分析硬體如 PMU 的虛擬化效能。 | zh_TW |
| dc.description.abstract | Modern processors expose architectural events to users via special profiling features. Specifically, most architectures provide a performance monitoring unit (PMU) to record and report hardware events. Besides, vendors like Intel support customized features like Last Branch Record (LBR), which profiles the execution of branch instructions. Developers utilize these features to profile their programs’ execution and analyze performance. As programs are increasingly deployed to virtual machines (VMs) running on the cloud, commodity hypervisors expose virtual profiling hardware to VMs. However, the current virtualization support incurs frequent VM exits to the hypervisor, causing significant overhead to VMs using the profiling hardware. This thesis aims to optimize the virtualization performance of hardware profiling features on Intel processors. We multiplex the profiling hardware to safely enable direct access from the VM. Further, we pass through interrupts generated by the profiling hardware to VMs to avoid traps caused by frequent samplings. Evaluation of our prototype for the Linux KVM hypervisor shows that our approach significantly improved the virtualization performance of PMU. | en |
| dc.description.provenance | Submitted by admin ntu (admin@lib.ntu.edu.tw) on 2024-08-15T16:49:20Z No. of bitstreams: 0 | en |
| dc.description.provenance | Made available in DSpace on 2024-08-15T16:49:20Z (GMT). No. of bitstreams: 0 | en |
| dc.description.tableofcontents | Verification Letter from the Oral Examination Committee i
致謝 ii 摘要 iii Abstract iv Contents vi List of Figures ix List of Tables x Chapter 1 Introduction 1 Chapter 2 Background 4 2.1 Intel VMX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 Intel Performance Monitoring Unit . . . . . . . . . . . . . . . . . . 5 2.3 Performance Monitoring Interrupt . . . . . . . . . . . . . . . . . . . 5 2.4 Intel Last Branch Record . . . . . . . . . . . . . . . . . . . . . . . . 6 2.4.1 Performance Counters for Linux . . . . . . . . . . . . . . . . . . . 6 2.5 PMU and LBR Virtualization in KVM . . . . . . . . . . . . . . . . . 7 2.6 Non-maskable Interrupt . . . . . . . . . . . . . . . . . . . . . . . . 9 2.6.1 NMI Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.6.2 NMI Blocking and PMI Masking . . . . . . . . . . . . . . . . . . . 11 Chapter 3 Design 13 3.1 MSR passthrough . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2 PMI passthrough . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.2.1 Property P1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.2.2 Property P2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Chapter 4 Evaluation 22 4.1 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.2 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.2.1 MSR Accesses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.2.2 Simple Program Using PCS . . . . . . . . . . . . . . . . . . . . . . 24 4.2.3 VM Exit Overhead of NMI passthrough . . . . . . . . . . . . . . . 26 4.3 Real-World Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.3.1 Linux Perf Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.3.2 Fuzzing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.4 Functionality and Security . . . . . . . . . . . . . . . . . . . . . . . 33 4.4.1 MSR passthrough . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.4.2 NMI passthrough . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Chapter 5 Related Work 37 Chapter 6 Future Work 40 Chapter 7 Conclusions 42 References 43 Appendix A — Code Snippets For Performance Analysis 45 A.1 Simple Program Using PCL . . . . . . . . . . . . . . . . . . . . . . 45 A.2 Hypercall to Test NMI Unblocking . . . . . . . . . . . . . . . . . . 46 | - |
| dc.language.iso | en | - |
| dc.subject | 作業系統 | zh_TW |
| dc.subject | 性能分析 | zh_TW |
| dc.subject | KVM | zh_TW |
| dc.subject | 虛擬化 | zh_TW |
| dc.subject | KVM | en |
| dc.subject | Virtualization | en |
| dc.subject | Operating Systems | en |
| dc.subject | Profiling | en |
| dc.title | 提升KVM效能監測單位虛擬化之效能 | zh_TW |
| dc.title | Enhancing Performance of KVM Performance Monitoring Unit Virtualization | en |
| dc.type | Thesis | - |
| dc.date.schoolyear | 112-2 | - |
| dc.description.degree | 碩士 | - |
| dc.contributor.oralexamcommittee | 洪士灝;洪鼎詠 | zh_TW |
| dc.contributor.oralexamcommittee | Shih-Hao Hung;Ding-Yong Hong | en |
| dc.subject.keyword | 性能分析,作業系統,虛擬化,KVM, | zh_TW |
| dc.subject.keyword | Profiling,Operating Systems,Virtualization,KVM, | en |
| dc.relation.page | 47 | - |
| dc.identifier.doi | 10.6342/NTU202403471 | - |
| dc.rights.note | 同意授權(全球公開) | - |
| dc.date.accepted | 2024-08-08 | - |
| dc.contributor.author-college | 電機資訊學院 | - |
| dc.contributor.author-dept | 資訊工程學系 | - |
| 顯示於系所單位: | 資訊工程學系 | |
文件中的檔案:
| 檔案 | 大小 | 格式 | |
|---|---|---|---|
| ntu-112-2.pdf | 728.99 kB | Adobe PDF | 檢視/開啟 |
系統中的文件,除了特別指名其著作權條款之外,均受到著作權保護,並且保留所有的權利。
