




已阅读5页,还剩30页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
,UpdatesinACPIBased,MemoryHot-Plug,Agenda,.5.6.,ACPI&MemoryHot-PlugMemoryHot-PlugProcessBootMemoryHandlingPinnedPagesMigrationQEmumemoryHot-PlugFuturework,2,ACPI&MemoryHot-PlugACPI:AdvancedConfigurationandPowerInterfaceACPIisaninterfacespecificationofOperatingSystem-directedmotherboarddeviceconfigurationandPowerManagement.-ACPISpecification5.0,Methods(dynamic),ACPITables(static),ACPIBIOS(Firmware)ACPIRegistersHardware,Kernel(Software)ACPIFrameworkRunTimeBootTime,OSlayerframework.EventhandlingAPI,Staticinfousedonlyatboottime.DSDTSRAT,Eventdrivenmodel.EventregistersControlregisters3,Dynamicmethodsusedatruntime._EJ0,_STASCI(SystemControlInterrupt),Kernel,MemoryHot-PlugSubsystem,4,Hardware,Methods(dynamic),ACPIRegisters,Eventinfo,Calleventhandler,ACPITables(static)ACPIBIOS,GenerateSCI(SystemControlInterrupt),CallAPICallACPIMethod,Hardwareoperation,InstalleventhandlerACPIFrameworkReadACPITables,ACPI&MemoryHot-PlugACPIandMemoryHot-Plug,BoottimeprocessRuntimeprocess,Calldevicedependentcode,Hot-Plughappens,MemoryDeviceDriver,MemoryAffinity,SRAT,StaticinformationofNUMAarchitecture.,MemoryAffinityMemoryAffinity,MainlyusefulinformationMemoryrange,PXM(proximitydomain)Hotpluggableflag,ACPI&MemoryHot-PlugStaticconfigurationSRAT:SystemResourceAffinityTable,5,Agenda,.5.6.,ACPI&MemoryHot-PlugMemoryHot-PlugProcessBootMemoryHandlingPinnedPagesMigrationQEmumemoryHot-PlugFuturework,6,Memorymanagementbackground,Kernelspace,directmapping,(64TB)hole,modulemappingspacekerneltextmappingholevirtualmemorymap(1TB)holevmalloc/ioremapspacehole,Physicalspace,BlockX,movablepages(used),page_structsofBlockX,7,4.Virtualmemorymapping,pages.5.Memoryblocktobehot-plugged.,1.Userprocessespagetables.2.Kerneldirectmappingpagetables.3.Virtualmemorymapping,pagetables.,1,5,3,2,4,process(128TB)process(128TB),Userprocessspace(128TB)process(128TB),MemoryHot-addProcess,Physicalspace,Kernelspace,modulemappingspacekerneltextmappingholevirtualmemorymap(1TB),holevmalloc/ioremapspaceholedirectmapping(64TB)hole,Empty,page_structsofBlockX,8,4,3,2,1,process(128TB)process(128TB),Userprocessspace(128TB)process(128TB),BlockX,pages,(invalid),1.Initializedirectmapping.2.Initializevirtualmemory,mapping.3.Onlinememoryblock.,4.Establishuserspacemapping.,MemoryHot-removeProcess,Kernelspace,modulemappingspacekerneltextmappingholevirtualmemorymap(1TB)hole,vmalloc/ioremapspaceholedirectmapping(64TB)hole,Empty,9,5,4,process(128TB)process(128TB),Userprocessspace(128TB)process(128TB),3.Reestablishnewuserspacemapping.,Physicalspace,page_structsofBlockXNewpage_structs,pages(invalid)Newpage,Newpage2BlockX,1.Unmapuserspacepages.2.Offlinepagesandmigratepages.,13,4.Freekerneldirectmapping.5.Freevirtualmemory,mapping.,10,directmapping(64TB),KernelspaceUserspace,(128TB),Physicalspace,Userpage,Userpage,Kernelpageusermapping,ProblemKernelpagescannotbehot-removedKernelpage,variable,KernelpageUserpage1.migrate,Kernelpageva=pa+offset(1-1mapped),Userpage,Kernelpagenotmigratable,not,hot-removablehot-removable,2.hot-remove,Agenda,.5.6.,ACPI&MemoryHot-PlugMemoryHot-PlugProcessBootMemoryHandlingPinnedPagesMigrationQEmumemoryHot-PlugFuturework,11,AvoidAllocatingHot-pluggableMemory,start_kernel,Thekernelcannotrecognizewhichmemoryishot-pluggable,free_all_bootmemThekernelcanrecognizethehot-pluggablememory,ParsingSRAT,memblockallocator,buddyallocator,Boottime,12,AvoidAllocatingHot-pluggableMemory(BeforeParsingSRAT),How?,free_all_bootmem,ParsingSRAT,start_kernelAllocatememoryjustbehindthekernelimage:,-,Thenodekernelresidesinisun-hot-pluggableIntroduceanewbottom-upmodeformemblockallocator,Boottime,13,Top-downV.S.Bottom-upTop-downallocationmode,NODE0NODE1,NODE0NODE1,-,Memoryatlowaddressesisprecious(e.g.forDMAdevices)Fornon-memory-hot-plugusers,-,Inmostcases,memoryallocatedbeforeparsingSRATwontbetoomuch,soitcouldhighlylikelybeinthesamenodewithkernelimageFormemory-hot-plugusers,Bottom-upallocationmodeKernelimage,Kernelimage,14,newallocation,AvoidAllocatingHot-pluggableMemory(AfterParsingSRAT),start_kernel,free_all_bootmem,ParsingSRAT,Markhot-pluggablememoryandskiptheminfollowedallocations:,-,IntroduceMEMBLOCK_HOTPLUGflagformemblockallocatorChangebacktotop-downmode,How?,Boottime,15,start_kernel,SummaryAllocatememoryjustbehindthekernelimagebyusingbottom-upallocationmode,free_all_bootmemSkipallocatingmemorywhichismarkedwithMEMBLOCK_HOTPLUGflag,ParsingSRAT,memblockallocator,buddyallocator,Boottime,16,17,BootOption:movable_nodeAboot-timeswitchtoenablemovablenodefunctionality,HigherprioritythankernelcoreandmovablecorebootoptionMakesuremovablenodefunctionalitycanbeconfigured,Agenda,.5.6.,ACPI&MemoryHot-PlugMemoryHot-PlugProcessBootMemoryHandlingPinnedPagesMigrationQEmumemoryHot-PlugFuturework,18,PagesPinnedbyKernelShort-livedPinscma,fs/exec,security,nfs,events,net/ceph,lotsofdirversLong-livedPins(pinnedinalllifecycle)KVMRealmodeidentityEPTpagetableAPICaccesspageAIOEventRingbuffer,19,20,Short-livedPinsJustfordatacopyingSolution:NohandlingMemory-offlineretrytimeout(120s)isenough,21,Long-livedPins:KVMRealmodeeptidentitypagetableNeededforCPUsthatdonotallowenteringguestmodewithpagingdisable.Populatedwithptesthatcoverentireguestsmemory.APICaccesspageUsedbyCPUdirectlytocatchMMIOaccesstoanAPIC.,22,Guest,gva,gpa,Host,page2,Guest,Pagetable,EPT,hpa1,hpa2,page1,kvm_arch|-ept_identity_pagetable,|-apic_access_page,Long-livedPins:KVMWhypinned:Forconvenience,notnecessary.VMCS:APIC_ACCESS_ADDR,3.UpdateAPIC_ACCESS_ADDRpointerinVMCS.,3,2,1,2.Updatelocalcacheforpagestruct.,1.UpdateEPTentry.,23,Host,hpa1page1,hpa2page2,Long-livedPins:KVMEPTidentitypagetable:UnpindirectlyGuest,gpa,EPT,1.Guestrequiresapage,2.MMUsearchesEPTforahpa,3.MMUreturnsEPTviolationsincepagehasbeenmigrated,4.KVMhandlesEPTviolationandfindthenewpage,5.KVMupdatesEPT6.MMUreturnsnewhpa,2,1,6,3,4,5,Long-livedPins:KVMAPICaccesspage,24,hpa1,hpa2,page1page2L0(HostMode),L2Guest,GuestModeVMCS,L1Guest,VMCS,TwokindsofVM-Entry/Exit:VM-Entry/ExitinGuestmodeareemulatedbyKVM.L1L2VM-Entry/Exit,VM-Entry/ExitbetweenHostandGuestmodeareprovidedbyCPU.L0L1VM-Entry/ExitL0L2VM-Entry/Exit,Twocasestohandle:CPUisrunningL1Guest.CPUisrunningL2Guest.,25,L0(HostMode),hpa1page1,hpa2page2,L2Guest,VMCS,L1Guest,VMCS,Long-livedPins:KVMAPICaccesspageCPUisrunningL1Guest:GuestMode,PageMigration:,1.Trytounmappage2.MMUnotifierworks,3.Unmapandmigratepage4.Pagemigrated,KVM:,1.HandlerenforcesaL1-L0VM-Exit2.HandlermakesvcpurequesttoupdateL1VMCS,3.NextL0-L1VM-Entry:GUPwaitsforpagemigration4.UpdateL1VMCS5.UpdateL2VMCSin,nextL1-L2VM-Entry,L0(HostMode),hpa1page1,hpa2page2,L2Guest,VMCS,L1Guest,VMCS,Long-livedPins:KVMAPICaccesspageCPUisrunningL2Guest:GuestMode,PageMigration:,1.Trytounmappage2.MMUnotifierworks,3.Unmapandmigratepage4.Pagemigrated,KVM:,1.HandlerenforcesaL2-L0VM-Exit2.HandlermakesvcpurequesttoupdateL2VMCS,3.NextL0-L2VM-Entry:GUPwaitsforpagemigration4.UpdateL2VMCS5.UpdateL1VMCSin,nextL2-L1VM-Exit26,Long-livedPins:AIO,27,AIOEventRingBufferUsedbykerneltonotifyuserspacethatAIOhascompleted.,Long-livedPins:AIOWhypinned:UnabletoknowwhenAIOcompletes.,Userprocess:AIOeventhandledAIORingBufferKernel:AIOcompleted,AIO:1.AIOpinsringpages2.AIOinprogress3.AIOcompletes4.AIOunpinringpages28,PageMigration:1.Offlinememory2.Pagemigration|-migratepages()3.Pagemigrationfails,29,Long-livedPins:AIONeednewsplution,WhycannotuseMMUnotifier:1.Nowaytogetthepage(havetorepin),GUPmaysleepiniointerruptcontext,2.NowaytonotifyAIOtorepinthepage,NosuchMMUnotifierafterpagemigrationcompletes,new,page,oldpage,3)Migratepage,AIO:,1.AIOpinsringpages2.AIOinprogress3.aio_migrate(),1)lock2)unpingringpages3)migrateringpages4)repinringpages,5)unlock4.AIOcompletes,5.AIOunpinringpages30,PageMigration:,1.Offlinememory2.Pagemigrationstarts,3.Pagemigrationinprogress4.Pagemigrationends,AIOcomplete1)BlockedbylockAIORingBuffer,5)Unlockedwhenmigrationends,2)Unpin,4)Repin,Long-livedPins:AIOSolution:Implem
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年低空经济生态补偿机制构建与飞行活动监管协同策略报告
- 低空经济2025行业趋势报告:无人机与传统交通融合的协同创新路径与展望
- 2025北京市育英学校科学城学校招聘考试模拟试题及答案解析
- 2025年低空经济无人机配送产业政策与市场潜力分析报告
- 2025年跨境贸易保证合同
- 2025年港口船舶垃圾回收处理合同协议
- 2025年风电项目环境影响后评价报告与绿色旅游发展报告
- 2025年低空无人机电力巡检技术升级与市场规模报告
- 2025年新能源汽车充电桩行业市场前景与市场机遇研究报告
- 2025版低空经济「航空服务」市场潜力报告
- DL-T5588-2021电力系统视频监控系统设计规程
- 医学伦理与医生护士职业道德的边界探讨
- 母婴护理中心(月子会所)项目实施方案
- 作业指导书管理规范规章制度
- 篮球空白战术板
- 医保工作各小组和医保相关制度
- 2023年江苏泰州现代农业发展集团有限公司招聘笔试题库含答案解析
- 第五章 亲核取代反应
- 医院医疗设备购置申请表(采购单)
- 2022年中交营口液化天然气有限公司招聘笔试题库及答案解析
- 《消防安全技术实务》课本完整版
评论
0/150
提交评论