A fault processing method, device and electronic equipment
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- RUIJIE NETWORKS CO LTD
- Filing Date
- 2025-02-07
- Publication Date
- 2026-08-07
AI Technical Summary
[0004]然而这种方式虽然可以对不可纠故障进行一定程度上的检测及预防,但却无法完全预防不可纠故障,也不能对不可纠故障进行处理,这就使得内存设备中某一故障页一旦发生不可纠故障,就会使得引用该故障页的业务进程,出现业务中断的情况,进而导致系统崩溃
[0037] This application provides a fault handling method, apparatus, and electronic device. The method includes: acquiring fault reporting information reported by a memory device and isolating the fault page based on the fault reporting information; when it is determined based on the fault reporting information that a business process references the fault page, acquiring business description information of the business process; determining a target processing strategy based on the business description information of the business process, and executing the target processing strategy on the business process.
Smart Images

Figure CN122526863A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a fault handling method, apparatus and electronic device. Background Technology
[0002] Uncorrectable faults refer to faults in computer systems or hardware that cannot be repaired by conventional hardware or software repair mechanisms. When an uncorrectable fault occurs in a memory device, it affects the business processes using that memory, leading to service interruptions and unavailability for the business applications or system services to which those processes belong. Furthermore, because the allocation of memory by business applications or system services is random, the impact of such problems also exhibits randomness and unpredictability. This makes such problems difficult to reproduce and locate, increasing the complexity of troubleshooting and reducing system stability.
[0003] In related technologies, the occurrence of correctable faults in memory is typically monitored to prevent the occurrence of uncorrectable faults. For example, the number of correctable faults can be monitored, and when the number of occurrences exceeds a threshold, the data that needs to be stored is written to a new physical page in memory, thereby preventing the accumulation of correctable faults in the solid-state drive and thus preventing uncorrectable faults.
[0004] However, while this method can detect and prevent uncorrectable faults to a certain extent, it cannot completely prevent or handle them. This means that if an uncorrectable fault occurs in a faulty page in the memory device, the business processes that reference that faulty page will experience business interruption, which may lead to system crash. Summary of the Invention
[0005] This application provides a fault handling method, apparatus, and electronic device for handling uncorrectable faults, thereby preventing business interruptions and system crashes.
[0006] In a first aspect, embodiments of this application provide a fault handling method, including:
[0007] Obtain fault reporting information reported by the memory device, and isolate the fault page based on the fault reporting information; the fault reporting information includes information about the fault page and process information referencing the fault page; when it is determined based on the fault reporting information that a business process is referencing the fault page, obtain the business description information of the business process; the business description information is used to describe the relevant information of the business process; based on the business description information of the business process, determine the target processing strategy, and execute the target processing strategy on the business process.
[0008] In one possible implementation, determining the target processing strategy for the business process based on its business description information includes: obtaining the business weight of the business process and the degree of correlation between the business process and other business processes based on the business description information; the business weight characterizes the importance of the business process, and the other business processes are business processes running in the memory device other than the business process itself; and determining the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes.
[0009] In one possible implementation, the target processing strategy includes at least one of the following: restarting the business process; sending a fault notification to the business process and processing the business process according to the returned process processing method; performing a full machine restart on the virtual machine; or performing a full machine restart on the operating system.
[0010] In one possible implementation, determining the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes includes: when the degree of correlation between the business process and other business processes is less than a preset correlation threshold, and the business weight of the business process is less than a preset weight threshold, determining the target processing strategy as restarting the business process.
[0011] In one possible implementation, determining the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes includes: when the number of business processes is less than a preset number threshold and the degree of correlation between the business process and other business processes is less than a preset correlation threshold, determining the target processing strategy as sending fault notifications to the business processes respectively, and processing the business processes according to the returned process processing method.
[0012] In one possible implementation, determining the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes includes: when there is a business process in the business process whose degree of correlation with other business processes is greater than or equal to a preset correlation threshold, and the business process includes a virtualization process, determining the target processing strategy as a complete machine restart of the virtual machine to which the virtualization process belongs; or, when the business weight is greater than a preset weight threshold, and the business process includes a virtualization process, determining the target processing strategy as a complete machine restart of the virtual machine to which the virtualization process belongs.
[0013] In one possible implementation, determining the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes includes: when there is a business process in the business process whose degree of correlation with other business processes is greater than or equal to a preset correlation threshold, and the business process includes physical processes, determining the target processing strategy as a complete system restart of the operating system; or, when the business weight is greater than a preset weight threshold, and the business process includes physical processes, determining the target processing strategy as a complete system restart of the operating system.
[0014] In one possible implementation, before executing the target processing strategy on the business process, the method further includes: obtaining device status information; the device status information characterizing the operating status of the device where the fault reporting service and the process management service are located; determining the execution time of the target processing strategy based on the device status information and / or the business description information; and executing the target processing strategy on the at least one business process including: executing the target processing strategy on the at least one business process according to the execution time.
[0015] In one possible implementation, isolating the faulty page based on the fault reporting information includes: obtaining page information of the faulty page based on the fault reporting information, wherein the page information includes a page identifier or a page address; modifying the isolation field in the page table entry of the faulty page based on the page information so that the business process does not reference the faulty page; wherein the page table entry is used to manage the status information of the memory device.
[0016] In one possible implementation, after obtaining the fault reporting information, the method further includes: associating the fault page with at least one business process that references the fault page.
[0017] In one possible implementation, the business description information includes at least one of the following: business weight, business characteristics, business type, business impact information, and business recovery time; wherein, the business weight represents the importance of the business process, the business impact information represents the degree of correlation between the business process and other business processes, and the business recovery time is the time required for the business process to restart after interruption.
[0018] Secondly, embodiments of this application provide a fault handling apparatus, including:
[0019] The fault reporting unit is used to obtain fault reporting information reported by the memory device and isolate the fault page based on the fault reporting information; the fault reporting information includes information about the fault page and process information referencing the fault page;
[0020] The process management unit is used to obtain the business description information of the business process when it is determined, based on the fault reporting information, that a business process is referencing the fault page; the business description information is used to describe the relevant information of the business process; based on the business description information of the business process, a target processing strategy is determined, and the target processing strategy is executed on the business process.
[0021] In one possible implementation, the process management unit determines the target processing strategy for the business process based on the business description information of the business process. Specifically, this involves: obtaining the business weight of the business process and the degree of correlation between the business process and other business processes based on the business description information; the business weight characterizes the importance of the business process, and the other business processes are business processes running in the memory device other than the business process itself; and determining the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes.
[0022] In one possible implementation, the target processing strategy includes at least one of the following: restarting the business process; sending a fault notification to the business process and processing the business process according to the returned process processing method; performing a full machine restart on the virtual machine; or performing a full machine restart on the operating system.
[0023] In one possible implementation, the process management unit determines the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes. Specifically, when the degree of correlation between the business process and other business processes is less than a preset correlation threshold and the business weight of the business process is less than a preset weight threshold, the target processing strategy is to restart the business process.
[0024] In one possible implementation, the process management unit determines the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes. Specifically, when the number of business processes is less than a preset number threshold and the degree of correlation between the business process and other business processes is less than a preset correlation threshold, the target processing strategy is to send fault notifications to the business processes respectively and process the business processes according to the returned process processing method.
[0025] In one possible implementation, the process management unit determines the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes. Specifically, it is used to: determine the target processing strategy as a complete machine restart of the virtual machine to which the virtualization process belongs when there is a business process in the business process that has a degree of correlation with other business processes greater than or equal to a preset correlation threshold, and the business process includes a virtualization process; or, determine the target processing strategy as a complete machine restart of the virtual machine to which the virtualization process belongs when the business weight is greater than a preset weight threshold and the business process includes a virtualization process.
[0026] In one possible implementation, the process management unit determines the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes. Specifically, it is used to: determine the target processing strategy as a complete system restart when there is a business process in the business process that has a degree of correlation with other business processes greater than or equal to a preset correlation threshold, and the business process includes physical processes; or, determine the target processing strategy as a complete system restart when the business weight is greater than a preset weight threshold and the business process includes physical processes.
[0027] In one possible implementation, before the process management unit executes the target processing strategy on the business process, it is further configured to: obtain device status information; the device status information characterizes the operating status of the device where the fault reporting service and the process management service are located; determine the execution time of the target processing strategy based on the device status information and / or the business description information; the execution of the target processing strategy on the at least one business process includes: executing the target processing strategy on the at least one business process according to the execution time.
[0028] In one possible implementation, the fault reporting unit isolates the fault page based on the fault reporting information, specifically by: obtaining page information of the fault page based on the fault reporting information, wherein the page information includes a page identifier or a page address; modifying the isolation field in the page table entry of the fault page based on the page information, so that the business process does not reference the fault page; wherein the page table entry is used to manage the status information of the memory device.
[0029] In one possible implementation, after obtaining the fault reporting information, the process management unit is further configured to: associate and record the fault page with at least one business process referencing the fault page.
[0030] In one possible implementation, the business description information includes at least one of the following: business weight, business characteristics, business type, business impact information, and business recovery time; wherein, the business weight represents the importance of the business process, the business impact information represents the degree of correlation between the business process and other business processes, and the business recovery time is the time required for the business process to restart after interruption.
[0031] Thirdly, embodiments of this application provide an electronic device, including:
[0032] Memory, used to store computer instructions;
[0033] A processor, connected to the memory, is configured to execute computer instructions in the memory, and, in executing the computer instructions, implement the method as described in any one of the first aspects.
[0034] Fourthly, embodiments of this application provide a computer-readable storage medium, comprising:
[0035] The computer-readable storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the method as described in any one of the first aspects.
[0036] The beneficial effects of this application are as follows:
[0037] This application provides a fault handling method, apparatus, and electronic device. The method includes: acquiring fault reporting information reported by a memory device and isolating the fault page based on the fault reporting information; when it is determined based on the fault reporting information that a business process references the fault page, acquiring business description information of the business process; determining a target processing strategy based on the business description information of the business process, and executing the target processing strategy on the business process.
[0038] In this embodiment, each affected business process can be managed uniformly, and different processing strategies can be implemented based on the business description information of each process. This minimizes the scope of business processes affected by the faulty page, thereby avoiding the potential risk of uncontrollable impact on business processes. Furthermore, since the target processing strategy can be determined based on the actual situation of the affected business processes, the reliability, availability, and serviceability of the memory device can also be improved.
[0039] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application.
[0041] Figure 1 This is a schematic diagram of a fault handling process in the related technology provided in the embodiments of this application;
[0042] Figure 2 An exemplary diagram illustrates an application scenario applicable to the embodiments of this application;
[0043] Figure 3 An exemplary flowchart of a fault handling method provided in an embodiment of this application;
[0044] Figure 4 This is a schematic diagram of the fault handling method provided in the embodiments of this application;
[0045] Figure 5 A schematic diagram of a fault handling device provided in an embodiment of this application;
[0046] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0047] To facilitate understanding of the technical solutions provided in the embodiments of this application, the following describes the technical terms involved in the embodiments of this application.
[0048] (1) Single Root I / O Virtualization (SR-IOV) is an I / O virtualization technology used to implement multiple virtual functions on a single physical device, enabling multiple virtual machines (VMs) to directly access the device's hardware resources without going through a hypervisor. This technology is typically used to improve performance and reduce latency, especially in scenarios such as high-performance computing, network devices, and storage devices.
[0049] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. Obviously, the described embodiments are only some embodiments of the technical solutions of this application, and not all embodiments. Based on the embodiments recorded in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the technical solutions of this application.
[0050] The terms "first" and "second" in the embodiments of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. The term "multiple" in this application can mean at least two, for example, two, three, or more; the embodiments of this application do not impose any limitations.
[0051] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.
[0052] In related technologies, the occurrence of uncorrectable faults is typically prevented by monitoring the number of correctable faults in memory. For example, see... Figure 1 This is a schematic diagram illustrating a fault handling process in the related technology provided in the embodiments of this application. For example... Figure 1 As shown, when any memory page in the hardware device experiences an uncorrectable failure (e.g., memory page 1), the faulty memory page can report the uncorrectable failure to the kernel. The kernel can monitor the number of correctable failures and, when it detects that the number of occurrences exceeds a threshold, write the data that needs to be stored into a new physical memory page, thereby preventing the accumulation of correctable failures on the solid-state drive and thus preventing the occurrence of uncorrectable failures.
[0053] However, while this method can detect and prevent uncorrectable faults to a certain extent, it cannot completely prevent or handle them. This means that if an uncorrectable fault occurs in a faulty page in the memory device, the business processes that reference that faulty page will experience business interruption, which may lead to system crash.
[0054] In view of this, embodiments of this application provide a fault handling method, apparatus, and electronic device. The method involves acquiring fault reporting information reported by a memory device and isolating the faulty page based on the fault reporting information. When it is determined, based on the fault reporting information, that a business process is referencing the faulty page, business description information of the business process is acquired; based on the business description information, a target processing strategy is determined, and the target processing strategy is executed on the business process.
[0055] In this embodiment, all affected business processes can be managed uniformly, and different processing strategies can be implemented based on the business description information of each process. This minimizes the scope of business processes affected by the faulty page, thereby avoiding the potential risk of uncontrollable impact on business processes. Furthermore, since the target processing strategy can be determined based on the actual situation of the affected business processes, the reliability, availability, and serviceability of the memory device can also be improved.
[0056] See Figure 2 The illustration shows an application scenario applicable to the embodiments of this application. For example... Figure 2 As shown, this scenario can be a computing device 200, which may include a processor 210 and a memory device 220. One or more virtual machines can run on the processor 210, using SR-IOV technology to send and receive data within the virtual machines. The memory device 220 can divide its I / O functions into multiple Virtual Functions (VFs) and multiple Physical Functions (PFs). Each VF can be assigned to a different virtual machine (VM), and a PF can connect to multiple virtual machines through a hypervisor.
[0057] When any memory page in memory device 220 fails, it can send a fault report to processor 210. The failed memory page is called the fault page. Based on the fault report, processor 210 can isolate the fault page. If at least one business process references the fault page, processor 210 can obtain the business description information of each of the at least one business process. This at least one business process can be a virtualized process running via VF or a physical process running via PF. Based on the business description information of each of the at least one business process, a target processing strategy is determined, and the target processing strategy is executed on the at least one business process.
[0058] The computing device 200 can be a computing device in a cloud computing cluster, a physical server, or a server in a network management center, or it can be a personal computer or other electronic device. The processor 210 can be a CPU, an application-specific integrated circuit (ASIC) chip, or a programmable logic device (PLD) chip. The PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The processor 210 can also be understood as a host.
[0059] See Figure 3 An exemplary flowchart of a fault handling method provided in this application embodiment may include the following steps:
[0060] S301 retrieves fault reporting information from memory devices and isolates fault pages based on the fault reporting information.
[0061] The fault reporting information is used to report faulty pages that have failed in the memory device and the business processes that reference the faulty pages. Therefore, the fault reporting information may include information about the faulty pages and information about the processes that reference the faulty pages. This embodiment of the application can deploy a fault reporting service in the kernel to obtain fault reporting information reported by the memory device and isolate faulty pages based on the fault reporting information.
[0062] In one possible implementation, when isolating a faulty page based on fault reporting information, the page information of the faulty page can be obtained based on the information included in the fault reporting information. This page information may include a page identifier or a page address. Then, based on the page identifier or page address, the value of the isolation field in the page table entry of the faulty page is modified so that subsequent business processes will not request the faulty page when requesting memory pages. The page table entry is used to manage the status information of the memory device.
[0063] For example, the value of the isolation field in the page table entry of a faulty page can be modified using the page table management function `set_pte_at()`, which is used in the operating system kernel. The isolation field indicates whether a memory page is valid; a value of 1 indicates that the memory page is valid and can be referenced by other processes; a value of 0 indicates that the memory page is invalid and cannot be referenced by other processes. `set_pte_at()` maps virtual addresses to physical addresses by updating the page table entry for a given address. Page table entries are data structures in the operating system used to manage the mapping between virtual and physical memory.
[0064] In some embodiments, the fault reporting service can also forward the fault reporting information to the process management service. After receiving the fault reporting information forwarded by the fault reporting service, the process management service can first determine whether there is at least one business process referencing the fault page. If there is at least one business process referencing the fault page, then S302 is executed; if there is no business process referencing the fault page, then after isolating the fault page, the subsequent process is no longer executed, and the fault handling process ends.
[0065] In some embodiments, after the process management service obtains the fault reporting information forwarded by the fault reporting service, it can also associate the fault page with at least one business process referencing the fault page. For example, if it is determined that fault page 01 has failed based on the fault reporting information, it can be recorded as fault page 01 failing on xx / xx / xx / xx at xx:xx / xx / xx, and the affected business processes are: business process A, business process B, and business process C.
[0066] This method can improve the stability of the operating system by recording the fault point of the memory device and at least one affected business process, thereby enabling the traceability and location of memory device faults.
[0067] S302, when it is determined that a business process references a fault page based on the fault reporting information, the business description information of the business process is obtained.
[0068] There may be one or more business processes referencing the fault page, and therefore, there may also be one or more business description information pieces obtained. Each business description information piece describes the relevant information of the corresponding business process. For example, if the business processes referencing the fault page are business process A and business process B, then the obtained business description information pieces could be business description information 'a' for business process A and business description information 'b' for business process B.
[0069] In some embodiments, the business description information may include relevant information such as business weight, business characteristics, business type, business impact information, and business recovery time. Business weight characterizes the importance of the corresponding business process, business impact information characterizes the degree of correlation between the corresponding business process and other business processes, and business recovery time is the time required to restart the business after an interruption. For example, business weight can be represented by a weight value, such as a value between 0 and 1, with larger values indicating higher importance. Business characteristics may include high process dependency, real-time requirements, non-linearity, long-term operation, etc. Business types may include data processing, communication, user interaction, multimedia, etc.
[0070] S303: Based on the business description information of the business process, determine the target processing strategy and execute the target processing strategy on the business process.
[0071] In one possible implementation, since there may be one or more business processes referencing the faulty page, when executing S303, for any one of these business processes, the business weight of that business process and the degree of correlation between that business process and other business processes can be obtained based on the business description information. Then, based on the obtained business weight of the business process and the degree of correlation between the business process and other business processes, the target processing strategy can be determined.
[0072] In this context, "other business processes" refers to all business processes running on the memory device other than any single business process. These other business processes can include those referencing faulty pages or those not referencing faulty pages. For example, business processes A and B reference memory page 1, while business process C references memory page 2. When memory page 1 fails, the business processes referencing the faulty page are business processes A and B. Therefore, when determining the degree of association between business process A and other business processes, "other business processes" can include business processes B and C; that is, it determines the degree of association between business processes A and B, and between business processes A and C.
[0073] In some embodiments, the degree of association between a business process and other business processes can be represented by the number of process associations, that is, by the number of other business processes associated with that business process. For example, to determine the degree of association between business process A and other business processes, the number of other business processes running in the memory device associated with business process A can be determined. For example, if the number of processes is 10, then the degree of association can be represented as 10. As another example, in the above example, when obtaining the degree of association between business process A and business processes B and C, if business process A is only associated with business process B, then since the number of processes associated with business process A is 1, the degree of association can be represented as 1.
[0074] In other embodiments, the degree of association between a business process and other business processes can also be represented by the process association ratio, that is, by the proportion of the number of other business processes associated with that business process to the total number of business processes. Here, the total number of business processes refers to the total number of business processes running in the memory device. For example, when determining the degree of association between business process A and other business processes, assuming the total number of business processes is 20 and the number of other business processes associated with business process A is 10, then the degree of association can be expressed as 10 / 20 = 50%. As another example, in the above example, when obtaining the degree of association between business process A and business processes B and C, if business process A is only associated with business process B, then since the number of processes associated with business process A is 1 and the total number of business processes is 3, the degree of association can be expressed as 1 / 3 = 33%.
[0075] It should be noted that the above representation of the degree of association is merely exemplary, and the degree of association between a business process and other business processes can also be represented in other ways, which are not limited in this application.
[0076] Based on the above scheme, since the target processing strategy is determined according to the degree of correlation between the business process and other business processes, a processing strategy with higher service quality can be selected, thereby improving the reliability, availability and serviceability of memory devices.
[0077] Since there can be one or more business processes referencing a faulty page, for clarity, the business processes referencing a faulty page will be uniformly described as at least one business process in the following embodiments.
[0078] In one possible implementation, the target processing strategy includes some or all of the following:
[0079] Strategy 1: Restart at least one business process.
[0080] Restart all business processes running on the faulty page, or restart at least one business process and all business processes associated with at least one business process.
[0081] Strategy 2: Send a fault notification to at least one business process and process each business process according to its returned process handling method.
[0082] Fault notifications can be sent to at least one business process, allowing each business process to determine or select its own process handling method and process the fault according to the process handling method returned by each of the at least one business process. The fault notification may include relevant information about the fault page, such as the page identifier or page address, so that the corresponding business process can determine the process handling method based on the information of the fault page.
[0083] Strategy 3: Perform a full system restart on the virtual machine.
[0084] In a virtualization scenario, the entire virtual machine involved in the virtualization process can be restarted.
[0085] Strategy 4: Perform a full system reboot of the operating system.
[0086] In non-virtualized scenarios, the operating system of a computing device can be completely restarted.
[0087] In some embodiments, when the target processing strategy includes strategy 1, the target processing strategy can be specifically executed based on the business weight of each of the at least one business process and the degree of correlation between each of the at least one business process and other business processes: when the degree of correlation between each of the at least one business process and other business processes is less than a preset correlation threshold, and the business weight of each of the at least one business process is less than a preset weight threshold, it can be determined that the impact of at least one business process on other business processes in the memory device is small. That is to say, restarting at least one business process will not affect the normal operation of the entire system. Therefore, the target processing strategy can be determined to be strategy 1.
[0088] Furthermore, the preset association threshold can vary depending on how the degree of association is expressed. For example, when the degree of association is represented by the proportion of process associations, the preset association threshold can be a percentage such as 80% or 60%. When the degree of association is represented by the number of process associations, the preset association threshold can be a quantity such as 10 or 5.
[0089] In one example, assuming at least one business process includes business process A and business process B, business process A has a business weight of 0.3 and a correlation degree of 20%; business process B has a business weight of 0.4 and a correlation degree of 30%. Then, when the preset correlation threshold is 60% and the preset weight threshold is 0.6, the target processing strategy can be determined to be to restart business processes A and B.
[0090] It should be noted that the weight can also be expressed as a value in other scoring systems, such as a ten-point system or a hundred-point system. The preset association threshold and preset weight threshold in the embodiments of this application can be set according to experience or actual situation. This application does not limit this and will not elaborate further.
[0091] In some embodiments, when the target processing strategy includes strategy 2, the target processing strategy is determined based on the business weight of each of the at least one business process and the degree of correlation between each of the at least one business process and other business processes. Specifically, it can be implemented as follows: when the number of at least one business process is less than a preset number threshold, and the degree of correlation between each of the at least one business process and other business processes is less than a preset correlation threshold, it can be determined that there are few business processes referencing the fault page, and the impact of the business processes referencing the fault page on other business processes is small. Therefore, the business processes can determine their own process processing methods. In other words, the target processing strategy is to send fault notifications to each of the at least one business process and process each of the at least one business process according to its own returned process processing method.
[0092] For example, assuming the preset quantity threshold is 2, when only one business process references the fault page and the correlation degree of that business process is less than the preset correlation threshold, a fault notification can be sent to that business process. Then, the process handling method returned by that business process can be received, and the business process can be processed according to the received process handling method.
[0093] In addition, the process handling method can also include the restart time of the business process. For example, if the business process referencing the fault page is business process A, the received process handling method can be to immediately and hot-restart the single point of service of business process A to avoid potential risks.
[0094] This strategy allows business processes directly affected by failures to determine their own processing methods based on their actual circumstances, thereby providing a high-quality service approach and improving user experience.
[0095] In some embodiments, when the target processing strategy includes strategy 3, the target processing strategy is determined based on the business weight of each of the at least one business process and the degree of correlation between each of the at least one business process and other business processes. Specifically, it can be executed as follows: when any correlation degree between each of the at least one business process and other business processes is greater than or equal to a preset correlation threshold, and at least one business process includes a virtualization process, the target processing strategy is to perform a full machine restart on the virtual machine to which the virtualization process belongs; or, when the business weight is greater than a preset weight threshold, and at least one business process includes a virtualization process, the target processing strategy is to perform a full machine restart on the virtual machine to which the virtualization process belongs.
[0096] For example, assuming that at least one business process includes a virtualization process, and the preset association threshold is 70%, then if any business process in the at least one business process that references a faulty page has an association degree greater than or equal to 70% (such as 75%, 80%, etc.) with other business processes, then the target processing strategy can be determined to be to perform a full machine restart on the virtual machine to which the virtualization process in at least one business process belongs.
[0097] Assuming that at least one business process includes a virtualization process, and the preset weight threshold is 0.7, then if any business process in the at least one business process that references the fault page has a business weight greater than or equal to 0.7 (such as 0.8, 0.9, etc.), then the target processing strategy can be determined to be to reboot the virtual machine to which the virtualization process in the at least one business process belongs.
[0098] This strategy allows for a complete system restart of the virtual machine when the impact of a fault is widespread, preventing subsequent business processes from accessing the faulty page and improving system reliability.
[0099] In some embodiments, when the target processing strategy includes strategy 4, the target processing strategy is determined based on the business weight of each of the at least one business process and the degree of association between each of the at least one business process and other business processes. Specifically, the target processing strategy is determined to be to reboot the entire operating system when any degree of association between each of the at least one business process and other business processes is greater than or equal to a preset association threshold, and when the at least one business process includes a physical process.
[0100] For example, assuming that at least one business process includes a physical process, and the preset association threshold is 70%, then if any business process that references a faulty page has an association degree greater than or equal to 70% (such as 75%, 80%, etc.) with other business processes, then the target processing strategy can be determined to be to perform a full system restart on the operating system.
[0101] Assuming that at least one business process includes a physical process, and the preset weight threshold is 0.7, then if any business process in the at least one business process that references the fault page has a business weight greater than or equal to 0.7 (such as 0.8, 0.9, etc.), then the target processing strategy can be determined to be to reboot the entire operating system.
[0102] This strategy allows for a complete system reboot when the impact of a fault is widespread, preventing subsequent business processes from accessing the faulty page and improving system reliability.
[0103] Furthermore, when at least one business process contains a highly dependent business process, or a business process that is a core system service, the target processing strategy can be determined as a complete system restart of the operating system or virtual machine. Specifically, in virtualized scenarios, the virtual machine can be restarted, while in non-virtualized scenarios, the entire operating system can be restarted.
[0104] High dependency refers to a situation where the operation and execution of a business process in the system are highly dependent on the operation of other business processes. For example, if a business process may need to obtain data or perform certain operations from other business processes before it can continue to run, then the business process can be identified as having high dependency. It should be noted that the selection conditions for strategies 1-4 can also be configured according to the actual situation. For example, information such as business characteristics and business types can also be used as selection conditions, and this application does not limit this.
[0105] In one possible implementation, before executing the target processing strategy on at least one business process, device status information can be obtained. Then, the execution time of the target processing strategy is determined based on the device status information and / or business description information, and the target processing strategy is executed on at least one business process according to the execution time. The device status information represents the operating status of the computing device where the fault reporting service and the process management service reside. The business description information may include at least one of the following: business weight, business characteristics, business type, business impact information, and business recovery time.
[0106] The following explanation uses the business description information as the business recovery time as an example.
[0107] For example, when the process management service determines the execution time of the target processing strategy based on device status information and service recovery time, it can set the execution time to 10 minutes if it determines that the current central processing unit (CPU) is busy and the service recovery time is long. That is, at least one service process will be restarted after 10 minutes.
[0108] In another example, when the process management service determines the execution time of the target processing strategy based on device status information, it can set the execution time to immediately restart at least one business process if it determines that the current CPU is idle.
[0109] In another example, when the process management service determines the execution time of the target processing strategy based on the business recovery time, it can set the execution time to immediately restart at least one business process if it is determined that the business recovery time of each business process is short.
[0110] This strategy allows for hot restarts of all affected business processes when the impact of at least one business process referencing a faulty page is relatively small. This enables a process-level high Quality of Service (QoS) processing strategy, thereby ensuring the availability of business processes and reducing the degree of impact on them.
[0111] In some embodiments, the target processing strategy can be determined not only based on the relevant information of the business process, but also based on the purpose of the faulty page. For example, the purpose of the faulty page may include: a memory page referenced by a single business process, a shared memory page, or a memory page of a shared library. For cases where the faulty page is a shared memory page or a memory page of a shared library, an efficient physical page mapping service scan can be implemented to record all business processes affected by the fault, and the target processing strategy can be determined according to the relevant information of each affected business process in strategies 1-4 above.
[0112] See Figure 4 This is a schematic diagram of the fault handling method provided in the embodiments of this application, such as... Figure 4 As shown, the computing device may include hardware, a kernel, and an operating system. The hardware may include multiple memory pages, the kernel may include a fault reporting service, and the operating system may include a process management service. The business processes referencing memory page 1 are process 1 and process 2, and the business process referencing memory page 2 is process 2. Assuming memory page 1 fails, it reports its page identifier and page address, along with the information from processes 1 and 2, to the fault reporting service. The fault reporting service can first isolate memory page 1 based on the fault report information, and then forward the fault report information to the process management service. The process management service can determine the target processing strategy and its execution time according to the method described above, and execute the target processing strategy on processes 1 and 2 according to the execution time.
[0113] Specifically, when each business process starts running, it can first register the business process based on the process state through the process management service, so that the process management service can uniformly manage all business processes of the operating system. Then, in the event of a failure, the corresponding target handling strategy can be adopted to ensure business availability and reduce the degree of business damage.
[0114] Based on the same concept as the above method, see [link to relevant documentation]. Figure 5 This application provides a fault handling device 500 that can execute the steps of the above-described method. To avoid repetition, these steps will not be described in detail here. The device 500 includes a fault reporting unit 501 and a process management unit 502. In one scenario:
[0115] The fault reporting unit 501 is used to obtain fault reporting information reported by the memory device and isolate the fault page based on the fault reporting information; the fault reporting information includes information about the fault page and process information referencing the fault page;
[0116] The process management unit 502 is used to obtain the business description information of the business process when it is determined, based on the fault reporting information, that a business process is referencing the fault page; the business description information is used to describe the relevant information of the business process; based on the business description information of the business process, a target processing strategy is determined, and the target processing strategy is executed on the business process.
[0117] In one possible implementation, the process management unit 502 determines the target processing strategy for the business process based on the business description information of the business process. Specifically, it is used to: obtain the business weight of the business process and the degree of correlation between the business process and other business processes based on the business description information; the business weight represents the importance of the business process, and the other business processes are business processes running in the memory device other than the business process; and determine the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes.
[0118] In one possible implementation, the target processing strategy includes at least one of the following: restarting the business process; sending a fault notification to the business process and processing the business process according to the returned process processing method; performing a full machine restart on the virtual machine; or performing a full machine restart on the operating system.
[0119] In one possible implementation, the process management unit 502 determines the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes. Specifically, when the degree of correlation between the business process and other business processes is less than a preset correlation threshold and the business weight of the business process is less than a preset weight threshold, the target processing strategy is to restart the business process.
[0120] In one possible implementation, the process management unit 502 determines the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes. Specifically, when the number of business processes is less than a preset number threshold and the degree of correlation between the business process and other business processes is less than a preset correlation threshold, the target processing strategy is to send fault notifications to the business processes respectively and process the business processes according to the returned process processing method.
[0121] In one possible implementation, the process management unit 502 determines the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes. Specifically, it is used to: determine the target processing strategy as a complete machine restart of the virtual machine to which the virtualization process belongs when there is a business process in the business process with a degree of correlation with other business processes greater than or equal to a preset correlation threshold, and the business process includes a virtualization process; or, determine the target processing strategy as a complete machine restart of the virtual machine to which the virtualization process belongs when the business weight is greater than a preset weight threshold and the business process includes a virtualization process.
[0122] In one possible implementation, the process management unit 502 determines the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes. Specifically, it is used to: determine the target processing strategy as a complete system restart when there is a business process in the business process that has a degree of correlation with other business processes greater than or equal to a preset correlation threshold, and the business process includes physical processes; or, determine the target processing strategy as a complete system restart when the business weight is greater than a preset weight threshold and the business process includes physical processes.
[0123] In one possible implementation, before the process management unit 502 executes the target processing strategy on the service process, it is further configured to: obtain device status information; the device status information characterizes the operating status of the device where the fault reporting service and the process management service are located; determine the execution time of the target processing strategy based on the device status information and / or the service description information; the execution of the target processing strategy on the at least one service process includes: executing the target processing strategy on the at least one service process according to the execution time.
[0124] In one possible implementation, the business description information includes at least one of the following: business weight, business characteristics, business type, business impact information, and business recovery time; wherein, the business weight represents the importance of the business process, the business impact information represents the degree of correlation between the business process and other business processes, and the business recovery time is the time required for the business process to restart after interruption.
[0125] In one possible implementation, the process management unit 502 isolates the faulty page based on the fault reporting information, specifically by: obtaining page information of the faulty page based on the fault reporting information, wherein the page information includes a page identifier or a page address; modifying the isolation field in the page table entry of the faulty page based on the page information, so that the business process does not reference the faulty page; wherein the page table entry is used to manage the status information of the memory device.
[0126] In one possible implementation, after obtaining the fault reporting information, the process management unit 502 is further configured to: associate and record the fault page with at least one business process referencing the fault page.
[0127] Based on the same concept as the above method, see [link to relevant documentation]. Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device includes at least one processor 602 and a memory 601 connected or coupled to the at least one processor 602. In addition, the electronic device may also include a communication interface 603. The electronic device can interact with other devices through the communication interface 603.
[0128] For example, the communication interface 603 can be a transceiver, circuit, bus, module, pin, or other type of communication interface. When the electronic device is a chip-based device or circuit, the communication interface 603 in the electronic device can also be an input / output circuit, capable of inputting information (or receiving information) and outputting information (or sending information). The processor can be an integrated processor, a microprocessor, an integrated circuit, or a logic circuit, and the processor can determine the output information based on the input information.
[0129] The coupling in this embodiment is an indirect coupling or communication connection between devices, units, or modules, which can be electrical, mechanical, or other forms, used for information exchange between devices, units, or modules. The processor 602 may operate in conjunction with the memory 601 and the communication interface 603. This application does not limit the specific connection medium between the processor 602, the memory 601, and the communication interface 603.
[0130] Optional, see Figure 6 The processor 602, the memory 601, and the communication interface 603 are interconnected via a bus. This bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0131] In this embodiment, memory 601, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 601 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, etc. Memory 601 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. Memory 601 in this embodiment may also be a circuit or any other device capable of implementing storage functions for storing instructions, computer programs, and / or data.
[0132] In this embodiment, the processor 602 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in this embodiment. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the fault handling method disclosed in this embodiment can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0133] By designing and programming the processor 602, the code corresponding to the fault handling method described in the foregoing embodiments can be embedded into the chip, so that the chip can execute the steps of the aforementioned fault handling method when running. How to design and program the processor 602 is a well-known technique to those skilled in the art, and will not be described in detail here.
[0134] In one or more embodiments, memory 601 stores instructions that can be executed by at least one processor 602, which can implement the steps of any of the above methods by calling the instructions or computer programs stored in memory 601.
[0135] This application also provides a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the steps of any of the above methods.
[0136] Based on the same inventive concept, this application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to execute any of the fault handling methods discussed above. Since the principle of the above-described computer program product in solving the problem is similar to that of the fault handling method, the implementation of the above-described computer program product can be referred to the implementation of the method, and repeated details will not be described again.
[0137] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0138] While specific embodiments of this application have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of this application is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of this application, and all such changes and modifications fall within the scope of protection of this application. Although preferred embodiments of this application have been described, those skilled in the art, once they understand the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0139] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A fault handling method, characterized in that, include: Obtain fault reporting information reported by the memory device, and isolate the fault page based on the fault reporting information; The fault reporting information includes information about the fault page and information about the process referencing the fault page; When it is determined, based on the fault reporting information, that a business process is referencing the fault page, the business description information of the business process is obtained; the business description information is used to describe the relevant information of the business process. Based on the business description information of the business process, a target processing strategy is determined, and the target processing strategy is executed on the business process.
2. The method according to claim 1, characterized in that, The determination of the target processing strategy for the business process based on the business description information of the business process includes: Based on the business description information, the business weight of the business process and the degree of correlation between the business process and other business processes are obtained; the business weight represents the importance of the business process, and the other business processes are business processes running in the memory device other than the business process. The target processing strategy is determined based on the business weight of the business process and the degree of correlation between the business process and other business processes.
3. The method according to claim 2, characterized in that, The target processing strategy includes at least one of the following: Restart the aforementioned business process; Send a fault notification to the business process and process the business process according to the returned process handling method; Perform a full system restart on the virtual machine; or Perform a system reboot.
4. The method according to claim 3, characterized in that, The determination of the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes includes: When the correlation between the business process and other business processes is less than a preset correlation threshold, and the business weight of the business process is less than a preset weight threshold, the target processing strategy is to restart the business process.
5. The method according to claim 3, characterized in that, The determination of the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes includes: When the number of processes in the business process is less than a preset number threshold, and the degree of correlation between the business process and other business processes is less than a preset correlation threshold, the target processing strategy is determined to send a fault notification to the business process and process the business process according to the returned process processing method.
6. The method according to claim 3, characterized in that, The determination of the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes includes: If there is a business process in the business process that has a correlation degree with other business processes that is greater than or equal to a preset correlation threshold, and the business process includes a virtualization process, then the target processing strategy is determined to be to perform a full machine restart on the virtual machine to which the virtualization process belongs. Alternatively, when the business weight is greater than a preset weight threshold and the business process includes a virtualization process, the target processing strategy is determined to be to reboot the entire virtual machine to which the virtualization process belongs.
7. The method according to claim 3, characterized in that, The determination of the target processing strategy based on the business weight of the business process and the degree of correlation between the business process and other business processes includes: If there is a business process in the business process that has a correlation degree with other business processes that is greater than or equal to a preset correlation threshold, and the business process includes physical processes, then the target processing strategy is determined to be to perform a complete system restart on the operating system. Alternatively, when the business weight is greater than a preset weight threshold and the business process includes physical processes, the target processing strategy is determined to be a complete system restart of the operating system.
8. The method according to any one of claims 1-7, characterized in that, The step of isolating the fault page based on the fault reporting information includes: Based on the fault reporting information, the page information of the fault page is obtained, wherein the page information includes a page identifier or a page address; Based on the page information, the isolation field in the page table entry of the faulty page is modified so that the business process does not reference the faulty page; wherein, the page table entry is used to manage the status information of the memory device.
9. The method according to any one of claims 1-7, characterized in that, Before executing the target processing strategy on the business process, the method further includes: Obtain device status information; the device status information represents the operating status of the device where the fault reporting service and the process management service are located. Based on the device status information and / or the service description information, determine the execution time of the target processing strategy; Executing the target processing strategy on the at least one business process includes: The target processing strategy is executed on the at least one business process according to the execution time.
10. The method according to any one of claims 1-7, characterized in that, After obtaining the fault reporting information, the method further includes: The fault page and at least one business process that references the fault page are associated and recorded.
11. The method according to any one of claims 1-7, characterized in that, The business description information includes at least one of the following: Business weight, business characteristics, business type, business impact information, and business recovery time; Wherein, the business weight represents the importance of the business process, the business impact information represents the degree of correlation between the business process and other business processes, and the business recovery time is the time required for the business process to restart after being interrupted.
12. A fault handling device, characterized in that, include: The fault reporting unit is used to obtain fault reporting information reported by the memory device and isolate the fault page based on the fault reporting information; The fault reporting information includes information about the fault page and information about the process referencing the fault page; The process management unit is used to obtain the business description information of the business process when it is determined, based on the fault reporting information, that a business process is referencing the fault page; the business description information is used to describe the relevant information of the business process. Based on the business description information of the business process, a target processing strategy is determined, and the target processing strategy is executed on the business process.
13. An electronic device, characterized in that, include: Memory, used to store computer instructions; A processor, connected to the memory, is configured to execute computer instructions in the memory, and, in executing the computer instructions, implement the method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, include: The computer-readable storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 11.