A memory error rate monitoring and repair method and system

By associating data importance levels with physical addresses during memory allocation and selecting differentiated strategies when errors occur, the problem of failing to consider data importance in existing technologies is solved, enabling intelligent and refined handling of memory errors and improving system reliability and resource utilization efficiency.

CN120670207BActive Publication Date: 2026-02-06SHENZHEN YOUZHI COMPUTER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510828216.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2026-02-06
Estimated Expiration
2045-06-20

AI Technical Summary

Technical Problem

Existing memory error response strategies fail to adequately consider the real-time importance of data, resulting in imprecise processing when faced with data of varying value, which may lead to system crashes, data inconsistencies, or resource waste.

Method used

By associating data importance levels with physical addresses during memory allocation, the system monitors memory errors to obtain the data importance at the erroneous addresses, and selects differentiated repair or mitigation strategies based on error type and data importance. This includes techniques such as building a memory allocation metadata table, strategy query key-value pairs, and priority queues.

Benefits of technology

It enables differentiated handling of memory errors based on data value, improves the protection of high-value data, avoids unnecessary processing of low-value data, and enhances system reliability and resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670207B_ABST
    Figure CN120670207B_ABST
Patent Text Reader

Abstract

The application provides a memory error rate monitoring and repairing method and system, applied to the technical field of data storage, and solves the problem that the prior art fails to consider data importance, leading to an inexact strategy, by associating data importance with a physical address when memory is allocated, obtaining data importance corresponding to an error address when an error occurs, and selecting a differentiated repairing strategy based on an error type, an error address and data importance. The application has the advantages that a memory error repairing or relieving strategy can be selected and executed differently according to real-time importance of stored data in the memory and the error type, thereby improving the protection level of high-value data, avoiding unnecessary processing of low-value data, and improving system reliability and resource utilization efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data storage, and in particular to a memory error rate monitoring and repairing method and system. BACKGROUND

[0002] During the continuous operation of a computing system, memory cells undertake data storage and access tasks. Memory cells may experience error events such as changes in data bit states. The system usually has a memory error monitoring function deployed internally, which continuously monitors the state of the memory cells and captures error events.

[0003] When the memory error monitoring function detects an error, the traditional response strategy may mainly be based on the error type and the frequency or location of the error occurrence. For uncorrectable errors, the memory page containing the address is marked as a bad page, or the entire memory region is offline to prevent the error data from being further used or propagated. This response is relatively simple and direct, and easy to implement.

[0004] However, this response strategy based only on the properties and physical location of the error itself fails to fully consider the importance of the data currently stored at the memory address. If the address where the error occurred stores the state information of a critical system lock or the core data of an ongoing high-value transaction, simply taking the memory page offline may cause system crashes, data inconsistencies, serious business losses, and even security vulnerabilities.

[0005] Moreover, the distribution of data in the system memory is highly dynamic. With the start, execution, and termination of tasks, memory allocation and deallocation occur frequently, and the same physical address may store different types and importance of data at different times. If the system lacks effective means to quickly and accurately obtain and evaluate the real-time importance of the affected data when an error occurs, its memory error response strategy will not be fine-grained and intelligent.

[0006] Therefore, in the memory of a computing system, in the face of the challenge of varying importance levels of stored data and dynamic changes in their physical locations, how to quickly and accurately perceive the real-time importance of the affected data when a memory error is detected, and based on this importance information and the error type, intelligently and differentially formulate and execute memory error repair or mitigation strategies to ensure the integrity of high-value data and business continuity, while avoiding excessive resource consumption or unnecessary interruptions caused by error handling for low-value data.

[0007] In view of the above problems, the existing technology needs to be improved. SUMMARY

[0008] In view of the above deficiencies of the prior art, the present application provides a memory error rate monitoring and repairing method and system, which has the advantages of being able to differentially select and execute memory error repairing or mitigation strategies according to the real-time importance of the data stored in the memory and the error type, thereby improving the protection level of high-value data, avoiding unnecessary processing of low-value data, and improving system reliability and resource utilization efficiency.

[0009] In a first aspect, a memory error rate monitoring and repairing method is provided, which comprises the steps of:

[0010] S1: obtaining a data importance level identifier in a memory allocation request;

[0011] S2: in response to the memory allocation request, allocating a physical address range from a physical memory pool and associating the data importance level identifier with the allocated physical address range, and storing to a memory allocation metadata table;

[0012] S3: when a memory error occurs, obtaining an error physical address and an error type, and determining the data importance level identifier corresponding to the memory error from the memory allocation metadata table according to the error physical address;

[0013] S4: selecting a corresponding memory error repairing or mitigation strategy from a preset differential strategy set according to the error type, the error physical address, and the data importance level identifier corresponding to the error memory;

[0014] S5: executing the selected memory error repairing or mitigation strategy.

[0015] The memory error rate monitoring and repairing method provided by the present application solves the problem that the prior art fails to consider data importance, resulting in an imprecise strategy, by associating data importance with a physical address when memory is allocated, obtaining the data importance corresponding to the error address when an error occurs, and selecting a differential repairing strategy based on the error type, error address, and data importance. The method has the advantages of being able to differentially select and execute memory error repairing or mitigation strategies according to the real-time importance of the data stored in the memory and the error type, thereby improving the protection level of high-value data, avoiding unnecessary processing of low-value data, and improving system reliability and resource utilization efficiency.

[0016] Further, step S1 comprises:

[0017] S11: receiving a memory allocation request, wherein the memory allocation request contains a data importance level identifier and a requested memory size;

[0018] S12: Check the validity of the data importance level identifier, if the data importance level identifier is not within the preset level range, use the preset default data importance level identifier to replace, and record the replacement information to the system log;

[0019] S13: Send the data importance level identifier and the requested memory size to the memory management module.

[0020] The memory error rate monitoring and repairing method provided in the application increases the validity check and processing mechanism for the data importance level identifier obtained in the memory allocation request, thereby ensuring that the subsequent steps can operate based on the valid data importance level, solving the potential problems caused by invalid level identifier, and improving the robustness and reliability of the entire method.

[0021] Further, step S2 includes:

[0022] S21: In response to the memory allocation request, select an idle physical address range that meets the request size from the physical memory pool, generate a page table entry, and the page table entry at least contains the start address and end address of the physical address range;

[0023] S22: Determine the corresponding metadata storage structure type according to the data importance level identifier in the memory allocation request;

[0024] S23: Based on the determined metadata storage structure type, create an entry in the memory allocation metadata table, the start address of the physical address range as the key value, and the metadata information containing the data importance level identifier and the physical address range as the corresponding data of the key value, stored in the memory allocation metadata table.

[0025] The memory error rate monitoring and repairing method provided in the application determines different metadata storage structure types according to the data importance level identifier, and stores metadata in the structure, thereby improving the organization efficiency and subsequent search efficiency of the memory allocation metadata table, and solving the problem of quickly positioning in a large number of dynamically changing metadata.

[0026] Further, step S22 includes:

[0027] S221: Establish a storage correspondence relationship between the data importance level and the metadata storage structure, and the storage correspondence relationship includes: high importance level corresponds to hash table, medium importance level corresponds to B+ tree, and low importance level corresponds to linked list;

[0028] S222: According to the data importance level identifier in the memory allocation request, query the storage correspondence relationship to determine the metadata storage structure type;

[0029] S223: If the query fails, a preset default metadata storage structure type is adopted.

[0030] The memory error rate monitoring and repairing method provided in the application provides a technical solution of differentiating selection of metadata storage structures according to data importance levels by concretizing the process of determining the metadata storage structure type according to the data importance level identifier, thereby improving the management efficiency of the memory allocation metadata table and the subsequent search efficiency, and solving the problem of low efficiency of metadata management of different importance levels.

[0031] Further, step S3 comprises:

[0032] S31: When a memory error is monitored, the error physical address and the error type are obtained, and the error type is coded into an error type enumeration value;

[0033] S32: The physical address range entry containing the error physical address is searched in the memory allocation metadata table; if the search fails, it is determined as illegal memory access, an error report containing an illegal access flag is generated, and the process is terminated;

[0034] S33: If the search is successful, the data importance level identifier is extracted from the found physical address range entry, and the error type enumeration value is combined to generate a memory error report containing the data importance level identifier and the error type enumeration value.

[0035] Further, step S32 comprises:

[0036] S321: An ordering index table is constructed, which stores the start address of the physical address range entry and the offset of the corresponding entry in the memory allocation metadata table, and the physical address range entries are sorted in ascending order of start address;

[0037] S322: According to the error physical address, the maximum entry offset with a start address less than or equal to the error physical address is searched in the ordering index table by binary search method;

[0038] S323: If the entry offset is found, the corresponding physical address range entry is read from the memory allocation metadata table according to the offset, and it is judged whether the error physical address falls within the physical address range;

[0039] S324: If it is not within the range, it is determined as illegal memory access, an error report containing an illegal access flag is generated, and the process is terminated; if the entry offset is not found, it is determined as illegal memory access, an error report containing an illegal access flag is generated, and the process is terminated.

[0040] Further, step S4 comprises:

[0041] S41: construct a strategy query key value, which contains the error type enumeration value, the data importance level identifier, and the physical address range to which the error physical address belongs;

[0042] S42: according to the strategy query key value, search for a matched memory error repair or mitigation strategy in a preset differential strategy set;

[0043] S43: if a matched memory error repair or mitigation strategy is found, output the strategy; if no matched memory error repair or mitigation strategy is found, select a preset default memory error repair or mitigation strategy corresponding to the data importance level identifier and output.

[0044] Further, step S42 includes:

[0045] S421: according to the strategy query key value, determine whether the error type enumeration value indicates a tolerable error in the preset differential strategy set; if the error type enumeration value indicates a tolerable error, select a preset default memory error mitigation strategy corresponding to the data importance level identifier;

[0046] S422: if the error type enumeration value indicates an intolerable error, use the error type enumeration value and the data importance level identifier as a key value, use a Bloom filter to screen the preset differential strategy set, exclude the repair strategies that do not contain the key value, and then match the remaining repair strategies to determine a matched memory error repair strategy.

[0047] Further, step S5 includes:

[0048] S51: establish a memory error repair or mitigation strategy execution priority queue;

[0049] S52: select a strategy with the highest priority from the memory error repair or mitigation strategy execution priority queue, determine whether the current computing system resource meets the demand for executing the strategy, and if so, execute the strategy;

[0050] S53: if not, re-add the strategy to the memory error repair or mitigation strategy execution priority queue, reduce the priority of the strategy, and re-execute S52; if the strategy execution fails, select a strategy with the second highest priority to execute, until the strategy execution succeeds or the strategy execution priority queue is empty.

[0051] The second aspect is a memory error rate monitoring and repair system applied in the steps of the method, and the system includes:

[0052] A first acquisition module: acquire a data importance level identifier in a memory allocation request;

[0053] The storage module: in response to a memory allocation request, allocates a physical address range from a physical memory pool, associates the data importance level identifier with the allocated physical address range, and stores it to a memory allocation metadata table;

[0054] The second acquisition module: when a memory error is monitored, the error physical address and error type of the error occurrence are acquired, and the data importance level identifier corresponding to the memory error is determined from the memory allocation metadata table according to the error physical address;

[0055] The policy selection module: according to the error type, the error physical address, and the data importance level identifier corresponding to the error memory, a corresponding memory error repair or mitigation strategy is selected from a preset differentiated strategy set;

[0056] The policy execution module: executes the selected memory error repair or mitigation strategy.

[0057] Advantages: The memory error rate monitoring and repair method and system provided by the present application solves the problem that the prior art fails to consider data importance, resulting in an imprecise strategy, by associating data importance with physical addresses during memory allocation, acquiring the data importance corresponding to the error address when an error occurs, and selecting a differentiated repair strategy based on the error type, error address, and data importance. The method has the advantages of being able to select and execute a memory error repair or mitigation strategy in a differentiated manner according to the real-time importance of the data stored in the memory and the error type, thereby improving the protection level of high-value data, avoiding unnecessary processing of low-value data, and improving system reliability and resource utilization efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0058] Figure 1 A flowchart of a memory error rate monitoring and repair method is provided for the present application.

[0059] Figure 2 A structure diagram of a memory error rate monitoring and repair system is provided for the present application.

[0060] Figure 3 An architecture diagram of a memory error rate monitoring and repair system is provided for the present application.

[0061] Label explanation: 201, first acquisition module; 202, storage module; 203, second acquisition module; 204, policy selection module; 205, policy execution module. DETAILED DESCRIPTION

[0062] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. The components of the embodiments of the present application described and shown in the drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0063] It should be noted that similar reference numerals and letters refer to similar items throughout the drawings, and therefore, once an item is defined in one drawing, it need not be further defined and explained in subsequent drawings. Meanwhile, in the description of the present application, the terms "first", "second", and the like are only used to distinguish descriptions, and cannot be understood as indicating or implying relative importance.

[0064] Please refer to Figure 1 A memory error rate monitoring and repairing method, the method comprising the steps of:

[0065] S1: obtaining a data importance level identifier in a memory allocation request;

[0066] S2: in response to the memory allocation request, allocating a physical address range from a physical memory pool, and associating the data importance level identifier with the allocated physical address range, and storing to a memory allocation metadata table;

[0067] S3: when a memory error is monitored, obtaining an error physical address and an error type where the error occurs, and determining a data importance level identifier corresponding to the memory error from the memory allocation metadata table according to the error physical address;

[0068] S4: according to the error type, the error physical address, and the data importance level identifier corresponding to the error memory, selecting a corresponding memory error repairing or mitigating strategy from a preset differentiated strategy set;

[0069] S5: executing the selected memory error repairing or mitigating strategy.

[0070] The data importance level identifier refers to a mark used to distinguish the importance of different data in the system or business, which can be implemented by a numerical value, for example, integer value 1 represents high importance, integer value 2 represents medium importance, and integer value 3 represents low importance. It is mainly used to record the important attributes of data during memory allocation, and to provide a basis for subsequent error processing.

[0071] The memory allocation metadata table refers to a structure for storing memory allocation related information, which can be implemented by a hash table, such as a key-value pair set, the key is the start address of the physical address range, and the value is the information containing the data importance level identifier and the physical address range, which is mainly to establish and maintain the association between the physical address range and the data importance level, so as to quickly query when an error occurs.

[0072] The preset differentiated strategy set refers to a set containing multiple pre-defined processing methods for different memory error cases, which can be organized in the form of lookup table, rule engine, decision tree, etc., such as a mapping relationship, the input is the error type and the data importance level, and the output is the corresponding repair or mitigation operation sequence, which is mainly to select the most appropriate processing scheme according to the error attribute and the data importance, and to realize the fine error response.

[0073] As a preferred embodiment, the scheme of the present application is implemented as follows:

[0074] When receiving a memory allocation request, the request contains an integer value representing data importance, such as 1 for high importance, 2 for medium importance, and 3 for low importance. The system allocates a physical memory region from the physical memory pool, such as starting address 0x10000000, size 4KB. The system associates the integer value with the physical address range (0x10000000-0x10000FFF), and stores this association information in a hash table, with the starting address 0x10000000 of the physical address range as the key, and the structure containing the importance level and the physical address range as the value.

[0075] When monitoring that a memory error occurs at physical address 0x10000100, the system obtains the error type, such as single-bit error. The system uses the error physical address 0x10000100 to find the physical address range containing the address in the hash table, finds the entry with the key 0x10000000, and extracts the data importance level identifier, such as integer value 1 (high importance). The system looks up the corresponding strategy in a preset strategy lookup table according to the error type (single-bit error) and the data importance level (high importance). For example, the lookup table indicates that for single-bit error of high importance data, ECC correction should be performed and detailed logs should be recorded. The system then performs the ECC correction and log recording operation.

[0076] By the above scheme, the application solves the problem that the traditional memory error processing method cannot perceive the real-time importance of data. By establishing the association between the physical address and the importance of data when the memory is allocated, and using the association information when the error occurs, combined with the error type, the real-time importance of the affected data can be quickly and accurately determined. Based on the importance of data and the error type, the most suitable repair or mitigation strategy is selected and executed from the preset differentiated strategy set, thereby realizing intelligent and differentiated processing of memory errors. This avoids insufficient processing of high-value data leading to system crash or data loss, and also avoids over-processing of low-value data causing resource waste or unnecessary interruption, improving system stability and business continuity.

[0077] Further, step S1 includes:

[0078] S11: receiving a memory allocation request, the memory allocation request containing a data importance level identifier and a requested memory size;

[0079] S12: checking the validity of the data importance level identifier, if the data importance level identifier is not within the preset level range, a preset default data importance level identifier is used to replace it, and the replacement information is recorded to the system log;

[0080] S13: sending the data importance level identifier after verification or replacement and the requested memory size to the memory management module.

[0081] The present scheme refines the steps of obtaining the data importance level identifier and constructs a robust data importance information acquisition mechanism.

[0082] Step S11 is the starting point of obtaining the original information.

[0083] Step S12 checks the validity of the extracted data importance level identifier to determine whether it meets the system's preset specifications. This checking step is critical as it can identify and isolate data identifiers that do not meet the requirements. If the check finds that the identifier is invalid, the system will not directly use the invalid information, but will use a preset default data importance level identifier to replace it. This replacement mechanism ensures that even if the request source provides incorrect or non-standard identifiers, the system can obtain a valid and usable importance level information, avoiding subsequent processing interruptions or errors caused by invalid data.

[0084] Step S13 records this replacement behavior in the system log, providing a basis for subsequent system analysis, problem troubleshooting or strategy optimization. Finally, the data importance level identifier after validity processing is transmitted to the memory management module together with the original requested memory size.

[0085] The data importance level information used by the memory management module in subsequent memory allocation and operations such as associating importance levels with allocated physical address ranges is confirmed to be valid. This ensures that subsequent differentiated metadata management, error monitoring, error type judgment, and most importantly, differentiated repair strategy selection and execution based on data importance levels can be based on accurate and reliable importance information, thereby improving the reliability and effectiveness of the entire memory error rate monitoring and repair method, enabling truly fine-grained and intelligent processing based on data importance levels, and solving the problem of invalid original identification leading to the failure of the entire differentiated processing chain.

[0086] Further, step S2 comprises:

[0087] S21: in response to a memory allocation request, selecting an idle physical address range meeting the request size from a physical memory pool, generating a page table entry, the page table entry at least containing the start address and end address of the physical address range;

[0088] S22: determining the corresponding metadata storage structure type according to the data importance level identifier in the memory allocation request;

[0089] S23: based on the determined metadata storage structure type, creating an entry in the memory allocation metadata table, the start address of the physical address range as the key value, the metadata information containing the data importance level identifier and the physical address range as the data corresponding to the key value, stored in the memory allocation metadata table.

[0090] The method proposed in the present application refines the metadata storage method in the memory allocation process, and realizes efficient organization of the memory allocation metadata table. Specifically, after receiving a memory allocation request and determining the physical address range to be allocated, the method further acquires the data importance level identifier associated with the request. Based on the importance level identifier, the system intelligently determines a storage structure type suitable for storing the data metadata.

[0091] For example, for high importance data, a hash table with high search efficiency can be selected; for medium importance data, a B+ tree supporting range search can be selected; for low importance data, a linked list with high space efficiency can be selected. After determining the storage structure type, the system will create or update an entry in the memory allocation metadata table using the determined structure type. The entry uses the start address of the allocated physical address range as the index key value, and stores metadata information including the data importance level identifier and the physical address range.

[0092] In this way, data metadata of different importance levels are respectively stored in or organized in structures suitable for their access characteristics. When a subsequent memory error occurs and an error physical address is obtained, the system can use the error physical address, in particular the starting address of the physical address range where it is located, to quickly locate the corresponding metadata entry in the optimized metadata storage structure, thereby obtaining the real-time importance level of the data affected by the error.

[0093] This way of differentiating organizing and storing metadata according to data importance levels improves the lookup efficiency of the memory allocation metadata table, especially in the case of a large number of metadata entries and dynamic changes, which can quickly and accurately obtain the required information, providing efficient data support for subsequent differentiated error handling based on importance levels.

[0094] As a specific implementation, when a memory allocation request is received, for example, a request to allocate a memory region for storing high importance data, the system first finds an idle physical address range that meets the size requirement from the physical memory pool, assuming that the range starts from address A and ends at address B. The system generates a page table entry to record address A and address B. Then, the system identifies that the data importance level corresponding to the request is "high". According to the preset mapping relationship, for example, the "high" importance level corresponds to the hash table storage structure, the system determines that the metadata should be stored in the hash structure for high importance data in the memory allocation metadata table.

[0095] Subsequently, the system creates a new entry in the hash table, taking address A as the key value, and stores the metadata containing the data importance level "high" and address range A-B and other information as the data corresponding to the key value. If another request is to allocate a memory region for storing low importance data, the address range is from C to D, and the importance level is "low", the system will store the entry with address C as the key value and containing the corresponding metadata information into the linked list structure for low importance data in the memory allocation metadata table according to the preset mapping relationship (for example, the "low" importance level corresponds to the linked list).

[0096] Further, step S22 includes:

[0097] S221: Establish a data importance level and metadata storage structure storage correspondence relationship, the storage correspondence relationship includes: high importance level corresponds to hash table, medium importance level corresponds to B+ tree, low importance level corresponds to linked list;

[0098] S222: According to the data importance level identifier in the memory allocation request, query the storage correspondence relationship, and determine the metadata storage structure type;

[0099] S223: If the query fails, a preset default metadata storage structure type is adopted.

[0100] The present scheme establishes a storage correspondence between data importance levels and metadata storage structures, and clearly defines the metadata storage structure to be adopted for data of different importance levels. For example, high importance data requires extremely fast lookup speed, and therefore a hash table is selected; medium importance data requires consideration of both lookup and range query, and a B+ tree is selected; low importance data is large in quantity and relatively low in lookup frequency, and a linked list is selected. Upon receiving a memory allocation request, the system queries the preset storage correspondence according to the data importance level identifier in the request, thereby determining the metadata storage structure type most suitable for data of the level. If an exception occurs in the query process, such as an invalid or undefined identifier, a preset default storage structure is adopted as an alternative solution, thereby ensuring the robustness of the metadata storage process.

[0101] Through such differentiated storage structure selection, the present scheme enables the memory allocation metadata table to be optimally managed according to the actual importance of data. In combination with the step of allocating a physical address range according to a memory allocation request and associating and storing a data importance level identifier with the physical address range in the memory allocation metadata table in the foregoing method, it is ensured that the metadata is organized in a structure conducive to subsequent fast lookup when stored. When a memory error is monitored and the corresponding metadata needs to be looked up according to the error physical address, since the metadata has been stored in different, optimized structures according to the importance level, the lookup efficiency is significantly improved, and especially for high importance data, its importance identifier can be obtained more quickly, thereby laying a foundation for the fast selection and execution of subsequent differentiated error repair or mitigation strategies.

[0102] Further, step S3 comprises:

[0103] S31: When a memory error is monitored, the error physical address and the error type are obtained, and the error type is encoded into an error type enumeration value;

[0104] S32: The physical address range entry containing the error physical address is looked up in the memory allocation metadata table; if the lookup fails, it is determined as illegal memory access, an error report containing an illegal access flag is generated, and the process is terminated;

[0105] S33: If the lookup succeeds, the data importance level identifier is extracted from the found physical address range entry, and combined with the error type enumeration value, an error report containing the data importance level identifier and the error type enumeration value is generated.

[0106] The memory allocation metadata table refers to a structure for storing physical memory allocation information, which records allocated physical address ranges and associated metadata information such as data importance levels. The metadata information can be organized in the form of key-value pairs, where the key is the physical address range and the value is the corresponding metadata information. The underlying storage structure can be selected according to requirements, such as hash tables, tree structures, or linked lists.

[0107] The error type enumeration value refers to the numerical representation of different types of memory errors after unified coding. It can use a predetermined integer or symbolic constant to represent a specific error type, such as single-bit error, multi-bit error, parity error, etc.

[0108] Illegal memory access refers to read or write operations on physical memory addresses that are not legally allocated by the system. It can be manifested as an error physical address not falling within any recorded physical address range in the memory allocation metadata table.

[0109] In one embodiment, the above steps can be implemented as follows. When the memory monitoring hardware detects a single-bit ECC error occurring at physical address 0x12345678, the system interrupt handler is triggered, and step S31 is executed.

[0110] At this time, the obtained error physical address is 0x12345678, and the error type is "single-bit ECC error". The system encodes "single-bit ECC error" as a predetermined error type enumeration value, such as the value 1. Then, step S32 is entered, and the system uses address 0x12345678 to search in the memory allocation metadata table. The table can store entries such as {start address: 0x12340000, end address: 0x1234FFFF, data importance level: high}, {start address: 0x20000000, end address: 0x2000FFFF, data importance level: low}, etc.

[0111] The system searches for the range containing address 0x12345678. If address 0x12345678 is not found within any recorded physical address range during the search process, for example, the error occurs at address 0xFFFFFFFF, which is not allocated, then it is determined as illegal memory access, and an error report containing the illegal access flag is generated and the processing flow is terminated. In this embodiment, it is assumed that address 0x12345678 falls within the range [0x12340000, 0x1234FFFF], and the search is successful.

[0112] The system enters step S33, extracts the associated data importance level identifier, i.e., "high", from the entry. Then, the extracted "high" importance level identifier is combined with the error type enumeration value 1 obtained in step S31 to generate a memory error report, which can include information such as the error address, the error type, the error type enumeration value 1, and the data importance level "high". This report can then be passed to a subsequent policy selection module.

[0113] Further, step S32 includes:

[0114] S321: constructing a sorting index table that stores the starting address of the physical address range entry and the offset of the corresponding entry in the memory allocation metadata table, and the physical address range entries are sorted in ascending order of starting address;

[0115] S322: according to the error physical address, finding the maximum entry offset whose starting address is less than or equal to the error physical address in the sorting index table by binary search;

[0116] S323: if the entry offset is found, reading the corresponding physical address range entry from the memory allocation metadata table according to the offset, and determining whether the error physical address falls within the physical address range;

[0117] S324: if it is not within the range, it is determined to be illegal memory access, an error report containing an illegal access flag is generated and terminated; if the entry offset is not found, it is determined to be illegal memory access, an error report containing an illegal access flag is generated and terminated.

[0118] The finding method of the present application converts the finding operation of the original memory allocation metadata table into finding on the optimized index table by introducing an auxiliary sorting index table.

[0119] Specifically, a sorting index table is constructed, which is arranged in ascending order of the starting address of the physical address range, and the index table only stores the starting address of each physical address range entry and the position offset of the entry in the original memory allocation metadata table.

[0120] This structure concentrates and sorts the key information (starting address) of finding, and at the same time retains the reference to the original complete data through the offset.

[0121] When it is necessary to find the entry containing a specific error physical address, binary search algorithm is used to quickly locate in the sorted index table. Binary search utilizes the order of the index table, and can quickly find the position of the maximum entry whose starting address is less than or equal to the error physical address in the index table, so as to obtain the corresponding offset.

[0122] After obtaining the offset, the offset can be directly used to accurately read the corresponding physical address range entry from the original memory allocation metadata table.

[0123] Subsequently, the read entry is finally confirmed to determine whether the error physical address is indeed within this physical address range. If the error physical address is not within the found range, or no suitable entry offset is found in the index table, the current access is determined to be an illegal memory access, and a corresponding error report is generated and the subsequent processing is terminated.

[0124] By constructing the sorting index table and using binary search, the method of the present application avoids inefficient linear scanning of the large memory allocation metadata table, significantly improves the search efficiency, and ensures that the affected memory range can be quickly and accurately located when a memory error is detected, providing an efficient data basis for subsequent differentiated error processing based on data importance level.

[0125] The method, combined with steps such as obtaining the error physical address and extracting the data importance level identifier from the found entry, together constitutes a complete process of quickly responding to memory errors and determining data importance, improving the real-time performance and accuracy of the entire memory error handling process.

[0126] Further, step S4 includes:

[0127] S41: Construct a policy query key value, which includes an error type enumeration value, a data importance level identifier, and a physical address range to which the error physical address belongs;

[0128] S42: According to the policy query key value, search for a matching memory error repair or mitigation strategy in the preset differentiated strategy set;

[0129] S43: If a matching memory error repair or mitigation strategy is found, output the strategy; if no matching memory error repair or mitigation strategy is found, select a preset default memory error repair or mitigation strategy corresponding to the data importance level identifier and output.

[0130] Wherein, the error type enumeration value refers to the numerical or symbolic representation of the coded value of different memory error types, which can be implemented by integer, enumeration type or string.

[0131] After receiving the memory error information, the present scheme first constructs a strategy query key value, which integrates the error type, data importance level, and the physical address range to which the error physical address belongs into one query condition. This integration is the basis for the implementation of fine-grained strategy selection, as it enables the subsequent strategy lookup to consider the nature of the error, the value of the affected data, and the specific memory region where the error occurred. It is precisely due to the combination of these multi-dimensional information that the system can form a more discriminative query condition, thereby efficiently and accurately searching among the preset differentiated strategy set.

[0132] According to the constructed strategy query key value, the system searches the preset differentiated strategy set for an exact match of the memory error repair or mitigation strategy. This composite key value-based search method can quickly locate the processing scheme customized for a specific error situation, improving the efficiency and accuracy of strategy selection. If a matching strategy is successfully found, the system will directly output the customized strategy, ensuring that the optimal solution is executed when available.

[0133] If no exact matching strategy is found, the system will not interrupt the processing, but will fall back to selecting and outputting the preset default memory error repair or mitigation strategy corresponding to the data importance level identifier. This mechanism ensures that even in the absence of an exact strategy for all possible error combinations, the system can still provide a reasonable default processing solution based on the importance of the affected data, enhancing the robustness of the system.

[0134] By combining with the data importance level identifier obtained in the previous step, the present scheme can break through the limitations of traditional strategy selection based only on error type or location, and truly achieve differentiated response based on data value, thereby optimizing resource usage while ensuring the safety of high-value data.

[0135] Further, step S42 includes:

[0136] S421: According to the strategy query key value, determine whether the error type enumeration value indicates a tolerable error in the preset differentiated strategy set. If it indicates a tolerable error, select the preset default memory error mitigation strategy corresponding to the data importance level identifier.

[0137] S422: If it indicates an intolerable error, use the error type enumeration value and the data importance level identifier as the key value to filter the preset differentiated strategy set using a Bloom filter, excluding repair strategies that do not contain this key value, and then matching the remaining repair strategies to determine the matching memory error repair strategy.

[0138] Among them, the tolerable error refers to the error type that has less impact on system function or data integrity, can be handled by light mitigation measures or even ignored, such as some single-bit correctable error; the intolerable error refers to the error type that has serious impact on system function or data integrity, needs to take repair measures to restore normal state or prevent further damage, such as uncorrectable error or error occurring in critical data area.

[0139] The Bloom filter is a high space-efficient probabilistic data structure used to test whether an element is a member of a set, which can produce false positive matches but not false negative matches, that is, if the Bloom filter indicates that an element is not in the set, it must not be in the set, and if it indicates that an element may be in the set, it may or may not be in the set. In the present scheme, the Bloom filter is used to quickly exclude those repair strategies that are definitely not suitable for the current error type and data importance combination.

[0140] The present scheme proposes technical means of distinguishing error types and adopting different search strategies to solve the problems of efficiency and pertinence in searching for a matching strategy in a preset differentiated strategy set.

[0141] Specifically, according to the error type enumeration value in the strategy query key value, it is judged whether the error is a tolerable error. This judgment is made because different types of errors have different impacts on system stability and data integrity, and different responses are needed.

[0142] If it is judged to be a tolerable error, the preset default memory error mitigation strategy corresponding to the data importance level identifier is directly selected. The advantage of this processing method is fast response, avoiding complex search process in the entire strategy set, reducing system overhead, and combining data importance level to ensure differentiated and light processing of tolerable errors.

[0143] If it is judged to be an intolerable error, more accurate and effective repair strategies are needed. At this time, the error type enumeration value and the data importance level identifier are used as the key value, and the Bloom filter is used to preliminarily screen the preset differentiated strategy set. Through the Bloom filter, those repair strategies that are definitely not suitable for the current error type and data importance combination can be quickly excluded, thereby significantly reducing the strategy range that needs to be further considered and improving the search efficiency. After screening by the Bloom filter, more accurate matching is performed on the remaining repair strategies to finally determine the repair strategy most suitable for the current intolerable error.

[0144] This layered search method combining error type judgment, Bloom filter pre-screening and subsequent accurate matching improves the efficiency and accuracy of searching for accurate repair strategies when facing intolerable errors.

[0145] The strategy selection process is combined with the overall process of obtaining data importance level, monitoring errors, determining error physical address, and subsequent execution of strategies, so that the entire memory error handling method can quickly and accurately select and execute the most appropriate response strategy according to the specific nature of the error and the value of the affected data, thereby improving the robustness and data protection capability of the system when facing memory errors.

[0146] Further, step S5 comprises:

[0147] S51: Establish a memory error repair or mitigation strategy execution priority queue;

[0148] S52: Select the highest priority strategy from the memory error repair or mitigation strategy execution priority queue, and determine whether the current computing system resources meet the requirements for executing the strategy. If yes, execute the strategy;

[0149] S53: If not, re-add the strategy to the memory error repair or mitigation strategy execution priority queue, reduce the priority of the strategy, and re-execute S52. If the strategy execution fails, select the second highest priority strategy for execution until the strategy execution is successful or the strategy execution priority queue is empty.

[0150] Wherein, establishing a memory error repair or mitigation strategy execution priority queue means constructing an ordered data structure for the set of strategies to be executed, which can be implemented by a priority queue based on a heap, wherein each strategy is associated with a priority value, and the smaller the value, the higher the priority. The initial priority of the strategy can be determined according to the type of strategy, the type of error, and the real-time importance level of the affected data, for example, the repair strategy for high importance data can be assigned a higher initial priority.

[0151] The current computing system resources refer to the system resources required for executing the strategy, such as CPU time, memory, I / O bandwidth, etc.

[0152] As a preferred embodiment, the scheme of the present application is implemented as follows:

[0153] Suppose the system detects a memory error that affects a data region marked as "high importance", and the error type is a correctable single-bit error. According to the foregoing steps, the system selects a set of strategies, including: Strategy A: hardware ECC correction + data rewriting, highest priority; Strategy B: software data recovery + migration to backup area, second highest priority; Strategy C: mark the error area as read-only and record logs, lowest priority.

[0154] Step S51: Establish a priority queue and add Strategy A, Strategy B, and Strategy C to the queue.

[0155] Step S52: Strategy A is taken out from the queue. The system resource is checked, and it is found that both the current CPU utilization and the memory bandwidth are at a high level, which does not meet the resource condition required for the execution of strategy A.

[0156] Step S53: Strategy A is re-added to the queue, and its priority is reduced to 1.5. The highest priority in the queue is currently strategy B. The system re-executes step S52 to take out strategy B. The system resource is checked, and it is found that the resource requirement of strategy B is met. Strategy B is executed. It is assumed that strategy B is executed successfully, and the data is recovered and migrated. At this time, the error is mitigated, and the execution process is terminated.

[0157] In another case, it is assumed that after strategy A is taken out in step S52, the resource is met, and strategy A is executed. However, strategy A fails, for example, the hardware correction circuit reports that it cannot be corrected. The system enters the failure processing branch of step S53. The strategy with the second highest priority is selected from the queue, which is strategy B. Strategy B is executed. If strategy B is successful, the process is terminated. If strategy B also fails, strategy C is selected for execution. If strategy C is successful, the process is terminated. If strategy C also fails and the queue is empty, the error cannot be effectively handled, and the system may trigger a higher-level error handling mechanism, such as system restart or alarm.

[0158] Please refer to Figure 1 , Figure 3 A memory error rate monitoring and repairing system is applied in the steps of any of the above methods, and the system comprises:

[0159] A first acquisition module 201: acquiring a data importance level identifier in a memory allocation request;

[0160] A storage module 202: in response to the memory allocation request, allocating a physical address range from a physical memory pool, and associating the data importance level identifier with the allocated physical address range, and storing it to a memory allocation metadata table;

[0161] A second acquisition module 203: when a memory error is monitored, acquiring an error physical address and an error type of the error, and determining a data importance level identifier corresponding to the memory error from the memory allocation metadata table according to the error physical address;

[0162] A strategy selection module 204: selecting a corresponding memory error repairing or mitigating strategy from a preset differentiated strategy set according to the error type, the error physical address, and the data importance level identifier corresponding to the error memory;

[0163] A strategy execution module 205: executing the selected memory error repairing or mitigating strategy.

[0164] The first obtaining module 201 is a component responsible for receiving or parsing a memory allocation request from the outside and extracting data importance level information therefrom. The storage module 202 is a component responsible for managing the allocation of physical memory resources and establishing a mapping relationship between physical addresses and data importance levels. The second obtaining module 203 is a component responsible for receiving or monitoring memory error events and querying the mapping relationship established by the storage module according to error information to obtain the data importance level. The strategy selection module 204 is a component responsible for determining appropriate countermeasures from a plurality of preset strategies according to error-related information (including the data importance level). The strategy execution module 205 is a component responsible for specifically executing the countermeasures determined by the strategy selection module.

[0165] The system provides a set of functional modules for implementing a memory error monitoring and repair method based on data importance levels, thereby solving the problem of lacking a specific implementation architecture when applying the method to an actual computing system. Specifically, when the system receives a memory allocation request, the first obtaining module 201 first obtains a data importance level identifier from the request. Subsequently, the storage module 202 allocates a physical address range from a physical memory pool in response to the request and associates the data importance level identifier obtained by the first obtaining module 201 with the allocated physical address range, recording the association information in a memory allocation metadata table. Through this process, the system establishes a correspondence between data importance and physical location at the memory allocation stage. When the system monitors the occurrence of a memory error, the second obtaining module 203 obtains the physical address of the error occurrence and the error type. Using the error physical address, the second obtaining module 203 queries the memory allocation metadata table maintained by the storage module 202 to quickly determine the data importance level identifier corresponding to the data affected by the error. Next, the strategy selection module 204 receives the error type, error physical address, and data importance level identifier corresponding to the error memory and selects the most appropriate memory error repair or mitigation strategy from a set of preset differentiated repair strategies based thereon. Finally, the strategy execution module 205 is responsible for executing the selected strategy.

[0166] Through the coordinated work of these modules, the system can associate memory error events at the physical level with data importance at the logical level and take differentiated countermeasures based on this information, thereby effectively implementing the memory error monitoring and repair method based on data importance levels. This system architecture enables reliable and efficient implementation and coordination of each step in the method, providing support for the effective landing and operation of the method.

[0167] In this document, relational terms such as first and second and the like can be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any such actual relationship or order between such entities or actions.

[0168] The above embodiments are only used to illustrate the present application, but not to limit the present application. The present application can be modified and changed by those skilled in the art. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for monitoring and repairing memory error rates, characterized in that, The method includes the following steps: S1: Obtain the data importance level identifier in the memory allocation request; S2: In response to a memory allocation request, allocate a physical address range from the physical memory pool, associate the data importance level identifier with the allocated physical address range, and store it in the memory allocation metadata table; S3: When a memory error is detected, obtain the physical address and type of the error, and determine the data importance level identifier corresponding to the memory error from the memory allocation metadata table based on the physical address of the error; S4: Select a corresponding memory error repair or mitigation strategy from a preset set of differentiated strategies based on the error type, the error physical address, and the data importance level identifier corresponding to the error memory; S5: Execute the selected memory error repair or mitigation strategy; Step S2 includes: S21: In response to a memory allocation request, select a free physical address range from the physical memory pool that meets the requested size, and generate page table entries. Each page table entry must contain at least the start and end addresses of the physical address range. S22: Determine the corresponding metadata storage structure type based on the data importance level identifier in the memory allocation request; S23: Based on the determined metadata storage structure type, create an entry in the memory allocation metadata table, with the starting address of the physical address range as the key value, and data containing the data importance level identifier and the metadata information of the physical address range as the corresponding key value, and store it in the memory allocation metadata table.

2. The memory error rate monitoring and repair method according to claim 1, characterized in that, Step S1 includes: S11: Receive a memory allocation request, wherein the memory allocation request includes a data importance level identifier and the size of the memory to be allocated; S12: Verify the validity of the data importance level identifier. If the data importance level identifier is not within the preset level range, replace it with the preset default data importance level identifier and record the replacement information in the system log. S13: Send the verified or replaced data importance level identifier and the requested memory allocation size to the memory management module.

3. The memory error rate monitoring and repair method according to claim 1, characterized in that, Step S22 includes: S221: Establish the storage correspondence between the data importance level and the metadata storage structure. The storage correspondence includes: high importance level corresponds to hash table, medium importance level corresponds to B+ tree, and low importance level corresponds to linked list. S222: Based on the data importance level identifier in the memory allocation request, query the storage correspondence to determine the metadata storage structure type; S223: If the query fails, the default metadata storage structure type will be used.

4. The memory error rate monitoring and repair method according to claim 1, characterized in that, Step S3 includes: S31: When a memory error is detected, obtain the physical address of the error and the error type, and encode the error type into an error type enumeration value; S32: Search the memory allocation metadata table for a physical address range entry containing the erroneous physical address; if the search fails, determine it as an illegal memory access, generate an error report with an illegal access flag, and terminate the process; S33: If the search is successful, extract the data importance level identifier from the found physical address range entry, and combine it with the error type enumeration value to generate a memory error report containing the data importance level identifier and the error type enumeration value.

5. The memory error rate monitoring and repair method according to claim 4, characterized in that, Step S32 includes: S321: Construct a sorted index table that stores the starting address of each physical address range entry and the offset of the corresponding entry in the memory allocation metadata table, and sorts the physical address range entries in ascending order of their starting addresses; S322: Based on the erroneous physical address, search the sorted index table for the largest entry offset whose starting address is less than or equal to the erroneous physical address using a binary search method; S323: If an entry offset is found, the corresponding physical address range entry is read from the memory allocation metadata table based on the offset, and it is determined whether the erroneous physical address falls within the physical address range. S324: If the memory access is not within this range, it is determined to be an illegal memory access, an error report with an illegal access flag is generated, and the process is terminated; if no entry offset is found, it is determined to be an illegal memory access, an error report with an illegal access flag is generated, and the process is terminated.

6. The memory error rate monitoring and repair method according to claim 4, characterized in that, Step S4 includes: S41: Construct a strategy query key value, which includes the error type enumeration value, the data importance level identifier, and the physical address range to which the error physical address belongs; S42: Based on the strategy query key value, find the matching memory error repair or mitigation strategy in the preset differentiated strategy set; S43: If a matching memory error repair or mitigation strategy is found, output the strategy; if no matching memory error repair or mitigation strategy is found, select and output the preset default memory error repair or mitigation strategy corresponding to the data importance level identifier.

7. A memory error rate monitoring and repair method according to claim 6, characterized in that, Step S42 includes: S421: According to the strategy query key value, in the preset differentiated strategy set, determine whether the error type enumeration value indicates a tolerable error. If it indicates a tolerable error, select the preset default memory error mitigation strategy corresponding to the data importance level identifier. S422: If an intolerable error is indicated, the preset differential strategy set is filtered using the error type enumeration value and the data importance level identifier as key values, and the repair strategy that does not contain the key value is excluded. Then, the remaining repair strategies are matched to determine the matching memory error repair strategy.

8. The memory error rate monitoring and repair method according to claim 1, characterized in that, Step S5 includes: S51: Establish a priority queue for executing memory error repair or mitigation strategies; S52: Select the highest priority strategy from the memory error repair or mitigation strategy execution priority queue, determine whether the current computing system resources meet the requirements for executing the strategy, and if so, execute the strategy. S53: If not satisfied, add the strategy back to the memory error repair or mitigation strategy execution priority queue, reduce the priority of the strategy, and re-execute S52; if the strategy execution fails, select the next highest priority strategy to execute, until the strategy execution succeeds or the strategy execution priority queue is empty.

9. A memory error rate monitoring and repair system, characterized in that, The system, applied in the steps of the method according to any one of claims 1-8, comprises: First acquisition module: Acquires the data importance level identifier in the memory allocation request; Storage module: In response to a memory allocation request, allocates a physical address range from the physical memory pool, associates the data importance level identifier with the allocated physical address range, and stores it in the memory allocation metadata table; The second acquisition module: When a memory error is detected, it acquires the physical address of the error and the error type, and determines the data importance level identifier corresponding to the memory error from the memory allocation metadata table based on the physical address of the error; Strategy selection module: Based on the error type, the error physical address, and the data importance level identifier corresponding to the error memory, select the corresponding memory error repair or mitigation strategy from a preset set of differentiated strategies; Policy execution module: Executes the selected memory error repair or mitigation policy.

Citation Information

Patent Citations

  • Method and system for optimizing system management interrupt processing hardware error time

    CN113076213A

  • Remote replication method and device, equipment and storage medium

    CN118152179A