Skip navigation

DSpace

機構典藏 DSpace 系統致力於保存各式數位資料(如:文字、圖片、PDF)並使其易於取用。

點此認識 DSpace
DSpace logo
English
中文
  • 瀏覽論文
    • 校院系所
    • 出版年
    • 作者
    • 標題
    • 關鍵字
    • 指導教授
  • 搜尋 TDR
  • 授權 Q&A
    • 我的頁面
    • 接受 E-mail 通知
    • 編輯個人資料
  1. NTU Theses and Dissertations Repository
  2. 電機資訊學院
  3. 資訊工程學系
請用此 Handle URI 來引用此文件: http://tdr.lib.ntu.edu.tw/jspui/handle/123456789/94324
完整後設資料紀錄
DC 欄位值語言
dc.contributor.advisor黎士瑋zh_TW
dc.contributor.advisorShih-Wei Lien
dc.contributor.author陳建豪zh_TW
dc.contributor.authorJian-Hao Chenen
dc.date.accessioned2024-08-15T16:49:20Z-
dc.date.available2024-08-16-
dc.date.copyright2024-08-15-
dc.date.issued2024-
dc.date.submitted2024-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.urihttp://tdr.lib.ntu.edu.tw/jspui/handle/123456789/94324-
dc.description.abstract當今的處理器會透過特殊的性能分析硬體將架構相關的事件的資訊提供給使用者。具體而言,大部分的處理器架構都有提供效能監測單位 (PMU) 來記錄並且回報硬體事件的資訊。此外,有些供應商亦會在處理器上提供其他專門的性能分析功能,例如 Intel 處理器提供的最後分支紀錄 (LBR) 能夠提供最近執行的分支指令的詳細資訊。軟體開發者可以利用這些處理器提供的功能來對自己的程式做性能分析,並且根據分析的結果來優化程式。由於開發者越來越傾向於把程式部署於雲端服務所提供的虛擬機器,主流的虛擬機器監測器會虛擬化這些性能分析硬體,並且將虛擬的性能分析硬體提供給虛擬機器使用。然而,目前針對性能分析硬體的虛擬化會導致虛擬機器頻繁的退出到虛擬機器監測器,這也大幅提升了在虛擬機器中使用性能分析硬體的開銷。因此,這篇論文旨在優化 Intel 處理器的性能分析硬體的虛擬化的性能。我們在確保性能分析硬體被正確地多工複用的前提下虛擬機器直接存取性能分析硬體。此外,我們也把性能分析硬體產生的中斷直接傳遞給虛擬機器以降低頻繁取樣下造成的陷入。我們對我們在 Linux KVM 虛擬機器監測器上的實作原型進行評估,結果顯示我們能夠顯著地提高性能分析硬體如 PMU 的虛擬化效能。zh_TW
dc.description.abstractModern 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.provenanceSubmitted by admin ntu (admin@lib.ntu.edu.tw) on 2024-08-15T16:49:20Z
No. of bitstreams: 0
en
dc.description.provenanceMade available in DSpace on 2024-08-15T16:49:20Z (GMT). No. of bitstreams: 0en
dc.description.tableofcontentsVerification 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.isoen-
dc.subject作業系統zh_TW
dc.subject性能分析zh_TW
dc.subjectKVMzh_TW
dc.subject虛擬化zh_TW
dc.subjectKVMen
dc.subjectVirtualizationen
dc.subjectOperating Systemsen
dc.subjectProfilingen
dc.title提升KVM效能監測單位虛擬化之效能zh_TW
dc.titleEnhancing Performance of KVM Performance Monitoring Unit Virtualizationen
dc.typeThesis-
dc.date.schoolyear112-2-
dc.description.degree碩士-
dc.contributor.oralexamcommittee洪士灝;洪鼎詠zh_TW
dc.contributor.oralexamcommitteeShih-Hao Hung;Ding-Yong Hongen
dc.subject.keyword性能分析,作業系統,虛擬化,KVM,zh_TW
dc.subject.keywordProfiling,Operating Systems,Virtualization,KVM,en
dc.relation.page47-
dc.identifier.doi10.6342/NTU202403471-
dc.rights.note同意授權(全球公開)-
dc.date.accepted2024-08-08-
dc.contributor.author-college電機資訊學院-
dc.contributor.author-dept資訊工程學系-
顯示於系所單位:資訊工程學系

文件中的檔案:
檔案 大小格式 
ntu-112-2.pdf728.99 kBAdobe PDF檢視/開啟
顯示文件簡單紀錄


系統中的文件,除了特別指名其著作權條款之外,均受到著作權保護,並且保留所有的權利。

社群連結
聯絡資訊
10617臺北市大安區羅斯福路四段1號
No.1 Sec.4, Roosevelt Rd., Taipei, Taiwan, R.O.C. 106
Tel: (02)33662353
Email: ntuetds@ntu.edu.tw
意見箱
相關連結
館藏目錄
國內圖書館整合查詢 MetaCat
臺大學術典藏 NTU Scholars
臺大圖書館數位典藏館
本站聲明
© NTU Library All Rights Reserved