A method, device and computer equipment for obtaining abnormal data of computing power CPU

By restoring the configuration space register and reading the abnormal data information when the computing power CPU crashes, and using the DMA controller to transfer the data to the main control CPU, the problem of being unable to obtain the abnormal data of the computing power CPU in the existing technology is solved, and the cause of the crash is realized. effective positioning.

CN118519817BActive Publication Date: 2024-10-29ZHEJIANG DAHUA TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202410975893.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-10-29
Estimated Expiration
2044-07-19

Smart Images

  • Figure CN118519817B_ABST
    Figure CN118519817B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device and computer equipment for acquiring abnormal data of a computing power CPU. The method comprises: in the case of an abnormally crashed computing power CPU, restoring the configuration space register of the abnormally crashed computing power CPU to an initial state; periodically reading the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register of the abnormally crashed computing power CPU; when the transport mark bit information of the abnormal data indicates a start transport state, based on the configuration information of the abnormal data, transporting the abnormal data of the computing power CPU to the main control CPU. The use of this method can solve the problem in the related art that it is impossible to acquire the abnormal data of the computing power CPU when the system crashes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device and computer equipment for obtaining abnormal data of a computing power CPU. Background Art

[0002] With the development of computer technology, intelligent products are gradually being widely used. As the computing requirements of intelligent products gradually increase, intelligent products with a single CPU (Central Processing Unit) are not enough to meet the computing requirements of massive data. Therefore, most existing intelligent products use a main control CPU and multiple computing CPUs to process massive data. Among them, each computing CPU is connected to the main control CPU to process massive data and send the processing results to the main control CPU.

[0003] When using the CPU to process the massive data in intelligent products, the computing power CPU may crash. If you need to locate the cause of the system crash, you need to analyze the abnormal data of the computing power CPU when the system crashed. If you need to analyze the abnormal data of the computing power CPU when the system crashed, you must first obtain the abnormal data of the computing power CPU when the system crashed. However, the computing power CPU does not have a dedicated storage device. Even if a certain amount of memory is reserved, it is impossible to obtain all the abnormal data of the computing power CPU when the system crashed due to the small space.

[0004] With regard to the problem in related technologies that it is impossible to obtain all abnormal data of the computing power CPU when the system crashes, no effective solution has been proposed so far. Summary of the invention

[0005] Based on this, it is necessary to provide a method, device and computer equipment for obtaining abnormal data of computing power CPU in response to the above technical problems.

[0006] In a first aspect, the present application provides a method for obtaining abnormal data of a computing power CPU. The method comprises the following steps:

[0007] In the case of an abnormally crashed computing CPU, the configuration space register of the abnormally crashed computing CPU is restored to an initial state;

[0008] Periodically reading the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register of the computing power CPU that crashed abnormally;

[0009] When the transfer mark bit information of the abnormal data indicates the start of transfer state, the abnormal data of the computing power CPU is transferred to the main control CPU based on the configuration information of the abnormal data.

[0010] In one of the embodiments, in the case where a computing power CPU crashes abnormally, restoring the configuration space register of the abnormally crashed computing power CPU to an initial state comprises the following steps:

[0011] In the event that the computing power CPU crashes abnormally, in response to a received initial state recovery command, the configuration space registers of the abnormally crashed computing power CPU are restored to an initial state.

[0012] In one embodiment, the periodic reading of the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register of the abnormally crashed computing power CPU includes the following steps:

[0013] After restoring the configuration space register of the abnormally crashed computing power CPU to the initial state, based on the received uboot file, the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register of the abnormally crashed computing power CPU are periodically read.

[0014] In one of the embodiments, the configuration information of the abnormal data includes the starting address of the abnormal data of the computing power CPU that crashed abnormally, the storage address of the abnormal data of the computing power CPU that crashed abnormally in the main control CPU, and the size of the abnormal data of the computing power CPU that crashed abnormally.

[0015] In one embodiment, when the transport mark information of the abnormal data is displayed as the state information of starting transport, based on the configuration information of the abnormal data, the abnormal data of the computing power CPU is transported to the main control CPU, including the following steps:

[0016] When the transfer mark bit information of the abnormal data indicates the start of transfer status, based on the starting address of the abnormal data of the computing power CPU that crashed abnormally, the storage address of the abnormal data of the computing power CPU that crashed abnormally in the main CPU and the size of the abnormal data of the computing power CPU that crashed abnormally, the DMA controller is used to transfer the abnormal data of the computing power CPU to the kernel state cache of the main CPU.

[0017] In one embodiment, after using the DMA controller to transfer the abnormal data of the computing power CPU to the kernel state cache of the main control CPU, the following steps are also included:

[0018] The abnormal data of the computing power CPU is copied from the kernel state cache of the master CPU to the user state cache through the copy_to_user() kernel function.

[0019] In one embodiment, after using the DMA controller to transfer the abnormal data of the computing power CPU to the kernel state cache of the master CPU, the following steps are also included:

[0020] When the size of the abnormal data of the computing power CPU is greater than or equal to a preset threshold data size, the abnormal data of the computing power CPU is compressed to obtain compressed data; the compressed data is copied from the kernel state cache of the master CPU to the user state cache.

[0021] In a second aspect, the present application also provides a device for acquiring abnormal data of a computing power CPU. The device comprises:

[0022] A recovery module, used for restoring the configuration space register of the abnormally crashed computing power CPU to an initial state when there is an abnormally crashed computing power CPU;

[0023] A reading module, used for periodically reading the configuration information of abnormal data and the transport mark bit information of abnormal data in the configuration space register of the computing power CPU that crashed abnormally;

[0024] And an acquisition module is used to transfer the abnormal data of the computing power CPU to the main control CPU based on the configuration information of the abnormal data when the transfer mark bit information of the abnormal data indicates the start of transfer status.

[0025] In a third aspect, the present application also provides another method for obtaining abnormal data of a computing power CPU. The method comprises the following steps:

[0026] The main control CPU periodically obtains the heartbeat signals of each computing power CPU connected to the main control CPU to detect whether there is an abnormally crashed computing power CPU;

[0027] In the case where the computing power CPU crashes abnormally, the master control CPU sends an initial state recovery command to the computing power CPU that crashes abnormally;

[0028] The abnormally crashed computing power CPU responds to the received initial state recovery command by restoring the configuration space register of the abnormally crashed computing power CPU to an initial state;

[0029] After the configuration space register of the abnormally crashed computing CPU is restored to an initial state, the master control CPU transmits the uboot file to the designated memory of the abnormally crashed computing CPU;

[0030] After the uboot file is transferred, the master CPU configures the configuration information of the abnormal data of the abnormally crashed computing CPU and the transport mark bit information of the abnormal data that needs to be obtained in the configuration space register of the abnormally crashed computing CPU;

[0031] The abnormally crashed computing CPU periodically reads the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register of the computing CPU based on the uboot file;

[0032] When the computing power CPU that crashed abnormally reads the transfer mark information of the abnormal data indicating the start of transfer, based on the configuration information of the abnormal data of the computing power CPU that crashed abnormally, the DMA controller is used to transfer the abnormal data of the computing power CPU that crashed abnormally to the kernel state cache of the master CPU.

[0033] In a fourth aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method for obtaining abnormal data of a computing power CPU as described in the first aspect above is implemented.

[0034] The above-mentioned abnormal data acquisition method, device and computer equipment of the computing power CPU, by restoring the configuration space register of the abnormally crashed computing power CPU to the initial state in the presence of an abnormally crashed computing power CPU, and after the configuration space register is restored to the initial state, periodically reading the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register, and then when the transport mark bit information of the abnormal data indicates the start of the transport state, based on the configuration information of the abnormal data, the abnormal data of the computing power CPU is transported to the main control CPU. It configures the data to be transported of the abnormally crashed computing power CPU by configuring the configuration space register of the abnormally crashed computing power CPU, and controls the time of data transport through the configuration space register of the abnormally crashed computing power CPU. Based on the configuration information, all the abnormal data of the computing power CPU are transported to the main control CPU, thereby realizing the acquisition of the abnormal data of the computing power CPU, and does not need to occupy a special chip to store the abnormal data, and the operation is simple, which solves the problem that the acquisition of the abnormal data of the computing power CPU when the system crashes cannot be realized in the related technology.

[0035] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0037] Figure 1 A hardware structure block diagram of a terminal of a method for obtaining abnormal data of a computing power CPU provided in an embodiment of the present application;

[0038] Figure 2 A flowchart of a method for obtaining abnormal data of a computing power CPU provided in an embodiment of the present application;

[0039] Figure 3 A flowchart of another abnormal data acquisition method of a computing power CPU provided in one embodiment of the present application;

[0040] Figure 4 A flowchart of a method for obtaining abnormal data of a computing power CPU provided in a preferred embodiment of the present application;

[0041] Figure 5 This is a structural block diagram of an abnormal data acquisition device for a computing power CPU provided in one embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0043] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0044] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 : is a hardware structure block diagram of a terminal of the abnormal data acquisition method of the computing power CPU of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0045] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the abnormal data acquisition method of the computing power CPU in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0046] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0047] In this embodiment, a method for obtaining abnormal data of a computing power CPU is provided. Figure 2 is a flow chart of the abnormal data acquisition method of the computing power CPU of this embodiment, such as Figure 2 As shown, the process includes the following steps:

[0048] Step S210, in the case where there is an abnormally crashed computing CPU, the configuration space register of the abnormally crashed computing CPU is restored to an initial state.

[0049] The computing power CPU mentioned above may be a CPU for processing data that is cascaded with the main control CPU via PCIE (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard). The configuration space register mentioned above may be a register corresponding to the configuration space of the PCIE in the computing power CPU. The configuration space register mentioned above may be used to receive the configuration information of the abnormal data of the abnormally crashed computing power CPU and the transport mark bit information of the abnormal data from the main control CPU. The initial state mentioned above may be the initial state of the initialization state of the computing power CPU just after power-on. In this step, when there is an abnormally crashed computing power CPU, the configuration space register of the abnormally crashed computing power CPU is restored to the initial state, so as to facilitate the subsequent acquisition of the configuration information of the abnormal data of the abnormally crashed computing power CPU and the transport mark bit information of the abnormal data from the main control CPU according to the change of the state of the configuration space register.

[0050] Step S220, periodically read the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register of the abnormally crashed computing power CPU.

[0051] In this step, the cycle of reading the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register of the abnormally crashed computing power CPU can be specifically set according to the needs, and this embodiment does not make specific limitations here. The configuration information of the abnormal data can include the starting address of the abnormal data of the abnormally crashed computing power CPU, the storage address of the abnormal data of the abnormally crashed computing power CPU in the main control CPU, and the size of the abnormal data of the abnormally crashed computing power CPU. The transport mark bit information of the abnormal data can be used to indicate the status information of the start of transport of the abnormal data and the status information of the non-start of transport, and other status information of the transport of abnormal data can also be set according to specific needs. This embodiment periodically reads the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register of the abnormally crashed computing power CPU, so as to facilitate timely acquisition of the situation where the transport mark bit of the abnormal data indicates the start of transport state.

[0052] Step S230, when the transfer mark information of the abnormal data indicates the start of transfer state, based on the configuration information of the abnormal data, the abnormal data of the computing power CPU is transferred to the main control CPU.

[0053] Specifically, when the abnormal data transfer mark bit information indicates the start transfer status, the abnormal data of the computing power CPU can be transferred to the main control CPU using a preset method based on the starting address of the abnormal data of the abnormally crashed computing power CPU, the storage address of the abnormal data of the abnormally crashed computing power CPU in the main control CPU, and the size information of the abnormal data of the abnormally crashed computing power CPU in the configuration information of the abnormal data.

[0054] In the above steps S210 to S230, when there is an abnormally crashed computing power CPU, the configuration space register of the abnormally crashed computing power CPU is restored to the initial state, and after the configuration space register is restored to the initial state, the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register are periodically read, and then when the transport mark bit information of the abnormal data indicates the start transport state, the abnormal data of the computing power CPU is transported to the main control CPU based on the configuration information of the abnormal data. It configures the data to be transported of the abnormally crashed computing power CPU by configuring the configuration space register of the abnormally crashed computing power CPU, and controls the time of data transport through the configuration space register of the abnormally crashed computing power CPU. Based on the configuration information, all the abnormal data of the computing power CPU are transported to the main control CPU, thereby realizing the acquisition of the abnormal data of the computing power CPU, and does not need to occupy a special chip to store the abnormal data. The operation is simple, and the problem that the acquisition of the abnormal data of the computing power CPU when the system crashes cannot be realized in the related technology is solved.

[0055] In one embodiment, step S210, when a computing power CPU crashes abnormally, restoring the configuration space register of the abnormally crashed computing power CPU to an initial state includes the following steps:

[0056] Step S212, in the event that the computing power CPU crashes abnormally, in response to the received initial state recovery command, the configuration space registers of the abnormally crashed computing power CPU are restored to the initial state.

[0057] The above-mentioned initial state recovery command may be a command sent by the master CPU to restore the configuration space register of the abnormally crashed computing CPU to the initial state. In this step, the abnormally crashed computing CPU, upon receiving the initial state recovery command sent by the master CPU, restores the configuration space register to the initial state, in preparation for the subsequent use of the configuration space register to obtain the configuration information of the abnormal data of the abnormally crashed computing CPU and the abnormal data transfer mark bit information by the master CPU.

[0058] In addition, in one embodiment, step S220, periodically reading the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register of the abnormally crashed computing power CPU, includes the following steps:

[0059] Step S222, after restoring the configuration space register of the abnormally crashed computing power CPU to the initial state, based on the received uboot file, periodically read the configuration information of the abnormal data and the transport mark information of the abnormal data in the configuration space register of the abnormally crashed computing power CPU.

[0060] Among them, the above-mentioned uboot file can be a boot file applied to an embedded operating system such as a Linux system, a NetBSD system, a VxWorks system, a QNX system, a RTEMS system or an Android system, and specifically, it can be a uboot binary file. The above-mentioned uboot file can be an instruction file sent by the main control CPU, which runs in the designated memory of the abnormally crashed computing power CPU and is used to periodically read the configuration information of the abnormal data in the configuration space register of the abnormally crashed computing power CPU and the transport mark bit information of the abnormal data. This embodiment uses the uboot file received by the abnormally crashed computing power CPU to periodically read the configuration information of the abnormal data in the configuration space register of the abnormally crashed computing power CPU and the transport mark bit information of the abnormal data, so as to facilitate the subsequent transport of the abnormal data of the computing power CPU to the main control CPU according to the configuration information of the abnormal data in the configuration space register of the abnormally crashed computing power CPU read.

[0061] Furthermore, in one embodiment, the configuration information of the abnormal data includes the starting address of the abnormal data of the abnormally crashed computing power CPU, the storage address of the abnormal data of the abnormally crashed computing power CPU in the main control CPU, and the size of the abnormal data of the abnormally crashed computing power CPU.

[0062] The starting address of the abnormal data of the abnormally crashed computing power CPU may be the starting address of all the abnormal data of the abnormally crashed computing power CPU that needs to be obtained. The storage address of the abnormal data of the abnormally crashed computing power CPU in the main control CPU may be the storage address of all the abnormal data of the abnormally crashed computing power CPU in the main control CPU reserved in the main control CPU. The size of the abnormal data of the abnormally crashed computing power CPU may be the file size of all the abnormal data of the abnormally crashed computing power CPU, or the size of the memory space occupied by all the abnormal data of the abnormally crashed computing power CPU, that is, the size of the abnormal data of the abnormally crashed computing power CPU that needs to be transmitted.

[0063] In one embodiment, step S230, when the abnormal data transfer flag information indicates the state information of starting transfer, based on the configuration information of the abnormal data, transfer the abnormal data of the computing power CPU to the main control CPU, includes the following steps:

[0064] Step S232, when the abnormal data transfer mark bit information indicates the start transfer state, based on the starting address of the abnormal data of the abnormally crashed computing power CPU, the storage address of the abnormal data of the abnormally crashed computing power CPU in the main control CPU and the size of the abnormal data of the abnormally crashed computing power CPU, a DMA (Direct Memory Access) controller is used to transfer the abnormal data of the computing power CPU to the kernel state cache of the main control CPU.

[0065] In this step, the DMA controller may be a register for copying the abnormal data of the abnormally crashed computing power CPU from the address space in the abnormally crashed computing power CPU to the address space of the main control CPU, so as to realize high-speed data transmission between the memory of the abnormally crashed computing power CPU and the memory of the main control CPU, and then realize the abnormal data of the abnormally crashed computing power CPU being transmitted to the kernel state cache of the main control CPU. The kernel state cache may be a kernel cache area in the main control CPU. By storing the data in the kernel state cache area of ​​the main control CPU, it is convenient to read it from the kernel cache area of ​​the main control CPU to the user process. The above-mentioned use of the DMA controller to carry the abnormal data of the computing power CPU to the kernel state cache of the main control CPU may be, specifically, using the DMA controller, according to the starting address of the abnormal data of the abnormally crashed computing power CPU and the storage address of the abnormal data of the abnormally crashed computing power CPU in the main control CPU, to carry all the abnormal data of the size of the abnormal data of the abnormally crashed computing power CPU to the kernel state cache of the main control CPU.

[0066] Furthermore, in one embodiment, after step S230, the following steps are also included:

[0067] Step S240, through the copy_to_user() kernel function, the abnormal data of the computing power CPU is copied from the kernel state cache of the master CPU to the user state cache.

[0068] The copy_to_user() kernel function mentioned above may be a function in the Linux kernel, which may be used to copy data in the kernel space to the user space, and specifically, to copy abnormal data in the kernel state cache of the master CPU to the user state cache. The user state cache mentioned above may be a cache area of ​​a user process. It should be noted that when there is an abnormally crashed computing power CPU, if it is necessary to locate the crash cause of the abnormal data in the abnormally crashed computing power CPU, it is necessary to copy all abnormal data in the abnormally crashed computing power CPU to the user state cache, and then the user side uses a special parsing tool to parse the abnormal data to obtain the crash cause of the abnormally crashed computing power CPU.

[0069] In one embodiment, after step S230, the following steps are further included:

[0070] Step S250, when the size of the abnormal data of the computing power CPU is greater than or equal to the preset threshold data size, the abnormal data of the computing power CPU is compressed to obtain compressed data; the compressed data is copied from the kernel state cache of the master CPU to the user state cache.

[0071] It should be noted that the size of the preset threshold data can be specifically set according to the specific scenario.

[0072] Figure 3 FIG. 1 is a flowchart of another abnormal data acquisition method of a computing power CPU provided in an embodiment of the present application. Figure 3 As shown, the abnormal data acquisition method of another computing power CPU includes the following steps:

[0073] Step S310: The main control CPU periodically obtains the heartbeat signals of each computing power CPU connected to the main control CPU to detect whether there is an abnormally crashed computing power CPU.

[0074] In this step, the main control CPU periodically obtains the heartbeat signals of each computing power CPU connected to the main control CPU, and compares the heartbeat signals of each computing power CPU obtained with the heartbeat signal of the preset computing power CPU. The above detection of whether there is an abnormally collapsed computing power CPU can be that when the heartbeat signal of the computing power CPU obtained by the main control CPU is consistent with the heartbeat signal of the preset normal computing power CPU, this computing power CPU is not an abnormally collapsed computing power CPU, when the heartbeat signal of the computing power CPU obtained by the main control CPU is inconsistent with the heartbeat signal of the preset normal computing power CPU, this computing power CPU is an abnormally collapsed computing power CPU; it can also be that when the heartbeat signal of the computing power CPU obtained by the main control CPU is consistent with the heartbeat signal of the preset abnormally collapsed computing power CPU, this computing power CPU is an abnormally collapsed computing power CPU, when the heartbeat signal of the computing power CPU obtained by the main control CPU is inconsistent with the heartbeat signal of the preset abnormally collapsed computing power CPU, this computing power CPU is not an abnormally collapsed computing power CPU.

[0075] Step S320: When there is an abnormally crashed computing CPU, the main control CPU sends an initial state recovery command to the abnormally crashed computing CPU.

[0076] Step S330, the abnormally crashed computing power CPU responds to the received initial state recovery command and restores the configuration space registers of the abnormally crashed computing power CPU to the initial state.

[0077] Step S340, after the configuration space register of the abnormally crashed computing CPU is restored to the initial state, the main control CPU transfers the uboot file to the designated memory of the abnormally crashed computing CPU.

[0078] Specifically, after the configuration space register of the abnormally crashed computing CPU is restored to the initial state, the main control CPU transmits the uboot file to the designated memory of the abnormally crashed computing CPU through the PCIE method.

[0079] Step S350, after the uboot file transfer is completed, the main control CPU configures the configuration information of the abnormal data of the abnormally crashed computing power CPU that needs to be obtained and the abnormal data transfer mark bit information in the configuration space register of the abnormally crashed computing power CPU.

[0080] Among them, the above-mentioned main control CPU configures the configuration information of the abnormal data of the abnormally crashed computing power CPU that needs to be obtained and the transportation mark bit information of the abnormal data in the configuration space register of the abnormally crashed computing power CPU. The main control CPU can configure the configuration information of the abnormal data of the abnormally crashed computing power CPU that needs to be obtained and the transportation mark bit information of the abnormal data in the configuration space register of the abnormally crashed computing power CPU through the BAR (Base Address Register) space address of the PCIE.

[0081] Step S360: The abnormally crashed computing CPU periodically reads the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register of the computing CPU based on the uboot file.

[0082] Step S370, when the abnormally crashed computing power CPU reads the abnormal data transfer mark information indicating the start of transfer status, based on the configuration information of the abnormal data of the abnormally crashed computing power CPU, the DMA controller is used to transfer the abnormal data of the abnormally crashed computing power CPU to the kernel state cache of the main control CPU.

[0083] In the above steps S310 to S370, the main control CPU periodically obtains the heartbeat signals of each computing power CPU connected to the main control CPU, detects whether there is an abnormally crashed computing power CPU, and in the case of an abnormally crashed computing power CPU, restores the configuration space register of the abnormally crashed computing power CPU to the initial state, and after the configuration space register is restored to the initial state, periodically reads the configuration information of the abnormal data in the configuration space register and the transport mark bit information of the abnormal data, and then when the transport mark bit information of the abnormal data indicates the start transport state, based on the configuration information of the abnormal data, the abnormal data of the computing power CPU is transported to the main control CPU. It configures the data to be transported of the abnormally crashed computing power CPU by configuring the configuration space register of the abnormally crashed computing power CPU, and controls the time of data transport through the configuration space register of the abnormally crashed computing power CPU. Based on the configuration information, all the abnormal data of the computing power CPU are transported to the main control CPU, thereby realizing the acquisition of the abnormal data of the computing power CPU, and does not need to occupy a special chip to store the abnormal data, the operation is simple, and solves the problem that the acquisition of the abnormal data of the computing power CPU when the system crashes cannot be realized in the related technology.

[0084] The present embodiment is described and illustrated below through preferred embodiments.

[0085] Figure 4 1 is a flow chart of a method for obtaining abnormal data of a computing power CPU provided in a preferred embodiment of the present application. Figure 4As shown, the abnormal data acquisition method of the computing power CPU includes the following steps:

[0086] Step S410: if there is an abnormally crashed computing CPU, restore the configuration space register of the abnormally crashed computing CPU to an initial state;

[0087] Step S420, periodically reading the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register of the abnormally crashed computing power CPU;

[0088] Step S430, when the abnormal data transfer flag information indicates that the transfer state is started, based on the configuration information of the abnormal data, the abnormal data of the computing power CPU is transferred to the main control CPU;

[0089] Step S440, through the copy_to_user() kernel function, the abnormal data of the computing power CPU is copied from the kernel state cache of the master CPU to the user state cache.

[0090] In the above steps S410 to S440, when there is an abnormally crashed computing power CPU, the configuration space register of the abnormally crashed computing power CPU is restored to the initial state, and after the configuration space register is restored to the initial state, the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register are periodically read, and then when the transport mark bit information of the abnormal data indicates the start transport state, the abnormal data of the computing power CPU is transported to the main control CPU based on the configuration information of the abnormal data. It configures the data to be transported of the abnormally crashed computing power CPU by configuring the configuration space register of the abnormally crashed computing power CPU, and controls the time of data transport through the configuration space register of the abnormally crashed computing power CPU. Based on the configuration information, all the abnormal data of the computing power CPU are transported to the main control CPU, thereby realizing the acquisition of the abnormal data of the computing power CPU, and does not need to occupy a special chip to store the abnormal data. The operation is simple, and the problem that the acquisition of the abnormal data of the computing power CPU when the system crashes cannot be realized in the related technology.

[0091] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0092] Based on the same inventive concept, in this embodiment, a device for acquiring abnormal data of a computing power CPU is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware of predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0093] In one embodiment, Figure 5 : is a structural block diagram of an abnormal data acquisition device for a computing power CPU provided in an embodiment of the present application, such as Figure 5 As shown, the abnormal data acquisition device of the computing power CPU includes:

[0094] The recovery module 52 is used to restore the configuration space register of the abnormally crashed computing power CPU to an initial state when there is an abnormally crashed computing power CPU;

[0095] A reading module 54 is used to periodically read the configuration information of abnormal data and the transport mark bit information of abnormal data in the configuration space register of the abnormally crashed computing power CPU;

[0096] And an acquisition module 56 is used to transfer the abnormal data of the computing power CPU to the main control CPU based on the configuration information of the abnormal data when the transfer mark bit information of the abnormal data indicates the start of transfer state.

[0097] The abnormal data acquisition device of the computing power CPU mentioned above, in the case of an abnormal crash of the computing power CPU, restores the configuration space register of the abnormal crash of the computing power CPU to the initial state, and after the configuration space register is restored to the initial state, periodically reads the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register, and then when the transport mark bit information of the abnormal data indicates the start transport state, based on the configuration information of the abnormal data, the abnormal data of the computing power CPU is transported to the main control CPU. It configures the data to be transported of the abnormal crash of the computing power CPU by configuring the configuration space register of the abnormal crash of the computing power CPU, and controls the time of data transport by using the configuration space register of the abnormal crash of the computing power CPU. Based on the configuration information, all the abnormal data of the computing power CPU are transported to the main control CPU, thereby realizing the acquisition of the abnormal data of the computing power CPU, and does not need to occupy a special chip to store the abnormal data, and the operation is simple, which solves the problem that the acquisition of the abnormal data of the computing power CPU when the system crashes cannot be realized in the related technology.

[0098] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0099] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, any one of the abnormal data acquisition methods for the computing power CPU in the above embodiments is implemented.

[0100] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0101] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0102] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for obtaining abnormal data of a computing power CPU, characterized in that: The method comprises: In the case of an abnormally crashed computing CPU, the configuration space register of the abnormally crashed computing CPU is restored to an initial state; After restoring the configuration space register of the abnormally crashed computing power CPU to an initial state, configuring the configuration information of the abnormal data of the abnormally crashed computing power CPU and the transport mark bit information of the abnormal data that need to be obtained in the configuration space register of the abnormally crashed computing power CPU; based on the received uboot file, periodically reading the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register of the abnormally crashed computing power CPU; When the transfer mark bit information of the abnormal data indicates the start of transfer state, the abnormal data of the computing power CPU is transferred to the main control CPU based on the configuration information of the abnormal data.

2. The method for obtaining abnormal data of a computing power CPU according to claim 1, characterized in that: In the case where the computing power CPU crashes abnormally, restoring the configuration space register of the abnormally crashed computing power CPU to an initial state includes: In the event that the computing power CPU crashes abnormally, in response to a received initial state recovery command, the configuration space registers of the abnormally crashed computing power CPU are restored to an initial state.

3. The method for obtaining abnormal data of a computing power CPU according to claim 1, characterized in that: The configuration information of the abnormal data includes the starting address of the abnormal data of the abnormally crashed computing power CPU, the storage address of the abnormal data of the abnormally crashed computing power CPU in the main control CPU, and the size of the abnormal data of the abnormally crashed computing power CPU.

4. The method for obtaining abnormal data of a computing power CPU according to claim 3, characterized in that: When the transport mark information of the abnormal data is displayed as the state information of starting transport, based on the configuration information of the abnormal data, transporting the abnormal data of the computing power CPU to the main control CPU includes: When the transfer mark bit information of the abnormal data indicates the start of transfer status, based on the starting address of the abnormal data of the computing power CPU that crashed abnormally, the storage address of the abnormal data of the computing power CPU that crashed abnormally in the main CPU and the size of the abnormal data of the computing power CPU that crashed abnormally, the DMA controller is used to transfer the abnormal data of the computing power CPU to the kernel state cache of the main CPU.

5. The method for obtaining abnormal data of a computing power CPU according to claim 4, characterized in that: After using the DMA controller to transfer the abnormal data of the computing power CPU to the kernel state cache of the main control CPU, the method further includes: The abnormal data of the computing power CPU is copied from the kernel state cache of the master CPU to the user state cache through the copy_to_user() kernel function.

6. The method for obtaining abnormal data of a computing power CPU according to claim 5, characterized in that: After using the DMA controller to transfer the abnormal data of the computing power CPU to the kernel state cache of the main control CPU, the method further includes: When the size of the abnormal data of the computing power CPU is greater than or equal to a preset threshold data size, the abnormal data of the computing power CPU is compressed to obtain compressed data; the compressed data is copied from the kernel state cache of the master CPU to the user state cache.

7. A device for acquiring abnormal data of a computing power CPU, characterized in that: The device comprises: A recovery module, used for restoring the configuration space register of the abnormally crashed computing power CPU to an initial state when there is an abnormally crashed computing power CPU; A reading module, for configuring, in the configuration space register of the computing power CPU that crashed abnormally, the configuration information of the abnormal data of the computing power CPU that crashed abnormally and the transport mark bit information of the abnormal data that needs to be obtained and the transport mark bit information of the abnormal data, after restoring the configuration space register of the computing power CPU that crashed abnormally to an initial state; and periodically reading, based on the received uboot file, the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register of the computing power CPU that crashed abnormally; And an acquisition module is used to transfer the abnormal data of the computing power CPU to the main control CPU based on the configuration information of the abnormal data when the transfer mark bit information of the abnormal data indicates the start of transfer status.

8. A method for obtaining abnormal data of a computing power CPU, characterized in that: The method comprises: The main control CPU periodically obtains the heartbeat signals of each computing power CPU connected to the main control CPU to detect whether there is an abnormally crashed computing power CPU; In the case where the computing power CPU crashes abnormally, the master control CPU sends an initial state recovery command to the computing power CPU that crashes abnormally; The abnormally crashed computing power CPU responds to the received initial state recovery command by restoring the configuration space register of the abnormally crashed computing power CPU to an initial state; After the configuration space register of the abnormally crashed computing CPU is restored to an initial state, the master control CPU transmits the uboot file to the designated memory of the abnormally crashed computing CPU; After the uboot file is transferred, the master CPU configures the configuration information of the abnormal data of the abnormally crashed computing CPU and the transport mark bit information of the abnormal data that needs to be obtained in the configuration space register of the abnormally crashed computing CPU; The abnormally crashed computing CPU periodically reads the configuration information of the abnormal data and the transport mark bit information of the abnormal data in the configuration space register of the computing CPU based on the uboot file; When the computing power CPU that crashed abnormally reads the transfer mark information of the abnormal data indicating the start of transfer, based on the configuration information of the abnormal data of the computing power CPU that crashed abnormally, the DMA controller is used to transfer the abnormal data of the computing power CPU that crashed abnormally to the kernel state cache of the master CPU.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Kernel exception processing method and system

    CN115292077A

  • Abnormal backtracking method, device, equipment and medium

    CN116450398A

  • Processor, method for acquiring information, single board and network equipment

    CN117453439A

  • Chip CPU abnormity diagnosis method and device

    CN118093235A

  • System abnormal data acquisition method and device, electronic equipment and storage medium

    CN118277221A