A method and device for determining memory failure information

By querying the virtual machine address space database to determine the virtual machine affected by memory failure, the problem that the kernel cannot handle memory failures in a refined manner is solved, and efficient handling of memory failures is achieved.

CN114860432BActive Publication Date: 2025-03-18ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210437693.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-19
Publication Date
2025-03-18
Estimated Expiration
2042-04-19

AI Technical Summary

Technical Problem

When the memory of the computing node is managed by the virtual storage management module, after a memory failure occurs, the kernel cannot determine the specific virtual machine affected by the failure, resulting in the inability to perform fine-grained processing, affecting the normal operation of other memory that has not failed.

Method used

By obtaining the page address in the memory error data, querying the virtual machine address space database, determining the virtual machine affected by the memory failure, and performing refined processing.

Benefits of technology

It realizes refined processing of memory failures, avoids interference with the normal operation of other unfailed memory, and improves the processing ability of memory failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860432B_ABST
    Figure CN114860432B_ABST
Patent Text Reader

Abstract

One or more embodiments of the present specification provide a method and device for determining information of a memory fault, wherein the method comprises: obtaining memory error data, the memory error data comprising a page address of a memory page where a fault occurs; when the memory page is a memory page managed by a virtual storage management module and allocated to a virtual machine used by a virtual machine in a plurality of virtual machines, querying a virtual machine address space database according to the page address to determine memory fault information of the memory fault; the memory fault information comprises: a virtual machine identifier of the virtual machine to which the memory page is allocated; the virtual machine address space database comprises: a mapping relationship between a virtual machine identifier of any virtual machine in the plurality of virtual machines and a page address of a memory page allocated to the virtual machine. The method can determine the impact scope of a fault occurring in a memory managed by a virtual storage management module other than the kernel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of computer technology, and more particularly, to a method and device for determining information of a memory failure. Background Art

[0002] In the related art, the memory of the computing node is generally managed by the kernel. When a memory failure occurs, memory failure reporting information including the page address of the page (memory page) where the failure occurs will be reported. For computing nodes that provide virtual machine services, the memory of the computing node can be allocated / sold to different VMs (Virtual Machines) for use. The memory used by the multiple virtual machines allocated / sold is no longer managed by the kernel but by a virtual storage management module independent of the kernel. When this part of the memory fails, the kernel will not be able to perceive which virtual machine is using the storage space where the memory failure occurs based on the page address of the memory page where the failure occurs. That is, when a memory failure occurs, the scope of influence of the memory failure cannot be known, or in other words, sufficient information about the memory failure cannot be determined, and thus the failure cannot be processed in a refined manner. The entire memory can only be processed as a whole, so that the operation of the memory that has not failed is also affected. Summary of the invention

[0003] In view of this, one or more embodiments of the present specification provide a method and device for determining information of a memory failure.

[0004] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:

[0005] According to a first aspect of one or more embodiments of this specification, a method for determining information of a memory fault is provided, the method comprising:

[0006] Acquire memory error data, wherein the memory error data includes a page address of a memory page where a fault occurs;

[0007] In the case that the memory page is a memory page managed by a virtual storage management module and allocated to a virtual machine among multiple virtual machines for use, a virtual machine address space database is queried according to the page address to determine memory fault information of the memory fault; the memory fault information includes: a virtual machine identifier of the virtual machine to which the memory page is allocated; the virtual machine address space database includes: a mapping relationship between a virtual machine identifier of any virtual machine among the multiple virtual machines and a page address of a memory page allocated to the virtual machine.

[0008] According to a second aspect of one or more embodiments of this specification, a device for determining information of a memory fault is provided, the device comprising:

[0009] An error data acquisition module, used to acquire memory error data, wherein the memory error data includes a page address of a memory page where a fault occurs;

[0010] A database query module, configured to query a virtual machine address space database according to the page address to determine memory fault information of the memory fault when the memory page is a memory page managed by the virtual storage management module and allocated to one of the multiple virtual machines for use;

[0011] The memory fault information includes: the virtual machine identifier of the virtual machine to which the memory page is allocated; the virtual machine address space database includes: the mapping relationship between the virtual machine identifier of any virtual machine among the multiple virtual machines and the page address of the memory page allocated to the virtual machine.

[0012] According to a third aspect of one or more embodiments of the present specification, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the above-mentioned method for determining information of a memory fault is implemented.

[0013] According to a fourth aspect of one or more embodiments of this specification, an electronic device is provided, including:

[0014] processor;

[0015] a memory for storing processor-executable instructions;

[0016] The processor implements the above-mentioned method for determining information of memory failure by running the executable instructions.

[0017] According to a fifth aspect of one or more embodiments of the present specification, a computer program is proposed, which implements the above-mentioned method for determining information of memory fault when executed by a processor.

[0018] In one or more embodiments of the present specification, when a memory failure occurs, memory error data including the page address of the failed memory page is obtained. When the memory page is a memory page managed by the virtual storage management module and allocated to the virtual machine for use, the kernel cannot perceive which specific virtual machine's operation will be affected by the failed memory page. The present solution queries the virtual machine address space database according to the page address, finds the mapping relationship between the page address stored in the virtual machine address space database and the virtual machine identifier of the virtual machine, and determines the virtual machine affected by the memory failure, thereby enabling fine-grained processing of the memory failure without interfering with the normal operation of other non-failed memories, thereby improving the ability to handle memory failures. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1The present invention is a flowchart of a method for determining information of a memory failure provided by an exemplary embodiment.

[0020] Figure 2 It is a flowchart of another method for determining information of a memory failure provided by an exemplary embodiment.

[0021] Figure 3 It is a schematic diagram of a system framework provided by an exemplary embodiment.

[0022] Figure 4 It is a flowchart of an implementation method of a memory failure information determination method based on a central server provided by an exemplary embodiment.

[0023] Figure 5 It is a block diagram of a device for determining information of a memory fault provided by an exemplary embodiment.

[0024] Figure 6 It is a structural schematic diagram of a device provided by an exemplary embodiment. DETAILED DESCRIPTION

[0025] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0026] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0027] Generally speaking, the memory management of computing nodes, such as personal computers and servers, is performed by the kernel in the operating system. When performing memory management, the kernel will establish a mapping relationship between the physical memory of the hardware and the memory used by the process (called virtual memory), that is, the memory mapping mechanism. This mapping is based on the process. The physical memory is generally divided into multiple memory pages. When a memory fault occurs in the physical memory of the hardware, a memory fault reporting information containing the page address of the memory page where the fault is located will be reported. Based on the memory mapping mechanism, the kernel can find the process that uses the memory page where the fault is located, thereby determining the process involved in the memory fault, and thus knowing the scope of the impact of the memory fault.

[0028] As for the computing nodes that provide virtual machine services, the memory of the computing nodes can be allocated / sold to different virtual machines for use. The memory used by the multiple virtual machines allocated / sold is no longer managed by the kernel, but is managed by a virtual storage management module independent of the kernel. For the memory not managed by the kernel, there is no memory mapping mechanism. When this part of the memory fails, it will not be possible to directly obtain which virtual machine is using the physical storage space where the memory failure is located based on the page address of the memory page where the failure is located through the kernel interface. That is, when a memory failure occurs, it is impossible to know the scope of the impact of the memory failure, or to determine sufficient information about the memory failure, and thus it is impossible to perform refined processing on the failure, such as isolating all the storage space occupied by the virtual machine to prevent the failure from worsening and affecting the memory used by other virtual machines. Instead, the entire memory can only be processed as a whole, such as restarting the entire memory, which also affects the operation of the memory that has not failed.

[0029] Based on this, the present specification proposes a method for determining information of a memory fault, which method can determine the memory fault information of a specific virtual machine affected by the fault when the memory page where the fault is located is a memory page managed by a virtual storage management module and allocated to a virtual machine among multiple virtual machines. That is, it can determine which virtual machine specifically uses the physical storage space where the memory fault is located, or in other words, it can perform damage demarcation on the memory fault that occurs in the memory allocated to the virtual machine and determine the damaged virtual machine.

[0030] Next, at least one method for determining information of a memory fault provided in this specification will be described in detail.

[0031] like Figure 1 As shown, Figure 1 This is a flowchart of a method for determining memory fault information shown in this specification. The method can be executed by a computing node where a memory fault occurs, or can be executed by a central server that manages computing nodes, and includes the following steps:

[0032] In step 102, memory error data is obtained.

[0033] In this step, the memory error data may be error information including the page address of the failed memory page in the hardware memory generated by the memory error detection tool after detecting a memory failure. According to the error type, the memory failure can be divided into CE (Correctable Error) or UCE (Un-Correctable Error); the memory failure can also be divided into memory read and write errors and memory inspection errors according to the scenario. Among them, the page address can be the address or page number of the memory page in the physical memory.

[0034] Specifically, when an error occurs in the memory of the hardware, the memory error detection tool can query the memory page where the error occurs and report or print the error information. In this embodiment, the memory error detection tool can be various types of tools such as MCElog log (Machine Check Exceptions log log, hardware diagnostic log collection tool), EDAC (Error Detection And Correction, error detection and correction tool), SEl (System Event log, system event log) or register error detection.

[0035] In step 104, when the memory page is a memory page managed by a virtual storage management module and allocated to a virtual machine for use by one of the multiple virtual machines, a virtual machine address space database is queried according to the page address to determine memory fault information of the memory fault.

[0036] The memory fault information includes: the virtual machine identifier of the virtual machine to which the memory page is allocated; the virtual machine address space database includes: the mapping relationship between the virtual machine identifier of any virtual machine among the multiple virtual machines and the page address of the memory page allocated to the virtual machine. When storing the page address of each memory page allocated to the virtual machine, the multiple memory pages may be represented by the start address and end address of continuous memory pages, or the page address of each memory page may be stored separately.

[0037] The vmem module (virtual memory manager) is a module independent of the kernel that can allocate memory to different virtual machines and manage the memory allocated to the virtual machines. The kernel cannot know which virtual machine uses the memory managed by the vmem module. It can be said that the vmem module's memory management and the kernel's memory management are two parallel management solutions.

[0038] After a memory failure occurs, when the failed memory page is located in the memory managed by the kernel, the kernel can find the processes affected by the failure based on the mapping relationship between the hardware physical memory and the memory used by the process. These processes can be considered as running vmm (virtual machine monitor), such as: virtual IO (Input / Output) service, virtual computing service, virtual network service, and virtual storage service. Once these virtual management components fail, it is likely to affect the use of memory by all virtual machines. The kernel can directly determine the processes affected by the failure and report them, so that the processes affected by the failure can be repaired in a timely and targeted manner, such as interrupting or restarting the process, to avoid the error from getting worse.

[0039] After a memory failure occurs, when the failed memory page is located in the memory managed by the virtual storage management module, the kernel cannot determine the virtual machines affected by the failure. This method can query the virtual machine address space database according to the page address of the failed memory page to determine the virtual machines affected by the memory failure.

[0040] The virtual machine address space database is used to record the memory addresses managed by the vmem module and maintain all page address spaces allocated to multiple virtual machines. In the virtual machine address space database, different virtual machines are represented by different virtual machine identifiers. There is a mapping relationship between the virtual machine identifier of a virtual machine and the page addresses of all memory pages allocated to the virtual machine. The page addresses of all memory pages allocated to the virtual machine are the memory space addresses that the virtual machine can use.

[0041] Exemplarily, when the memory of the computing node includes 512GB of storage space, the 512GB of storage space generally adopts page-based storage management or segment-based storage management. Among them, a small part of the memory is used and managed by the kernel to maintain the normal operation of the virtual management component and other key services. Most of the memory will be managed and allocated by the vmem module, and the vmem module can allocate this part of the memory to different virtual machines. When allocating memory space to a virtual machine, a continuous segment of memory space can be allocated to a certain virtual machine. The segment of memory space consists of multiple memory pages, and the address space between the start address and the end address of these memory pages is continuous; or a discontinuous segment of memory space can be allocated to a certain virtual machine. The segment of memory space also consists of multiple memory pages, but the address space between the start address and the end address of these memory pages is not continuous. For example, if 8GB of memory is allocated to a virtual machine for use, it can be allocated to a continuous 8GB to a virtual machine, and to a segment of 4GB memory, two segments of 1GB memory and a segment of 2GB memory to another virtual machine. These four segments of memory are discontinuous.

[0042] The virtual machine address space database can automatically record the memory space address allocated by the vmem module to the virtual machine, the memory space address allocated by the vmem module to the virtual machine can be manually recorded in the virtual machine address space database, or the memory space address allocated by the vmem module to the virtual machine can be imported from other devices by the virtual machine address space database.

[0043] In one example, the memory allocation operation of the virtual storage management module may be monitored, and in response to the memory allocation operation being monitored, the virtual machine address space database may be updated according to the memory allocation operation. For example, a service component address space management module is set to continuously monitor the operation of the vmem module. When the vmem module performs a memory allocation operation, the service component address space management module can obtain the changes in the virtual machine implemented by the memory allocation operation and the address space occupied by the virtual machine, and update the virtual machine address space database accordingly. The service component address space management module will not invade the vmem module, and can maintain the virtual machine address space database in a more lightweight and independent manner.

[0044] Among them, the memory allocation operation includes any of the following: allocating memory pages to the virtual machine, and reclaiming memory pages that have been allocated to the virtual machine. Allocating memory pages to the virtual machine can be when the virtual storage management module creates the memory used by the new virtual machine, or when the memory used by the created virtual machine is expanded. Reclaiming memory pages that have been allocated to the virtual machine can be when the virtual storage management module releases the memory occupied by the created virtual machine when the created virtual machine no longer exists, or it can be when the memory used by the created virtual machine is reduced. These memory allocation operations can trigger an update to the virtual machine address space database, and updating the virtual machine address space database can be to create a mapping between a virtual machine identifier and the page address of the memory page allocated to the virtual machine for the newly created virtual machine, to modify the page address of the memory page allocated to the virtual machine in the original mapping, or to delete the original mapping when the memory allocated to the virtual machine is canceled.

[0045] In this step, the virtual machine address space database is queried according to the page address of the memory page. When it is found that there is a mapping relationship between the page address and a virtual machine identifier, or that there is a mapping relationship between the address segment where the page address is located and a virtual machine identifier, it is determined that the virtual machine affected by the failed memory page is the virtual machine corresponding to the virtual machine identifier, and memory fault information is output, including: the virtual machine identifier of the virtual machine to which the memory page is assigned.

[0046] In fact, when a memory failure occurs, the problem is often solved by isolating the process corresponding to the failure or interrupting and restarting the process. If it is not possible to determine which process has failed, all processes corresponding to the memory can only be processed on a large scale, which affects the normal business and reduces efficiency. Similarly, for computing nodes that allocate memory to multiple virtual machines, if the failure cannot be demarcated, the virtual machine that is actually affected by the failure cannot be processed, and the only way is to roughly restart or reset a large range of memory.

[0047] In the method for determining memory fault information shown in this embodiment, when a memory fault occurs, memory error data including the page address of the faulty memory page is obtained. When the memory page is a memory page managed by the virtual storage management module and allocated to the virtual machine for use, the kernel cannot perceive which specific virtual machine's operation will be affected by the faulty memory page. This solution queries the virtual machine address space database according to the page address, finds the mapping relationship between the page address stored in the virtual machine address space database and the virtual machine identifier of the virtual machine, and determines the virtual machine affected by the memory fault, thereby enabling fine-grained processing of the memory fault without interfering with the normal operation of other non-faulty memories, thereby improving the ability to handle memory faults.

[0048] When a memory failure (for example, CE) occurs, since CE is basically in burst form, a large number of error messages will be reported in a short period of time once a failure occurs. At this time, if the system queries the process of the associated page for each error message, it will cause the kernel to hang, and the process of scanning the page itself involves multiple kernel locks, which inevitably leads to kernel deadlock. In addition, the system log service can query all processes that use this failed page and then print it. If a page is shared by multiple processes, the existence of multiple kernel locks will cause the query to take too long, affecting system performance and causing kernel deadlock. Moreover, memory failures will worsen. If the root cause of the failure cannot be discovered and processed in time, the initial CE is very likely to be transformed into UCE, causing permanent damage to the memory.

[0049] Based on this, this specification provides another method for determining information of memory failure. Figure 2 is a flowchart of another method for determining information of a memory fault shown in this specification, the method may include the following processing, wherein Figure 1 The same steps of the process will not be described in detail.

[0050] In order to more conveniently explain the method in this embodiment, we introduce the concept of a key service component, which is used to define the scope of impact of memory failure on running services. It is mainly divided into two parts. One part is the virtual management component. For the memory managed by the kernel, the key service component affected by this part of the memory is the virtual management component. The virtual management component is a general concept, including virtual IO services, virtual computing services, virtual network services, and virtual storage services, etc. The other part is multiple virtual machines. For the memory managed by the virtual storage management module, the key service component affected by this part of the memory is one or more of the multiple virtual machines. The memory failure information determination method in this embodiment can be considered as a method for delimiting the damage to key service components caused by memory failures.

[0051] In step 202, a plurality of memory fault reporting information within a preset time period is received.

[0052] Each piece of memory fault reporting information includes: the page address of the memory page where the fault occurs. The preset time period can be set by those skilled in the art according to actual needs.

[0053] In this embodiment, the error information reported by the memory error detection tool after detecting a memory failure is no longer directly used, which will result in too many memory pages to be queried, consume a lot of time, and even cause kernel deadlock when it occurs in the memory managed by the kernel. Instead, multiple memory failure reporting information reported by the memory error detection tool within a preset time period is first received.

[0054] Here, multiple memory fault reporting information reported by the memory fault reporting module within a preset time period may be received. The memory fault reporting module may include memory error detection tools such as MCElog log and EDAC. The memory fault reporting module is executed in a daemon (daemon process), which is a continuously running program used to perform specific system tasks.

[0055] In step 204, at least one piece of memory fault reporting information including the same page address is aggregated to obtain a piece of memory error data, wherein the memory error data includes: the same page address.

[0056] For a large number of memory fault reports caused by memory faults, among which many memory fault report information are repeated reports of a faulty memory page, in this step, statistical analysis can be performed on the multiple memory fault report information received, and at least one memory fault report information including the same page address can be aggregated to obtain a memory error data for the page address.

[0057] For example, within 1 second, 100 memory fault reports are received, of which 30 are for memory faults occurring in page 1, 50 are for memory faults occurring in page 2, and 20 are for memory faults occurring in page 3. After aggregation, 3 pieces of memory error data are obtained, including page 1, page 2, and page 3. Then, only these 3 pieces of memory error data can be processed, which can avoid the additional system overhead and the risk of machine throttling caused by the query of a large number of service processes due to a large number of memory faults in a short period of time.

[0058] Here, a fault aggregation module may be used to parse multiple memory fault reporting information received within a preset time period to obtain page IDs and perform aggregation processing.

[0059] In one example, when performing aggregation processing to obtain memory error data, it also includes:

[0060] The number of pieces of information including at least one piece of memory fault reporting information having the same page address is counted, and a mapping relationship between the number of pieces of information and the same page address is recorded.

[0061] An example of recording memory error data is as follows:

[0062] page count

[0063] 0x223ff 30

[0064] 0x223ff is the page address of the memory page where the fault occurs, and count is the number of pieces of information including the memory fault reporting information of 0x223ff.

[0065] In step 206, when the memory page is a memory page managed by a virtual storage management module and allocated to a virtual machine for use by one of the multiple virtual machines, a virtual machine address space database is queried according to the page address to determine memory fault information of the memory fault.

[0066] In this embodiment, a service process query module can be set up, which provides two sub-modules. One sub-module is for querying the process of the memory managed by the kernel. The sub-module can be implemented using the kernel interface provided by the kernel. In the case where the memory page is a memory page managed by the kernel, the page address in the memory error data is used by the kernel to query the process using the memory page. The service process query module can query based on the data recorded by the fault aggregation module, and the query results are also recorded. For example, the kernel calls the kernel interface according to the page to query the result obtained as follows:

[0067] page pid list count

[0068] 0x223ff 332,123 30

[0069] Among them, pid list is a list of processes using memory page 0x223ff. It can be seen that the processes affected by this failure are 332 and 123.

[0070] Another submodule is a process query for the memory managed by vmem. This submodule is an optional module because we do not require to find the process used by the virtual machine. Those skilled in the art can set this module according to actual needs.

[0071] Since memory error data is aggregated data, when querying the process using the memory page based on the page address in the memory error data, the query volume is greatly reduced, and the query can be flexibly performed without blocking the log link or causing machine ramming and deadlock.

[0072] In the case where the memory page is managed by the virtual storage management module and allocated to a virtual machine for use by one of the multiple virtual machines, when the virtual machine address space database is queried according to the page address in the memory error data to determine the memory fault information of the memory fault, the query amount will also be greatly reduced, thereby improving the query efficiency and the speed of determining the memory fault information.

[0073] In one example, the method in this embodiment can be applied to a central server, and the central server can manage one or more computing nodes. The service component address space management module that monitors the vmem module in each computing node can be set in the central server. For example, when the vmem module of a computing node is monitored to perform a memory allocation operation, the information contained in the memory allocation operation is transmitted through the local optional link between the computing node and the central server to update the virtual machine address space database. The local optional link can reduce the congestion of the network used by the virtual machine. The virtual machine address space database is also located in the central server, managed and maintained by the central server, and can record the memory addresses managed by the respective vmem modules in one or more computing nodes.

[0074] When obtaining memory error data, the central server obtains the memory error data of the memory in at least one computing node, and processes the memory error data in different computing nodes respectively. In the case where a memory page in a certain memory error data is a memory page managed by a virtual storage management module and allocated to a virtual machine among multiple virtual machines, the virtual machine address space database is queried according to the page address. When this method is implemented in the central server, it does not occupy the computing and storage resources of the server, so that the memory of the computing node used for sale / allocation has a higher sale / allocation rate, and does not affect the business in the computing node.

[0075] In one example, after determining the memory fault information of the memory fault, the above information may also be stored in a key service component-memory fault database to facilitate statistical analysis of the faults that occurred.

[0076] Specifically, a key service component-memory fault mapping module may be used to map processes, key service components, memory pages, etc. For example, the mapping relationship recorded in the key service component-memory fault database may be as follows:

[0077]

[0078] Among them, avs represents the virtual network service, instance1 is the virtual machine identifier of the virtual machine, and the memory page where the fault occurs is 0x223ff. The fault affects the virtual network service and the virtual machine instance1. The affected processes are processes 332 and 123 managed by the kernel and process 2345 in the virtual machine.

[0079] See also Figure 3 , Figure 3 The system framework diagram composed of a fault aggregation module, a service process query module, a service component address space management module, a key service component-memory fault mapping module and a key service component-memory fault database used in the process of implementing the memory fault information method in this embodiment is shown.

[0080] In the method for determining memory fault information shown in the present embodiment, when a memory fault occurs, multiple memory fault reporting information within a preset time period is received, memory error data including the page address of the memory page where the fault occurs is obtained, and at least one memory fault reporting information including the same page address is aggregated and processed, so that the amount of queries required to be performed based on the page address of the memory page is greatly reduced, regardless of whether it is for the memory managed by the kernel or the memory managed by the virtual storage management module; and, in the case where the memory page is a memory page managed by the virtual storage management module and allocated to the virtual machine for use, the virtual machine address space database is queried based on the page address, the mapping relationship between the page address stored in the virtual machine address space database and the virtual machine identifier of the virtual machine is found, and the virtual machine affected by the memory fault is determined, so that the memory fault can be processed in a refined manner without interfering with the normal operation of other non-faulty memories, thereby improving the processing capability of memory faults.

[0081] Figure 4 A flowchart of a method for determining information of a memory failure based on a central server is shown. Figure 4 As shown, in this embodiment, a central server manages multiple computing nodes and determines the memory fault information of each computing node. The virtual machine address space database (i.e., VMs address space DB in the figure, local means that the database is located on the central server, which is a local database) is also located on the central server and is managed and maintained by the central server. The memory addresses managed by the vmem modules of each of the multiple computing nodes can be recorded.

[0082] This method can be divided into two processes in actual implementation, the hollow circle represents the starting point of the process, and the solid circle represents the end of the process.

[0083] First, the process on the left is explained: a process that monitors the memory allocation operation of vmem can be always run, that is, "Vmem allocation monitoring". When a memory allocation operation is monitored, that is, "whether there is a vm creation / release / expansion / reduction operation", the virtual machine address space database is updated according to the memory allocation operation, that is, "VMs address space update". For example, a service component address space management module is set in the central server to continuously monitor the memory operations of the vmem modules in each computing node. When the vmem module of a computing node is monitored to perform a memory allocation operation, the service component address space management module can obtain the changes in the vm implemented by the memory allocation operation and the address space occupied by the vm, and transmit the above information contained in the memory allocation operation through the local optional link between the computing node where the VM is located and the central server, so as to update the virtual machine address space database. The service component address space management module will not invade the vmem module, and can maintain the virtual machine address space database more lightly and independently. The local optional link can reduce the congestion of the network used by the virtual machine.

[0084] Next, the process on the right is explained: you can always run any one or several memory error detection tools such as mcelog / edac / sel / register detection. When a memory failure is detected, the memory error detection tool will report a large amount of error information, namely "memory CE reporting"; in real time, multiple error information including the same page will be aggregated to obtain a piece of memory error data. The memory error data includes: the same page, namely "real-time error aggregation". For the memory error data obtained after aggregation, you can query the process according to the page, which greatly reduces the amount of queries required according to the page.

[0085] If the page is not vmem memory, it is kernel-managed memory. You can query the process by calling the kernel interface, and establish a mapping between the queried process and the page where the fault is located, that is, establish a "key service component-memory fault mapping", and the process ends. If the page is vmem memory, that is, memory managed by the vmem module, the vm corresponding to the page is obtained by reading the cache of the virtual machine address space database (VMs address space DB), and establish a mapping between the vm and the page where the fault is located, that is, establish a "key service component-memory fault mapping", and the process ends.

[0086] like Figure 5 As shown, Figure 5 This specification is a memory fault information determination device according to an exemplary embodiment, the device comprising:

[0087] The error data acquisition module 301 is used to acquire memory error data, where the memory error data includes a page address of a failed memory page.

[0088] The database query module 302 is used to query the virtual machine address space database according to the page address to determine the memory fault information of the memory fault when the memory page is a memory page managed by the virtual storage management module and allocated to one of the multiple virtual machines for use.

[0089] Among them, the memory fault information includes: the virtual machine identifier of the virtual machine to which the memory page is allocated; the virtual machine address space database includes: the mapping relationship between the virtual machine identifier of any virtual machine among the multiple virtual machines and the page address of the memory page allocated to the virtual machine.

[0090] In one example, the error data acquisition module 301 is specifically used to: receive multiple memory fault reporting information within a preset time period, each of the memory fault reporting information includes: the page address of the memory page where the fault occurs; aggregate at least one memory fault reporting information including the same page address to obtain a memory error data, and the memory error data includes: the same page address.

[0091] In an example, the error data acquisition module 301 is further used to: count the number of pieces of information including at least one piece of memory fault reporting information having the same page address, and record a mapping relationship between the number of pieces of information and the same page address.

[0092] In one example, in the case where the memory page is a memory page managed by a kernel, the page address in the memory error data is used by the kernel to query a process using the memory page.

[0093] In one example, the database query module 302 is further used to: monitor the memory allocation operation of the virtual storage management module; and in response to monitoring the memory allocation operation, update the virtual machine address space database according to the memory allocation operation.

[0094] In an example, the memory allocation operation includes any of the following: allocating a memory page to a virtual machine, and reclaiming a memory page that has been allocated to the virtual machine.

[0095] In one example, the method is applied to a central server, and the central server includes the virtual machine address space database; the error data acquisition module 301 is specifically used for: the central server to obtain memory error data of the memory in at least one computing node.

[0096] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.

[0097] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. A person of ordinary skill in the art can understand and implement it without paying creative labor.

[0098] like Figure 6 As shown, Figure 6 A hardware structure diagram of a computer device in which the memory fault information determination device in the above embodiment is located is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other in communication within the device through the bus 1050.

[0099] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0100] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0101] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0102] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0103] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0104] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0105] The embodiments of the present specification also provide a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for determining information of a memory fault as described above is implemented.

[0106] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0107] This specification also provides a computer program, which, when executed, implements the above-mentioned method for determining memory fault information.

[0108] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0109] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0110] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.

Claims

1. A method for determining information of a memory failure, the method comprising: Acquire memory error data, wherein the memory error data represents data detected when a memory failure occurs, and the memory error data includes a page address of a memory page where the failure occurs; In the case where the memory page is a memory page managed by a virtual storage management module and allocated to a virtual machine for use by one of the multiple virtual machines, querying a virtual machine address space database according to the page address to determine memory fault information of the memory fault; The memory fault information includes: the virtual machine identifier of the virtual machine to which the memory page is allocated; the virtual machine address space database includes: the mapping relationship between the virtual machine identifier of any virtual machine among the multiple virtual machines and the page address of the memory page allocated to the virtual machine.

2. The method according to claim 1, The obtaining of memory error data includes: Receive multiple memory fault reporting information within a preset time period, each of the memory fault reporting information includes: a page address of a memory page where a fault occurs; Aggregate at least one piece of memory fault reporting information including the same page address to obtain a piece of memory error data, wherein the memory error data includes: the same page address.

3. The method according to claim 2, The step of aggregating at least one piece of memory fault reporting information including the same page address to obtain a piece of memory error data further includes: The number of the at least one piece of memory fault reporting information including the same page address is counted, and a mapping relationship between the number of the information and the same page address is recorded.

4. The method according to claim 2, wherein, when the memory page is a memory page managed by a kernel, the page address in the memory error data is used by the kernel to query a process using the memory page.

5. The method according to claim 1, The method further comprises: Monitoring the memory allocation operation of the virtual storage management module; In response to monitoring the memory allocation operation, the virtual machine address space database is updated according to the memory allocation operation.

6. The method according to claim 5, The memory allocation operation includes any one of the following: allocating a memory page to a virtual machine, and reclaiming a memory page that has been allocated to a virtual machine.

7. The method according to any one of claims 1 to 6, wherein the method is applied to a central server, and the central server comprises the virtual machine address space database; The obtaining of memory error data includes: The central server obtains memory error data of a memory in at least one computing node.

8. A device for determining information of a memory failure, the device comprising: An error data acquisition module, used to acquire memory error data, wherein the memory error data includes a page address of a memory page where a fault occurs; A database query module, configured to query a virtual machine address space database according to the page address to determine memory fault information of the memory fault when the memory page is a memory page managed by the virtual storage management module and allocated to one of the multiple virtual machines for use; The memory fault information includes: the virtual machine identifier of the virtual machine to which the memory page is allocated; the virtual machine address space database includes: the mapping relationship between the virtual machine identifier of any virtual machine among the multiple virtual machines and the page address of the memory page allocated to the virtual machine.

9. An electronic device, comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 7 by running the executable instructions.

10. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 7.

11. A computer program product, the computer program product being configured to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for ensuring fault isolation of virtual machines of cache-aware multi-core processor

    CN102053873A

  • Page access method, page access device and server

    CN103488523A