WO2023165308A1 - Procédé et appareil de récupération de mémoire, et dispositif de commande - Google Patents
Procédé et appareil de récupération de mémoire, et dispositif de commande Download PDFInfo
- Publication number
- WO2023165308A1 WO2023165308A1 PCT/CN2023/075201 CN2023075201W WO2023165308A1 WO 2023165308 A1 WO2023165308 A1 WO 2023165308A1 CN 2023075201 W CN2023075201 W CN 2023075201W WO 2023165308 A1 WO2023165308 A1 WO 2023165308A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- memory
- virtual machine
- page
- struct
- free
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5022—Mechanisms to release resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45583—Memory management, e.g. access or allocation
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present application relates to the technical field of memory allocation, in particular, to a method, device and control device for memory recovery.
- Reclaiming the free memory of the virtual machine and improving the memory elasticity of the virtual machine can effectively improve the resource utilization efficiency of the host machine, help increase the density of virtual machines that the host machine can deploy, and reduce the cost of using virtual machines.
- device-side DMA requires that the memory map of the virtual machine cannot be changed at all during the running process, so it is impossible to dynamically reclaim the memory of the virtual machine.
- the problem solved by this application is that the memory mapping of DMA cannot be changed in the existing memory recovery method, so that the memory of the virtual machine cannot be recovered.
- this application firstly provides a method for memory recovery, including:
- the method further includes:
- the memory parsing function is BPF bytecode compiled by the virtual machine.
- the memory analysis function for obtaining the memory management metadata information of the virtual machine and parsing the memory management metadata information includes:
- the memory management metadata information injected by the virtual machine and the compiled BPF bytecode of the memory analysis function are received .
- the free memory of the virtual machine is reclaimed, and scanned by the memory analysis function and the memory management metadata information After the free memory of the virtual machine is recovered, the free memory of the virtual machine is reclaimed.
- the memory management metadata information includes struct page physical page information and corresponding struct page structure information; After the free memory of the virtual machine is recovered, the free memory of the virtual machine is reclaimed, including:
- the body physical page is a struct page physical page that stores the struct page structure information corresponding to the free said struct page physical page.
- the allocation request of the virtual machine for the reclaimed free memory is a physical access to the struct page structure whose permission bit is read-only in the EPT mapping table or the IOMMU mapping table. Triggered when the page is mapped.
- the allocating new physical memory to the virtual machine is re-establishing the mapping of free struct page physical pages in the EPT mapping table or the IOMMU mapping table.
- the second control device of the present application includes: a memory and a processor
- said memory for storing programs
- the processor coupled to the memory, for executing the program for:
- the processor is specifically configured to:
- the memory parsing function is BPF bytecode compiled by the virtual machine.
- the processor is specifically configured to:
- the memory management metadata information injected by the virtual machine and the compiled BPF bytecode of the memory analysis function are received .
- the processor is specifically configured to reclaim the free memory of the virtual machine after scanning out the free memory of the virtual machine through the memory analysis function and the memory management metadata information.
- the memory management metadata information includes struct page physical page information and corresponding struct page structure information; based on this, the processor is specifically configured to:
- the permission location is read-only, and the physical page of the struct page structure is a physical page of the struct page that stores the information of the struct page structure corresponding to the free physical page of the struct page.
- the processor is specifically configured to:
- the allocation request of the reclaimed free memory by the virtual machine is triggered when the virtual machine accesses the mapping of the physical page of the struct page structure whose permission bit is read-only in the EPT mapping table or the IOMMU mapping table.
- the processor is specifically configured to:
- the allocating new physical memory to the virtual machine is to re-establish the mapping of free struct page physical pages in the EPT mapping table or the IOMMU mapping table.
- the present application provides a memory recycling device again, which includes:
- An information obtaining module which is used to obtain memory management metadata information of the virtual machine and a memory analysis function for parsing the memory management metadata information;
- a memory recycling module configured to reclaim free memory of the virtual machine based on the memory analysis function and the memory management metadata information.
- the device also includes:
- a memory allocation module configured to allocate new physical memory to the virtual machine in response to the allocation request of the virtual machine for the reclaimed free memory.
- This application reclaims the free memory of the virtual machine, thereby avoiding the problem that the device side DMA cannot change the memory mapping, and does not require additional hardware or paravirtualization drivers.
- the virtual machine has no other changes except for injecting code and data into the host when it starts, so the intrusion control of the virtual machine is minimal, and it is easy to achieve software compatibility; the host actively and spontaneously updates the memory status of the virtual machine Scanning without waiting for the response of the virtual machine, so compared with the traditional PV solution, it can achieve better real-time performance; this solution is a pure software solution based on the existing architecture, and does not rely on supporting Page Fault on the device side Specific hardware and therefore hardware compatible.
- memory management metadata information and memory management metadata analysis functions are injected into the host machine through the virtual machine, so that the host machine can scan and reclaim the memory of the virtual machine actively in real time, improving the response speed of memory reclamation; And the recycling/reallocation of free memory does not involve Disk I/O, Therefore, the processing efficiency is also improved; while recycling, the modification of the corresponding struct page mapping is considered, so that this solution can be used in device direct scenarios.
- FIG. 1 is a flowchart of a memory recovery method according to an embodiment of the present application
- FIG. 2 is a flowchart of a memory recovery method according to another embodiment of the present application.
- FIG. 3 is a schematic diagram of a memory recovery process according to the present application.
- FIG. 4 is a flow chart of a memory recovery method according to another embodiment of the present application.
- Fig. 5 is the schematic diagram before reclaiming according to EPT mapping table and IOMMU mapping table according to the present application;
- Fig. 6 is the schematic diagram after recycling according to the EPT mapping table and the IOMMU mapping table of the present application;
- FIG. 7 is a structural block diagram of a memory recovery device according to an embodiment of the present application.
- Fig. 8 is a structural block diagram of a control device according to an embodiment of the present application.
- the existing memory reclamation method dynamically reclaims the memory of the virtual machine by changing the memory mapping, but the device-side DMA requires that the memory mapping of the virtual machine cannot be changed at all during the running process of the virtual machine.
- the present application provides a solution to reclaim the free memory of the virtual machine by determining the free memory area of the virtual machine, so that there is no need to change the memory mapping being used during the running of the virtual machine.
- Memory reclamation After the host allocates memory to the virtual machine, it reclaims the excess memory when the virtual machine cannot make full use of it
- Memory elasticity the host can allocate the memory used by the virtual machine on demand
- DMA Direct Memory Access, which means that I/O devices can directly access main memory without CPU intervene
- Device-side page fault interrupt In a virtualization scenario, when the pass-through device accesses the memory of the virtual machine during DMA, if the host does not establish a mapping from the corresponding memory of the virtual machine to the memory of the host, the DMA will fail. In the case of hardware and software support, a page fault interrupt on the device side will be triggered, and the host will replay the DMA after the memory map is established.
- Memory management metadata metadata that records the status of each memory page frame in the operating system. In the Linux scenario, it is the memory area where the struct page is located and the content in the struct page
- GVA The virtual address space seen by the program inside the virtual machine
- GPA The physical memory space seen by the virtual machine
- HPA host physical memory space
- EPT Extended Page Table, used to establish a page table for mapping between virtual machine GPA and host machine HPA in a virtualization scenario
- IOMMU In a virtualization scenario, it is used to establish a page table for mapping between IOVA (generally virtual machine GPA) and HPA
- Host Refers to the host
- the embodiment of the present application provides a memory recovery method, which can be executed by a memory recovery device, and the memory recovery device can be integrated in electronic devices such as computers, servers, computers, server clusters, and data centers.
- FIG. 1 it is a flowchart of a memory recovery method according to an embodiment of the present application; wherein, the memory recovery method includes:
- S200 Reclaim free memory of the virtual machine based on the memory analysis function and the memory management metadata information.
- the virtual machine runs in the host machine, and one or more virtual machines can be set in one host machine, and different virtual machines are isolated from each other.
- the isolation between the same virtual machine is to prevent the resources (CPU, I/O device) allocated to other virtual machines from accessing the physical address of this virtual machine.
- Each virtual machine will have its own independent physical address space, that is, GPA (Guest Physical Address) space, which is different from the host physical address space, that is, HPA (Host Physical Address) space.
- free memory of the virtual machine is reclaimed based on the memory analysis function corresponding to the virtual machine and the memory management metadata information.
- the linus kernel still regards the physical page as the basic unit of memory management, and uses the struct page structure to represent each physical page in the system; memory management is usually done in pages processed as a unit.
- the physical memory can be divided into several physical pages. For example, on a host that supports a 4KB physical page size and has 1GB of physical memory, the physical memory will be divided into 262144 physical pages.
- the embodiment of the present application provides another memory recovery method, which is similar to the aforementioned memory recovery method, except that, as shown in FIG. 2 , the S200 is based on the memory analysis function and The memory management metadata information, after reclaiming the free memory of the virtual machine, the method further includes:
- the free memory corresponding to the allocation request of the virtual machine is a part of all the free memory recovered from the virtual machine; in this case, when allocating new physical memory to the virtual machine, only The portion of memory requested by the virtual machine.
- the memory parsing function is BPF bytecode compiled by the virtual machine. In this way, the compilation of the memory analysis function based on the eBPF program can be completed directly on the existing virtual machine, without the need for the virtual machine to provide additional hardware or additional paravirtualization drivers.
- FIG. 3 it is a schematic diagram of a memory recovery process, and the following content is described in detail in conjunction with this figure.
- the embodiment of the present application provides another memory recovery method, which is similar to the above-mentioned memory recovery method, the difference is that in S100, the memory management metadata information of the virtual machine is obtained and the memory management metadata information is parsed memory parsing functions, including:
- the memory management metadata information injected by the virtual machine and the compiled BPF bytecode of the memory analysis function are received .
- the eBPF source program of the memory analysis function is pre-written and put into the file system of the virtual machine; after the virtual machine starts, the eBPF source program of the memory analysis function in the file system is compiled into BPF bytecode, and The BPF bytecode of the compiled memory parsing function is injected into the host; through this In this way, the host machine obtains the BPF bytecode of the memory parsing function of the virtual machine.
- the memory management metadata information of the virtual machine includes struct page physical page information and corresponding struct page structure information; the struct page structure is created by the kernel for each struct page physical page, and the The struct page structure includes the field flags, which is used to describe the status and other information of the physical page.
- the field flags is mainly divided into 4 parts, in which the flag bit (the status identifier of the physical page) increases to the high bit, and the other bit fields section (mainly used Based on the sparse memory model SPARSEMEM), node (NUMA node number, which node the physical page belongs to), zone (memory domain mark, which zone the physical page belongs to) grows toward the lower bit, and there are idle bits in the middle.
- the memory management metadata information and memory analysis function will be injected into the host machine only after the virtual machine is started once, and the host machine can only scan the struct page physics of the virtual machine that has been injected with the memory management metadata information and memory analysis function Page. That is to say, the host machine can only reclaim the free memory of the virtual machine that has been started.
- the host machine can only scan the struct page physical pages of the virtual machines that have been started.
- the virtual machine can only be started if the host has allocated memory.
- the physical memory of the host machine is 100G
- the memory to be allocated to the virtual machines is 10G.
- the embodiment of the present application provides another memory recovery method, which is similar to the aforementioned memory recovery method, except that, as shown in Figure 4,
- the S200 based on the memory analysis function and the memory management metadata information, reclaim the free memory of the virtual machine, and scan out the memory of the virtual machine through the memory analysis function and the memory management metadata information After free memory, reclaim the free memory of the virtual machine.
- the memory management metadata information includes struct page physical page information and corresponding struct page structure information
- reclaiming the free memory of the virtual machine includes:
- the page structure physical page is a struct page physical page that stores the struct page structure information corresponding to the free struct page physical page.
- the virtual machine only transmits its memory management metadata information and memory analysis function to the host at the initial stage of startup; after that, the host can use this information to actively scan the free memory area in the virtual machine and reclaim the free memory of the virtual machine; And while reclaiming the free memory of the virtual machine and clearing the memory map of the free page, the memory map of the memory management metadata is cleared, so as to ensure that the memory we reclaim must be the free memory in the virtual machine.
- the struct page physical page corresponding to the flag bit flag of the preset identification is determined as a free struct page physical page.
- different virtual machines may have different labels for the flag bit flag in the struct page structure, so the flag bit flag for expressing "idle" is a preset flag and will also be different; for example, in a virtual machine, The flag bit in the struct page structure is PG-free, indicating that the corresponding struct page physical page is free; in another virtual machine, the flag bit flag in the struct page structure is PG-clean, indicating that the corresponding struct page is free page physical page.
- the struct page structure physical page is a struct page physical page storing the struct page structure information corresponding to the idle struct page physical page.
- FIG. 5 and FIG. 6 the EPT mapping table and the IOMMU mapping table are relatively similar, so in this embodiment, the process of memory recovery is illustrated through the EPT mapping table.
- Figure 5 and Figure 6 show the EPT mapping table and IOMMU mapping table before and after recycling respectively.
- the schematic diagram after receipt, the figure only expresses the simple content of the general process, and does not strictly correspond to the specific content of the EPT mapping table and the IOMMU mapping table. Therefore, when understanding, some expressions that are not drawn in the figure should not be used To identify errors in drawings or representations.
- the mapping relationship between the struct page physical pages of GPA, HPA, and IOVA is recorded in the EPT mapping table and the IOMMU mapping table; and is used to describe the struct page
- the struct page structure of the physical page also needs to be stored, which is stored in another struct page physical page, and the struct page physical page storing the struct page structure is the above-mentioned struct page structure physical page.
- the struct page physical page showing the mapping relationship through the connection is considered as a free struct page physical page.
- the permission bit is modified based on the struct page physical page as the basic unit, that is to say, once the permission bit of the mapping of a struct page physical page is modified to "read-only", the struct page All struct page structures stored in physical pages are restricted to "read-only”.
- the struct page physical page has a certain capacity and can store multiple struct page structures.
- a 4KB struct page physical page can store 64 struct page structures with a size of 64B; the 64 The struct page structure corresponds to 64 struct page physical pages.
- the modification of the permission bits of the physical page of the struct page structure in the EPT mapping table and the IOMMU mapping table means that the struct page structure is also modified to "read-only" at the same time, so the corresponding 64 The mapping of a struct page physical page in the EPT mapping table and the IOMMU mapping table.
- the modification of the physical page of the struct page structure is linked with the struct page physical page corresponding to the physical page of the struct page structure, and needs to be kept in sync; therefore, if the 64 in the physical page of the struct page structure A struct page structure has a corresponding struct page physical page that is not free (even if the remaining 63 are free), then the struct page structure physical page and its The corresponding 64 struct page physical pages cannot be reclaimed; only the 64 struct page structure physical pages in the struct page structure physical pages are all idle struct page physical pages, and all of them can be reclaimed.
- the allocation request of the virtual machine to the reclaimed free memory is when the virtual machine accesses the struct page whose permission bit is read-only in the EPT mapping table or the IOMMU mapping table Triggered when the physical page of the structure is mapped.
- the virtual machine if it needs to use new memory, it will access the corresponding struct page structure in the physical page of the "read-only” struct page structure, but this access will exceed the "read-only” permission, and return A page-fault signal.
- the host receives the page-fault signal, it can be considered that the virtual machine has given an allocation request for the reclaimed free memory.
- the allocating new physical memory to the virtual machine is re-establishing the mapping of free struct page physical pages in the EPT mapping table or the IOMMU mapping table.
- the modification of the permission bit of the mapping of the physical page of the struct page structure is a solution determined after considering the execution path of the kernel memory allocation of the virtual machine.
- the virtual machine allocates memory, its access to the struct page must be It will be intercepted by the host (returned page-fault signal), so that the page can establish EPT and IOMMU mapping before the virtual machine is available to prevent DMA failure.
- the virtual machine has no other changes except for injecting code and data into the host when it starts, so the intrusion control of the virtual machine is minimal, and it is easy to achieve software compatibility; the host actively and spontaneously updates the memory status of the virtual machine Scanning without waiting for the response of the virtual machine, so compared with the traditional PV solution, it can achieve better real-time performance; this solution is a pure software solution based on the existing architecture, and does not rely on supporting Page Fault on the device side Specific hardware and therefore hardware compatible.
- memory management metadata information and memory management metadata analysis functions are injected into the host machine through the virtual machine, so that the host machine can scan and reclaim the memory of the virtual machine actively in real time, improving the response speed of memory reclamation; Moreover, the recycling/redistribution of free memory does not involve Disk I/O, so the processing efficiency is also improved; while recycling, the modification of the corresponding struct page mapping is considered, so that this solution can be used in device direct scenarios.
- An embodiment of the present application provides a memory reclamation device configured to execute the memory reclamation method described above in the present application.
- the memory reclamation device will be described in detail below.
- the memory recycling device includes:
- An information acquisition module 101 which is used to acquire memory management metadata information of a virtual machine and a memory analysis function for parsing the memory management metadata information;
- a memory recycling module 102 configured to reclaim free memory of the virtual machine based on the memory analysis function and the memory management metadata information.
- the device also includes:
- a memory allocation module 103 configured to allocate new physical memory to the virtual machine in response to the virtual machine's allocation request for the reclaimed free memory.
- the memory analysis function is the compiled BPF bytecode of the virtual machine.
- the information acquisition module 101 is also used for:
- the memory management metadata information injected by the virtual machine and the compiled BPF bytecode of the memory analysis function are received .
- the memory reclaiming module 102 is further configured to reclaim the free memory of the virtual machine after scanning out the free memory of the virtual machine through the memory analysis function and the memory management metadata information.
- the memory management metadata information includes struct page physical page information and corresponding struct page structure information; the memory recycling module 102 is also used for:
- the body physical page is a struct page physical page that stores the struct page structure information corresponding to the free said struct page physical page.
- the reclaimed idle memory of the virtual machine The memory allocation request is triggered when the virtual machine accesses the mapping of the physical page of the struct page structure whose permission bit is read-only in the EPT mapping table or the IOMMU mapping table.
- the allocation of new physical memory to the virtual machine is to re-establish the mapping of free struct page physical pages in the EPT mapping table or the IOMMU mapping table.
- the memory reclamation device provided by the above embodiments of the present application is based on the same inventive concept as the memory reclamation method provided by the embodiments of the present application, and has the same beneficial effect as the method adopted, run or implemented by the stored application program.
- the memory recovery device can be implemented as a control device, including: a memory 301 and a processor 303 .
- the memory 301 may be configured to store programs.
- the memory 301 may also be configured to store other various data to support operations on the control device. Examples of such data include instructions for any application or method operating on the controlling device, contact data, phonebook data, messages, pictures, videos, etc.
- the memory 301 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
- SRAM static random access memory
- EEPROM electrically erasable programmable read-only memory
- EPROM erasable Programmable Read Only Memory
- PROM Programmable Read Only Memory
- ROM Read Only Memory
- Magnetic Memory Flash Memory
- Magnetic or Optical Disk any type of volatile or non-volatile storage device or their combination
- the processor 303 coupled to the memory 301, is used to execute the program in the memory 301 for:
- the processor 303 is specifically configured to:
- the memory parsing function is the compiled BPF byte of the virtual machine code.
- the processor 303 is specifically configured to:
- the memory management metadata information injected by the virtual machine and the compiled BPF bytecode of the memory analysis function are received .
- the processor 303 is specifically configured to: reclaim the free memory of the virtual machine after scanning out the free memory of the virtual machine through the memory analysis function and the memory management metadata information.
- the memory management metadata information includes struct page physical page information and corresponding struct page structure information; based on this, the processor 303 is specifically used to:
- the body physical page is a struct page physical page that stores the struct page structure information corresponding to the free said struct page physical page.
- the processor 303 is specifically configured to:
- the allocation request of the reclaimed free memory by the virtual machine is triggered when the virtual machine accesses the mapping of the physical page of the struct page structure whose permission bit is read-only in the EPT mapping table or the IOMMU mapping table.
- the processor 303 is specifically configured to:
- the allocating new physical memory to the virtual machine is to re-establish the mapping of free struct page physical pages in the EPT mapping table or the IOMMU mapping table.
- FIG. 8 only some components are schematically shown in FIG. 8 , which does not mean that the server device only includes the components shown in FIG. 8 .
- control device provided in this embodiment is based on the same inventive concept as the memory recovery method provided in the embodiment of this application, and has the same method adopted, run or implemented by its stored application program. Beneficial effect.
- the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
- computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
- These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
- the device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
- a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
- processors CPUs
- input/output interfaces network interfaces
- memory volatile and non-volatile memory
- Memory may include non-permanent storage in computer readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read-only memory (ROM) or flash RAM. Memory is an example of computer readable media.
- RAM random access memory
- ROM read-only memory
- flash RAM flash random access memory
- Computer-readable media including both permanent and non-permanent, removable and non-removable media, can be implemented by any method or technology for storage of information.
- Information may be computer readable instructions, data structures, modules of a program, or other data.
- Examples of computer storage media include, but are not limited to phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic tape cartridges, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
- computer-readable media excludes transitory computer-readable media, such as modulated data signals and carrier waves.
- the embodiments of the present application may be provided as methods, systems or computer program products. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
- a computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
La présente demande concerne un procédé et un appareil de récupération de mémoire, et un dispositif de commande. Le procédé consiste à : acquérir des informations de métadonnées de gestion de mémoire d'une machine virtuelle, et une fonction analytique de mémoire en vue d'analyser les informations de métadonnées de gestion de mémoire ; et sur la base de la fonction analytique de mémoire et des informations de métadonnées de gestion de mémoire, récupérer une mémoire inactive de la machine virtuelle. Au moyen de la récupération de la mémoire inactive d'une machine virtuelle, le problème selon lequel un mappage de mémoire de DMA sur un côté dispositif ne peut pas être modifié est évité, et un matériel supplémentaire ou un programme d'entraînement semi-virtualisé n'est pas nécessaire.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210197905.7A CN114840330A (zh) | 2022-03-01 | 2022-03-01 | 一种内存回收方法、装置及控制设备 |
CN202210197905.7 | 2022-03-01 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023165308A1 true WO2023165308A1 (fr) | 2023-09-07 |
Family
ID=82561832
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/075201 WO2023165308A1 (fr) | 2022-03-01 | 2023-02-09 | Procédé et appareil de récupération de mémoire, et dispositif de commande |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN114840330A (fr) |
WO (1) | WO2023165308A1 (fr) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114840330A (zh) * | 2022-03-01 | 2022-08-02 | 阿里巴巴(中国)有限公司 | 一种内存回收方法、装置及控制设备 |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130339568A1 (en) * | 2012-06-14 | 2013-12-19 | Vmware, Inc. | Proactive memory reclamation for java virtual machines |
CN105159742A (zh) * | 2015-07-06 | 2015-12-16 | 北京星网锐捷网络技术有限公司 | 一种虚拟机pci设备透传方法和系统 |
CN106843756A (zh) * | 2017-01-13 | 2017-06-13 | 中国科学院信息工程研究所 | 基于页面分类的内存页面回收方法及系统 |
US20180011797A1 (en) * | 2016-07-06 | 2018-01-11 | Massclouds Innovation Research Institute (Beijing) Of Information Technology | Memory sharing method of virtual machines based on combination of ksm and pass-through |
CN107885666A (zh) * | 2016-09-28 | 2018-04-06 | 华为技术有限公司 | 一种内存管理方法和装置 |
US10346313B1 (en) * | 2017-01-21 | 2019-07-09 | Virtuozzo International Gmbh | Memory reclaim management for virtual machines |
CN114840330A (zh) * | 2022-03-01 | 2022-08-02 | 阿里巴巴(中国)有限公司 | 一种内存回收方法、装置及控制设备 |
-
2022
- 2022-03-01 CN CN202210197905.7A patent/CN114840330A/zh active Pending
-
2023
- 2023-02-09 WO PCT/CN2023/075201 patent/WO2023165308A1/fr unknown
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130339568A1 (en) * | 2012-06-14 | 2013-12-19 | Vmware, Inc. | Proactive memory reclamation for java virtual machines |
CN105159742A (zh) * | 2015-07-06 | 2015-12-16 | 北京星网锐捷网络技术有限公司 | 一种虚拟机pci设备透传方法和系统 |
US20180011797A1 (en) * | 2016-07-06 | 2018-01-11 | Massclouds Innovation Research Institute (Beijing) Of Information Technology | Memory sharing method of virtual machines based on combination of ksm and pass-through |
CN107885666A (zh) * | 2016-09-28 | 2018-04-06 | 华为技术有限公司 | 一种内存管理方法和装置 |
CN106843756A (zh) * | 2017-01-13 | 2017-06-13 | 中国科学院信息工程研究所 | 基于页面分类的内存页面回收方法及系统 |
US10346313B1 (en) * | 2017-01-21 | 2019-07-09 | Virtuozzo International Gmbh | Memory reclaim management for virtual machines |
CN114840330A (zh) * | 2022-03-01 | 2022-08-02 | 阿里巴巴(中国)有限公司 | 一种内存回收方法、装置及控制设备 |
Also Published As
Publication number | Publication date |
---|---|
CN114840330A (zh) | 2022-08-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8261267B2 (en) | Virtual machine monitor having mapping data generator for mapping virtual page of the virtual memory to a physical memory | |
US9940228B2 (en) | Proactive memory reclamation for java virtual machines | |
US9183015B2 (en) | Hibernate mechanism for virtualized java virtual machines | |
US8176294B2 (en) | Reducing storage expansion of a virtual machine operating system | |
US10152409B2 (en) | Hybrid in-heap out-of-heap ballooning for java virtual machines | |
US20060184938A1 (en) | Method, apparatus and system for dynamically reassigning memory from one virtual machine to another | |
US7757034B1 (en) | Expansion of virtualized physical memory of virtual machine | |
JP2017045477A (ja) | 仮想ディスクストレージ技術 | |
EP2581828B1 (fr) | Procédé pour la création de machine virtuelle, moniteur de machine virtuelle et système de machine virtuelle | |
JP2009032252A (ja) | クラッシュダンプ用のメモリアロケーション | |
US9146847B2 (en) | Optimizing for page sharing in virtualized java virtual machines | |
WO2023165308A1 (fr) | Procédé et appareil de récupération de mémoire, et dispositif de commande | |
US20230205560A1 (en) | Selective memory deduplication for virtualized computer systems | |
JP5531476B2 (ja) | 情報処理装置及び情報処理プログラム | |
US11860792B2 (en) | Memory access handling for peripheral component interconnect devices | |
US11656982B2 (en) | Just-in-time virtual per-VM swap space | |
US12001869B2 (en) | Memory over-commit support for live migration of virtual machines | |
US11762573B2 (en) | Preserving large pages of memory across live migrations of workloads | |
US20140208034A1 (en) | System And Method for Efficient Paravirtualized OS Process Switching | |
US10394596B2 (en) | Tracking of memory pages by a hypervisor | |
JP2017033375A (ja) | 並列計算システム、マイグレーション方法、及びマイグレーションプログラム | |
US11586371B2 (en) | Prepopulating page tables for memory of workloads during live migrations | |
US11314522B2 (en) | Fast boot resource allocation for virtual machines | |
US20230266992A1 (en) | Processor for managing resources using dual queues, and operating method thereof | |
WO2024067479A1 (fr) | Procédé de détection de fuite de conteneur, dispositif électronique et système |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23762709 Country of ref document: EP Kind code of ref document: A1 |