您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 经营企划 > 高级可配置电源接口发展现状
UpdatesinACPIBasedMemoryHot-PlugAgenda1.2.3.4.5.6.ACPI&MemoryHot-PlugMemoryHot-PlugProcessBootMemoryHandlingPinnedPagesMigrationQEmumemoryHot-PlugFuturework2ACPI&MemoryHot-Plug•ACPI:AdvancedConfigurationandPowerInterfaceACPIisaninterfacespecificationofOperatingSystem-directedmotherboarddeviceconfigurationandPowerManagement.--ACPISpecification5.0Methods(dynamic)ACPITables(static)ACPIBIOS(Firmware)ACPIRegistersHardwareKernel(Software)ACPIFrameworkRunTimeBootTimeOSlayerframework.EventhandlingAPIStaticinfousedonlyatboottime.DSDTSRAT……Eventdrivenmodel.EventregistersControlregisters……3Dynamicmethodsusedatruntime._EJ0_STA……SCI(SystemControlInterrupt)KernelMemoryHot-PlugSubsystem4HardwareMethods(dynamic)ACPIRegistersEventinfoCalleventhandlerACPITables(static)ACPIBIOSGenerateSCI(SystemControlInterrupt)CallAPICallACPIMethodHardwareoperationInstalleventhandlerACPIFrameworkReadACPITablesACPI&MemoryHot-Plug•ACPIandMemoryHot-PlugBoottimeprocessRuntimeprocessCalldevicedependentcodeHot-PlughappensMemoryDeviceDriverMemoryAffinitySRATStaticinformationofNUMAarchitecture.MemoryAffinityMemoryAffinityMainlyusefulinformationMemoryrangePXM(proximitydomain)Hotpluggableflag……ACPI&MemoryHot-Plug•Staticconfiguration–SRAT:SystemResourceAffinityTable5Agenda1.2.3.4.5.6.ACPI&MemoryHot-PlugMemoryHot-PlugProcessBootMemoryHandlingPinnedPagesMigrationQEmumemoryHot-PlugFuturework6…MemorymanagementbackgroundKernelspacedirectmapping(64TB)holemodulemappingspacekerneltextmappingholevirtualmemorymap(1TB)holevmalloc/ioremapspaceholePhysicalspaceBlockXmovablepages(used)…………page_structsofBlockX……74.Virtualmemorymappingpages.5.Memoryblocktobehot-plugged.1.Userprocesses’pagetables.2.Kerneldirectmappingpagetables.3.Virtualmemorymappingpagetables.15324process(128TB)process(128TB)Userprocessspace(128TB)process(128TB)…MemoryHot-addProcessPhysicalspaceKernelspacemodulemappingspacekerneltextmappingholevirtualmemorymap(1TB)holevmalloc/ioremapspaceholedirectmapping(64TB)holeEmpty……page_structsofBlockX84321process(128TB)process(128TB)Userprocessspace(128TB)process(128TB)……BlockXpages(invalid)……1.Initializedirectmapping.2.Initializevirtualmemorymapping.3.Onlinememoryblock.4.Establishuserspacemapping.…MemoryHot-removeProcessKernelspacemodulemappingspacekerneltextmappingholevirtualmemorymap(1TB)holevmalloc/ioremapspaceholedirectmapping(64TB)holeEmpty954process(128TB)process(128TB)Userprocessspace(128TB)process(128TB)3.Reestablishnewuserspacemapping.Physicalspace……page_structsofBlockXNewpage_structspages(invalid)NewpageNewpage2BlockX1.Unmapuserspacepages.2.Offlinepagesandmigratepages.134.Freekerneldirectmapping.5.Freevirtualmemorymapping.10directmapping(64TB)KernelspaceUserspace(128TB)PhysicalspaceUserpageUserpageKernelpageusermappingProblem•Kernelpagescannotbehot-removedKernelpagevariableKernelpageUserpage1.migrateKernelpageva=pa+offset(1-1mapped)UserpageKernelpagenotmigratablenothot-removablehot-removable2.hot-removeAgenda1.2.3.4.5.6.ACPI&MemoryHot-PlugMemoryHot-PlugProcessBootMemoryHandlingPinnedPagesMigrationQEmumemoryHot-PlugFuturework11AvoidAllocatingHot-pluggableMemorystart_kernelThekernelcannotrecognizewhichmemoryishot-pluggablefree_all_bootmemThekernelcanrecognizethehot-pluggablememoryParsingSRATmemblockallocatorbuddyallocatorBoottime12AvoidAllocatingHot-pluggableMemory(BeforeParsingSRAT)How?free_all_bootmemParsingSRATstart_kernelAllocatememoryjustbehindthekernelimage:--Thenodekernelresidesinisun-hot-pluggableIntroduceanewbottom-upmodeformemblockallocatorBoottime13Top-downV.S.Bottom-upTop-downallocationmodeNODE0NODE1NODE0NODE1--Memoryatlowaddressesisprecious(e.g.forDMAdevices)Fornon-memory-hot-plugusers--Inmostcases,memoryallocatedbeforeparsingSRATwon’tbetoomuch,soitcouldhighlylikelybeinthesamenodewithkernelimageFormemory-hot-plugusersBottom-upallocationmodeKernelimageKernelimage14newallocationAvoidAllocatingHot-pluggableMemory(AfterParsingSRAT)start_kernelfree_all_bootmemParsingSRATMarkhot-pluggablememoryandskiptheminfollowedallocations:--IntroduceMEMBLOCK_HOTPLUGflagformemblockallocatorChangebacktotop-downmodeHow?Boottime15start_kernelSummaryAllocatememoryjustbehindthekernelimagebyusingbottom-upallocationmodefree_all_bootmemSkipallocatingmemorywhichismarkedwithMEMBLOCK_HOTPLUGflagParsingSRATmemblockallocatorbuddyallocatorBoottime1617BootOption:movable_node•Aboot-timeswitchtoenablemovablenodefunctionality•Higherprioritythankernelcoreandmovablecorebootoption–MakesuremovablenodefunctionalitycanbeconfiguredAgenda1.2.3.4.5.6.ACPI&MemoryHot-PlugMemoryHot-PlugProcessBootMemoryHandlingPinnedPagesMigrationQEmumemoryHot-PlugFuturework18PagesPinnedbyKernel•Short-livedPins–cma,fs/exec,security,nfs,events,net/ceph,lotsofdirvers…•Long-livedPins(pinnedinalllifecycle)–KVM•RealmodeidentityEPTpagetable•APICaccesspage–AIO•EventRingbuffer1920Short-livedPins•Justfordatacopying•Solution:Nohandling–Memory-offlineretrytimeout(120s)isenough21Long-livedPins:KVM•Realmodeeptidentitypagetable–NeededforCPUsthatdonotallowenteringguestmodewithpagingdisable.–Populatedwithp
本文标题:高级可配置电源接口发展现状
链接地址:https://www.777doc.com/doc-550254 .html