A RAID controller card and computing device
By introducing reset signal control logic and supercapacitor power management into the RAID controller card, the problem of data loss during power failure or reset of the cache RAID controller card is solved, achieving data transmission stability and cost-effectiveness.
Patent Information
- Application Number
- CN202210980223.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-16
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2042-08-16
AI Technical Summary
During a power outage or reset, cached data may be lost in the high-speed cache RAID controller card, leading to abnormal data transmission.
A reset signal is introduced into the control logic. After receiving the reset signal, the RAID controller card stops receiving data, uses a supercapacitor to provide power to write the cached data into the non-volatile memory, and then powers on again to reset after completing the cache unloading operation.
This avoids the RAID controller card receiving invalid data during the reset process, ensuring data integrity, reducing the probability of anomalies, and lowering costs.
Smart Images

Figure CN115344514B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computing devices, and more particularly to a RAID controller card and a computing device. Background Technology
[0002] Redundant Array of Independent Disks (RAID) uses virtualization storage technology to combine multiple independent disks into a large-capacity disk group. A cached RAID controller card refers to a RAID controller card equipped with high-speed cache memory such as Double Data Rate (DDR).
[0003] Cache RAID controllers improve data transfer efficiency by caching data in a cache memory before sending it to other storage devices. However, during data transfer, if a power outage or reset occurs, the cached data may be lost, leading to data loss during RAID controller transmission. Summary of the Invention
[0004] To address the aforementioned issues, embodiments of this application provide a RAID controller card and a computing device. Upon receiving a reset signal from the processor of the electronic device, the RAID controller card stops receiving data transmission via the PCIe bus and powers down. A supercapacitor provides power to the RAID controller, enabling it to read cached data from the cache memory and store the cached data in other memory. After completing the COL operation, the RAID controller card is powered on again and reset according to the reset signal, thus preventing the RAID controller card from receiving other data during the reset process and causing abnormalities.
[0005] Therefore, the following technical solutions are adopted in the embodiments of this application:
[0006] In a first aspect, this application provides a RAID controller card, including: a logic controller and a RAID controller. The logic controller is used to receive a reset signal, generate a power loss signal based on the reset signal, and send the power loss signal to the RAID controller. The reset signal is used to instruct the RAID controller to perform a reset. The RAID controller is used to perform a cache unload COL operation based on the power loss signal. The COL operation refers to the process of writing cached data in the cache memory to non-volatile memory after the RAID controller card loses power.
[0007] In this implementation, a reset signal is incorporated into the abnormal power-down control logic of the RAID controller. Upon receiving the reset signal, the RAID controller can treat it as a power-down anomaly signal, making the process of handling abnormal power-downs and system resets identical. This solves the problem of RAID controllers receiving other data during the reset process without significantly altering the existing internal structure of the RAID controller, thereby greatly reducing costs.
[0008] In one implementation, the logic controller is further configured to send a reset signal to the RAID controller based on a power loss signal; the RAID controller is further configured to disable the high-speed serial computer expansion bus standard PCIe core of the RAID controller based on the reset signal, the PCIe core being used to control the PCIe bus to receive data.
[0009] In this implementation, the logic controller sends a reset signal to the RAID controller to disable the PCIe core, thereby disconnecting the communication connection between the RAID controller card and the electronic device via the PCIe bus. This prevents the RAID controller from continuing to receive data, which could cause the RAID controller card to fail to start normally.
[0010] In one embodiment, the logic controller includes a power-down processing unit and a reset processing unit. The power-down processing unit is used to generate a trigger signal based on a power loss signal and send the trigger signal to the reset processing unit. The reset processing unit is used to forward a reset signal to the RAID controller based on the trigger signal.
[0011] In one implementation, the RAID controller is further configured to send a lock command to the logic controller after receiving a power loss signal. The lock command is used to instruct the logic controller to lock the function of sending power loss signals.
[0012] In this implementation, during the COL operation, the RAID controller sends a lock command to the logic controller, preventing the logic controller from sending a power loss signal while the RAID controller is performing the COL operation. This avoids the RAID controller receiving a power loss signal again while performing the COL operation, causing the RAID controller to continuously re-execute the COL operation, resulting in the RAID controller entering a COL operation dead loop and causing the RAID controller card to malfunction.
[0013] In one embodiment, the RAID controller is further configured to send a COL completion signal to the logic controller after completing the COL operation; the logic controller is further configured to send a reset signal to the RAID controller after receiving the COL completion signal, the reset signal being used to instruct the RAID controller to perform a reset.
[0014] In this implementation, after the RAID controller completes the COL operation, the logic controller sends a reset signal again, and the RAID controller is re-initialized, thus resetting the RAID controller.
[0015] In one implementation, the RAID controller is further configured to send an unlock command to the logic controller after completing the COL operation. The unlock command is used to instruct the logic controller to unlock the function of sending power loss signals.
[0016] In this implementation, after the RAID controller completes the reset operation, it needs to unlock the logic controller so that the logic controller can send a power loss signal to the RAID controller normally, thus enabling the RAID controller to work normally.
[0017] In one implementation, the RAID controller is further configured to periodically send a heartbeat signal to the logic controller; the logic controller is further configured to, upon receiving the heartbeat signal, unlock the function of sending a power loss signal.
[0018] In one implementation, the logic controller is also configured to lock the function of transmitting a power loss signal if no heartbeat signal is received within a set time period.
[0019] In one implementation, the RAID controller stops sending heartbeat signals to the logic controller after receiving a power loss signal.
[0020] In one implementation, the logic controller is further configured to receive a power supply signal, generate a power loss signal based on the power supply signal, and send the power loss signal to the RAID controller. The power supply signal is used to indicate that the electrical signal received by the RAID controller is abnormal.
[0021] Secondly, this application provides a method for handling write cache exceptions, executed by a RAID controller card. The method includes: receiving a reset signal, which instructs the RAID controller card to perform a reset; performing a cache unloading COL operation based on the reset signal, whereby the COL operation refers to the process of writing cached data from the cache memory to non-volatile memory after the RAID controller card loses power; and performing a reset operation after determining that the RAID controller card has completed the COL operation.
[0022] In one embodiment, the RAID controller card includes a logic controller and a RAID controller, and performs a cache unload COL operation according to a reset signal, including: after receiving the reset signal, the logic controller controls the RAID controller to perform the COL operation.
[0023] In one implementation, after receiving a reset signal, the logic controller controls the RAID controller to perform a COL operation, including: after receiving the reset signal, the logic controller generates a power loss signal and sends the power loss signal to the RAID controller; after receiving the power loss signal, the RAID controller performs a COL operation.
[0024] In one implementation, after the logic controller receives a reset signal, generates a power loss signal, and sends the power loss signal to the RAID controller, the method further includes: the logic controller triggers the logic controller to send a reset signal to the RAID controller based on the power loss signal. The reset signal is used to instruct the RAID controller to shut down the core of the RAID controller's high-speed serial computer expansion bus standard PCIe, and the PCIe core is used to control the PCIe bus to receive data.
[0025] In one embodiment, the logic controller includes a power-down processing unit and a reset processing unit. The logic controller triggers a reset signal to be sent to the RAID controller based on a power loss signal. This includes: the power-down processing unit generating a trigger signal based on the power loss signal and sending the trigger signal to the reset processing unit; and the reset processing unit forwarding the reset signal to the RAID controller based on the trigger signal.
[0026] In one embodiment, after performing the cache unload COL operation according to the reset signal, the method further includes: stopping receiving the reset signal when determining that the RAID controller is performing the COL operation.
[0027] In one embodiment, the RAID controller includes a logic controller and a RAID controller. Determining that the RAID controller stops receiving reset signals when performing a COL operation includes: after receiving a power loss signal, the RAID controller sends a lock command to the logic controller. The lock command is used to instruct the logic controller to lock the function of the RAID controller in sending power loss signals during the COL operation.
[0028] In one embodiment, the RAID controller includes a logic controller and a RAID controller. After determining that the RAID controller has completed the COL operation, a reset operation is performed, including: the RAID controller sending a COL completion signal to the logic controller, the COL completion signal indicating that the RAID controller has completed the COL operation; and the logic controller sending a reset signal to the RAID controller, the reset signal indicating that the RAID controller is to perform a reset.
[0029] In one embodiment, the RAID controller card includes a logic controller and a RAID controller. After determining that the RAID controller card has completed the COL operation and performing a reset operation, the RAID controller further includes: after completing the COL operation, sending an unlock command to the logic controller. The unlock command is used to instruct the logic controller to unlock the function of sending power loss signals.
[0030] In one implementation, the RAID controller card includes a logic controller and a RAID controller, and the method further includes: the RAID controller periodically sending a heartbeat signal to the logic controller; and the logic controller, upon receiving the heartbeat signal, unlocking the function of sending a power loss signal.
[0031] In one implementation, the method further includes: locking the function of the logic controller to send a power loss signal when the logic controller has not received a heartbeat signal for a period of time exceeding a set time period.
[0032] Thirdly, this application provides a computing device, comprising: at least one processor, at least one memory, and at least one RAID controller card as may be implemented in the first aspect, the RAID controller card being used to transfer data sent by at least one processor to at least one memory.
[0033] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the various possible implementations of the second aspect.
[0034] Fifthly, this application provides a computer program product, characterized in that the computer program product stores instructions that, when executed by a computer, cause the computer to implement the various possible embodiments of the second aspect. Attached Figure Description
[0035] The accompanying drawings used in the description of the embodiments or prior art are briefly introduced below.
[0036] Figure 1 A schematic diagram of the architecture of a data storage system is provided;
[0037] Figure 2 This is a schematic diagram of the structure of a RAID controller card provided in the embodiments of this application;
[0038] Figure 3 This is a flowchart illustrating a write cache exception handling method provided in an embodiment of this application.
[0039] Figure 4 This is a schematic diagram of the architecture of a write cache exception handling device provided in the embodiments of this application. Detailed Implementation
[0040] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0041] In this article, the term "and / or" describes 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. The symbol " / " in this article indicates that the related objects are in an "or" relationship; for example, A / B means A or B.
[0042] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects. For example, "first response message" and "second response message," etc., are used to distinguish different response messages, not to describe a specific order of response messages.
[0043] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0044] In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, for example, multiple processing units means two or more processing units, multiple elements means two or more elements, etc.
[0045] Figure 1 A schematic diagram of a data storage system architecture is provided. (For example...) Figure 1 The system shown includes electronic devices, a RAID controller card, and a hard disk drive (HDD). The electronic devices include a central processing unit (CPU). The RAID controller card includes a system-on-a-chip (SOC), a supercapacitor C, NAND flash memory, and at least one DDR memory. The CPU of the electronic devices communicates with the SOC via a PCIe bus. The supercapacitor C is electrically connected to the SOC via a DC / DC converter. The SOC communicates with at least one DDR memory. The SOC communicates with the NAND flash memory. The SOC communicates with the HDD via a serial-attached SCSI (SAS) bus.
[0046] During the process of the CPU storing data to be stored in the HDD, the CPU's data is transferred to the HDD via the RAID controller card. During data transfer, the SOC receives data via the PCIe bus and caches the received data in DDR in real time. The SOC reads the cached data from the DDR and transfers the read data to the HDD via the SAS bus. DDR can combine multiple write I / Os into a single write I / O, allowing the RAID controller card to cache data in DDR before sending it to the HDD, thus improving the data transfer efficiency of the RAID controller card.
[0047] If the RAID controller suddenly loses power while DDR is caching data, the cached data in the DDR memory may be lost. To prevent this loss, existing RAID controllers incorporate a supercapacitor C. When the RAID controller is powered normally, supercapacitor C is charging. When the RAID controller loses power, supercapacitor C discharges and supplies power to the System-on-Chip (SOC). Therefore, when the RAID controller suddenly loses power, supercapacitor C supplies power to the SOC, allowing the SOC to read the cached data from the DDR and store it in NAND flash memory, thus preventing the loss of the cached data in the DDR. This process is also known as the RAID controller's cache offload (COL) operation.
[0048] In existing technology, when the CPU of an electronic device resets, it can send a reset signal to the RAID controller's System-on-a-Chip (SOC), instructing the SOC to reset. However, for a period of time after the CPU reset, the PCIe bus may still be transmitting data to the SOC. If the SOC receives invalid (dirty) data during the reset process, it cannot reset. Therefore, for a period of time after the CPU reset, the SOC continuously switches between resetting and receiving data, causing the RAID controller to fail to start normally.
[0049] To address the issue of existing RAID controller cards failing to boot properly, this application provides a RAID controller card and a computing device.
[0050] In this application, after receiving a reset signal from the CPU of the electronic device, the RAID controller card stops receiving data transmission from the PCIe bus and powers down. The supercapacitor C provides power to the SOC, enabling the SOC to read cached data from the DDR memory and store the cached data in NAND flash memory. After completing the COL operation, the RAID controller card powers back on and resets according to the reset signal, thus preventing malfunctions caused by the RAID controller card receiving other data during the reset process.
[0051] Figure 2 This is a schematic diagram of the structure of a RAID controller card provided in an embodiment of this application. Figure 2 The RAID controller card 200 shown includes a connector 210, a backup power supply 220, a voltage monitoring unit 230, a logic controller 240, a RAID controller 250, a first memory 260, and a second memory 270.
[0052] Connector 210 refers to the collection of various interfaces of the RAID controller card 200, including a power interface, a PCIe interface, and other interfaces. The power interface is electrically connected to an external power supply, providing power to the RAID controller card 200. The PCIe interface is coupled to the PCIe interfaces of other electronic devices via the PCIe bus, allowing it to receive data from those devices.
[0053] The backup power supply 220 can be a supercapacitor or a battery. In one embodiment, the supercapacitor can be coupled between the power interface of connector 210 and RAID controller 250. When the power interface of connector 210 is powered on, the supercapacitor is in a charging state. When the power interface of connector 210 is de-powered, the supercapacitor is in a discharging state and provides power to RAID controller 250. In other embodiments, the backup power supply 220 can be a lithium battery, a rechargeable battery, or other batteries, which are not limited herein.
[0054] The voltage monitoring unit 230 can be coupled to the trace between the power interface of connector 210 and RAID controller 250 via a wiring connection to sample the voltage of the trace between the power interface of connector 210 and RAID controller 250. The output of the voltage monitoring unit 230 is coupled to the logic controller 240 to detect whether the voltage of the external power supply is abnormal, and to send a power supply signal to the logic controller 240 when the voltage of the external power supply is abnormal.
[0055] In one embodiment, after obtaining the sampled voltage, the voltage monitoring unit 230 determines whether the sampled voltage is greater than a set threshold. When the sampled voltage is greater than or equal to the set threshold, it indicates that the voltage input to the RAID controller card 200 from the external power supply is normal, and the voltage monitoring unit 230 does not need to perform any processing. When the sampled voltage is less than the set threshold, the voltage monitoring unit 230 sends a power supply signal to the logic controller 240, indicating that the voltage input to the RAID controller card 200 from the external power supply is abnormal.
[0056] The logic controller 240 can be a complex programmable logic device (CPLD), a field programmable gate array (FPGA), or other devices. The inputs of the logic controller 240 are coupled to the communication interface on connector 210 to receive reset signals from other electronic devices. The logic controller 240 establishes a communication connection with the RAID controller 250 to transmit power loss (PL) signals, reset signals, or other control commands.
[0057] In this embodiment, the logic controller 240 can be divided into a power-down processing unit 241 and a reset processing unit 242 according to the functions it performs. In one embodiment, after receiving the power supply signal input from the voltage monitoring unit 230, the power-down processing unit 241 sends a PL signal to the RAID controller 250, instructing the RAID controller 250 to perform a COL operation.
[0058] In one embodiment, after receiving a reset signal, the logic controller 240 inputs the reset signal to the power-down processing unit 241. Upon receiving the reset signal, the power-down processing unit 241 sends a PL signal to the RAID controller 250, instructing the RAID controller 250 to perform a COL operation.
[0059] In one embodiment, after receiving a reset signal, the logic controller 240 inputs the reset signal to the reset processing unit 242. Upon receiving the reset signal, the reset processing unit 242, triggered by the power-down processing unit 241, sends a reset signal to the RAID controller 250, instructing the RAID controller 250 to shut down its PCIe core, thereby disconnecting the RAID controller card 200 from the PCIe bus of the electronic device.
[0060] In one embodiment, after receiving the COL completion signal sent by the RAID controller 250, the logic controller 240 triggers the reset processing unit 242 to send a reset signal to the RAID controller 250, instructing the RAID controller 250 to perform a reset and achieve initialization.
[0061] The RAID controller 250 can be a System-on-a-Chip (SoC), CPU, microcontroller unit (MCU), or other processor. In one embodiment, the RAID controller 250 performs a COL operation upon receiving a PL signal. In another embodiment, the RAID controller 250 shuts down its PCIe core and resets upon receiving a reset signal.
[0062] The first memory 260 can be DDR, dynamic random access memory (DRAM), static random access memory (SRAM), or other random access memory. In this embodiment, the first memory 260 is coupled to the RAID controller 250. The RAID controller 250 receives data through the PCIe bus and caches the received data in the first memory 260 in real time. The RAID controller 250 reads the cached data from the first memory 260 and writes the read data to the second memory 270 or other memory.
[0063] The second memory 270 can be NAND flash memory, a solid-state disk (SSD), a hard disk, magnetic tape, a compact disc (CD), a digital versatile disc (DVD), or other non-volatile memory. In this embodiment, the second memory 270 is coupled to the RAID controller 250. The second memory 270 is used to store data read by the RAID controller 250.
[0064] In one embodiment, the second memory 270 may store a program (or instructions or code) that can be executed by a processor, causing the processor to perform the exception handling method of the RAID controller card described in this embodiment. Optionally, the RAID controller 250 may also store data. For example, the RAID controller 250 may read data stored in the second memory 270, which may be stored at the same storage address as the program, or it may be stored at a different storage address.
[0065] In this application, the RAID controller 250, the first memory 260, and the second memory 270 can be configured separately or integrated together. For example, they can be integrated on a single board or a printed circuit board (PCB). Similarly, the RAID controller 250, the first memory 260, and the second memory 270 can be configured separately or integrated together.
[0066] It is understood that the structures illustrated in the embodiments of this application do not constitute a limitation on the specific structure of the RAID controller card 200. In other embodiments of this application, the RAID controller card 200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0067] Figure 3 This is a flowchart illustrating a write cache exception handling method provided in an embodiment of this application. Figure 3 As shown, the specific process for handling write cache exceptions between logic controller 240 and RAID controller 250 is as follows:
[0068] In step S301, the logic controller 240 receives a reset signal sent by the electronic device.
[0069] Electronic devices refer to devices coupled to a RAID controller card, which can be computers, laptops, base stations, outdoor cabinets, automobiles, or other equipment. In this embodiment, the connector 210 of the RAID controller card 200 is coupled to a connector on the electronic device, establishing a communication connection between the RAID controller card 200 and the electronic device via the PCIe bus, thereby enabling data transmission between the electronic device and the RAID controller card 200.
[0070] When sending data, the processor of the electronic device first reads the data stored in the memory and then transmits it to the RAID controller 250 of the RAID controller card 200 via the PCIe bus. In one embodiment, when the processor of the electronic device triggers a power-on reset, watchdog reset, low-voltage reset, peripheral circuit reset, or other type of reset, the processor of the electronic device is equivalent to restarting and operating. At this time, the processor of the electronic device needs to re-establish communication connections with other devices. In this application, the processor of the electronic device sends a reset signal to the RAID controller card 200, allowing the PCIe bus between the electronic device and the RAID controller card 200 to re-establish communication connections.
[0071] In step S302, the logic controller 240 generates a power loss signal based on the reset signal.
[0072] Specifically, after receiving the reset signal, the RAID controller 200 first transmits the reset signal to the logic controller 240. Upon receiving the reset signal, the logic controller 240 generates a power loss signal based on the reset signal, which instructs the RAID controller 250 to perform a COL operation.
[0073] In one embodiment, the logic controller 240 includes an AND gate control logic unit. One input of the AND gate control logic unit receives a power supply signal from the voltage monitoring unit 230. The other input of the AND gate control logic unit receives a reset signal. The output of the AND gate control logic unit is coupled to the RAID controller 250. Upon receiving either the power supply signal or the reset signal, both inputs of the AND gate control logic unit will send a power loss signal to the RAID controller 250.
[0074] In step S303, the logic controller 240 sends a power loss signal and a reset signal to the RAID controller 250.
[0075] Specifically, after receiving a power loss signal, the logic controller 240 sends a power loss signal to the RAID controller 250. Simultaneously, the logic controller 240 sends a reset signal to the RAID controller 250. In one embodiment, the logic controller 240 includes a power-down processing unit 241 and a reset processing unit 242. The logic controller 240 sends a reset signal to both the power-down processing unit 241 and the reset processing unit 242. The power-down processing unit 241 can generate a power loss signal based on the reset signal and send it to the RAID controller 250. Optionally, after receiving the power loss signal, the power-down processing unit 241 sends a trigger signal to the reset processing unit 242. Upon receiving the trigger signal, the reset processing unit 242 forwards the reset signal to the RAID controller 250.
[0076] In step S304, after receiving the power loss signal and the reset signal, the RAID controller 250 executes the COL operation.
[0077] Specifically, after receiving a power loss signal, the RAID controller 250 internally performs a COL operation. The COL operation refers to the RAID controller card 200 unloading cached data from its corresponding random access memory (RAM) to its corresponding non-volatile memory (NDRAM) when an abnormal power outage or other sudden event occurs, i.e., unloading data from the first memory 260 to the second memory 270, thus protecting data integrity. In this embodiment, the first memory 260 is the RAM of the RAID controller 250, used to cache cached data sent by electronic devices. The second memory 270 is the NDRAM of the RAID controller 250, used to store cached data written by the RAID controller 250.
[0078] Upon receiving a reset signal, the RAID controller 250 disables its PCIe core, disconnecting the PCIe bus between the RAID controller card 200 and the electronic device. The RAID controller 250 stops receiving data from the electronic device. However, when the RAID controller 250 performs a COL operation, even after a power failure, the first memory 260 still caches data. At this time, the backup power supply 220 provides power to the RAID controller 250, allowing it to continue reading data from the first memory 260 and writing the cached data from the first memory 260 into the second memory 270, thus preventing data loss from the first memory 260.
[0079] If the RAID controller 250 receives another power loss signal during a COL operation, it will continuously re-execute the COL operation, causing it to enter a COL operation infinite loop and resulting in a malfunction of the RAID controller card 200. In this embodiment, after receiving a power loss signal, the RAID controller 250 can send a lock command to the logic controller 240. Upon receiving the lock command, the logic controller 240 enters a locked state and stops sending power loss signals to the RAID controller 250, preventing the RAID controller 250 from receiving another power loss signal during the COL operation.
[0080] In one embodiment, the logic controller 240 includes a power-down processing unit 241. Upon receiving a lock command, the logic controller 240 shuts down the power-down processing unit 241 to prevent it from sending a power loss signal to the RAID controller 250 again after receiving a sampled voltage or reset signal, thus preventing the RAID controller 250 from entering a COL operation dead loop. Here, "locking" can refer to the logic controller 240 shutting down the power-down processing unit 241.
[0081] In step S305, the RAID controller 250 sends a COL completion signal to the logic controller 240.
[0082] In step S306, the logic controller 240 sends a reset signal to the RAID controller 250.
[0083] Specifically, during the COL operation, the RAID controller 250 disables the PCIe core based on a reset signal. After resetting the PCIe core, the RAID controller 250 needs to scan the PCIe bus to enumerate all devices connected to it. When the RAID controller 250 reaches the PCIe enumeration stage, it waits for the RAID controller 250 to complete the COL operation so that it can reinitialize.
[0084] In this application, after completing the COL operation, the RAID controller 250 sends a COL completion signal to the logic controller 240. Upon receiving the COL completion signal, the logic controller 240 triggers the reset processing unit 242 to send a reset signal to the RAID controller 250 again. After receiving the reset signal again, the RAID controller 250 re-initializes, thus resetting the RAID controller 250.
[0085] After the RAID controller 250 completes the reset operation, the logic controller 240 remains in a locked state. The RAID controller 250 can send an unlock command to the logic controller 240. Upon receiving the unlock command, the logic controller 240 releases its lock, allowing it to send a power loss signal to the RAID controller 250 normally. In one embodiment, the logic controller 240 includes a power-down processing unit 241. Upon receiving the unlock command, the logic controller 240 releases the lock of the power-down processing unit 241, allowing it to operate normally.
[0086] Normally, after the logic controller 240 sends a power loss signal to the RAID controller 250, the RAID controller 250 can periodically send heartbeat signals to the logic controller 240. When the RAID controller 250 performs a reset or executes a COL operation, the RAID controller 250 stops sending heartbeat signals to the logic controller 240. Therefore, the RAID controller 250 will stop sending heartbeat signals to the logic controller 240 when performing a COL operation. If the logic controller 240 does not receive a heartbeat signal within a set time period, the logic controller 240 enters a locked state. The locked state means that the power-down processing unit 241 is turned off to prevent the power-down processing unit 241 from sending a power loss signal to the RAID controller 250 again after receiving a sampling voltage or reset signal, thus preventing the RAID controller 250 from entering a COL operation dead loop.
[0087] When the RAID controller 250 completes the COL operation, it sends a heartbeat signal to the logic controller 240 again. After receiving the heartbeat signal again, the logic controller 240 unlocks itself. Unlocking means releasing the power-down processing unit 241 from its lock, allowing it to operate normally.
[0088] In one embodiment, if the logic controller 240 does not receive a heartbeat signal within a set time period, causing it to enter a locked state, it can be considered that the logic controller 240 enters a locked state after receiving a lock command. Similarly, if the logic controller 240 unlocks itself upon receiving a heartbeat signal, it can be considered that the logic controller 240 unlocks itself after receiving an unlock command.
[0089] In this embodiment, a reset signal is introduced into the abnormal power-down control logic of the RAID controller card. When the RAID controller card receives a reset signal, it can treat it as a power-down anomaly signal, making the process of handling abnormal power-downs and system resets identical. This solves the problem of RAID controller cards receiving other data during the reset process without significantly altering the existing internal structure of the RAID controller card, thereby greatly reducing costs.
[0090] Figure 4 This is a schematic diagram of the architecture of a write cache exception handling device provided in an embodiment of this application. Figure 4 The write cache exception handling device 400 shown includes a transceiver unit 401 and a processing unit 402. The processing unit 402 includes a logic controller 4021 and a RAID controller 4022. The specific implementation process of each unit is as follows:
[0091] In one embodiment, the transceiver unit 401 is used to receive a reset signal, which is used to instruct the RAID controller card to perform a reset; the processing unit 402 is used to perform a cache unload COL operation according to the reset signal, whereby the COL operation refers to the process of writing cached data in the cache memory to non-volatile memory after the RAID controller card is powered off; after determining that the RAID controller card has completed the COL operation, the reset operation is performed.
[0092] In one embodiment, the processing unit 402 includes a logic controller 4021 and a RAID controller 4022. After receiving a reset signal, the logic controller 4021 controls the RAID controller 4022 to perform a COL operation.
[0093] In one implementation, after receiving a reset signal, the logic controller 4021 generates a power loss signal and sends the power loss signal to the RAID controller 4022; after receiving the power loss signal, the RAID controller 4022 performs a COL operation.
[0094] In one implementation, the logic controller 4021 is triggered to send a reset signal to the RAID controller 4022 based on a power loss signal. The reset signal is used to instruct the RAID controller 4022 to shut down the high-speed serial computer expansion bus standard PCIe core of the RAID controller 4022. The PCIe core is used to control the PCIe bus to receive data.
[0095] In one embodiment, the processing unit 402 is further configured to stop receiving reset signals when the RAID controller performs a COL operation.
[0096] In one embodiment, the processing unit 402 includes a logic controller 4021 and a RAID controller 4022. After receiving a power loss signal, the RAID controller 4022 sends a lock command to the logic controller 4021. The lock command is used to instruct the logic controller 4021 to lock the function of the RAID controller 4022 in sending a power loss signal during the COL operation.
[0097] In one embodiment, the processing unit 402 includes a logic controller 4021 and a RAID controller 4022. The RAID controller 4022 sends a COL completion signal to the logic controller 4021, which instructs the RAID controller 4022 to complete the COL operation. The logic controller 4021 sends a reset signal to the RAID controller 4022, which instructs the RAID controller 4022 to perform a reset.
[0098] In one embodiment, the processing unit 402 includes a logic controller 4021 and a RAID controller 4022. After completing the COL operation, the RAID controller 4022 sends an unlock command to the logic controller 4021. The unlock command is used to instruct the logic controller 4021 to unlock the function of sending a power loss signal to the RAID controller 4022.
[0099] In one embodiment, the processing unit 402 includes a logic controller 4021 and a RAID controller 4022. The RAID controller 4022 periodically sends a heartbeat signal to the logic controller 4021. After receiving the heartbeat signal, the logic controller 4021 unlocks the function of sending a power loss signal.
[0100] In one implementation, the logic controller 4021 locks the function of sending a power loss signal when it does not receive a heartbeat signal for a set period of time.
[0101] This application embodiment also provides a computing device, which includes at least one processor, at least one memory, and at least one device capable of performing functions such as... Figures 2-4 The RAID controller card corresponding to the above protection enables the computing device to have the technical effect of the above protection solution.
[0102] This application embodiment also provides a computer-readable storage medium storing a computer program thereon, which, when executed in a computer, causes the computer to perform the above-described actions. Figures 2-4 And any of the methods described in the corresponding description.
[0103] This application also provides a computer program product, which stores instructions that, when executed by a computer, cause the computer to perform the above-described actions. Figures 2-4 And any of the methods described in the corresponding description.
[0104] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this application.
[0105] Furthermore, various aspects or features of the embodiments of this application can be implemented as methods, apparatus, or articles of manufacture using standard programming and / or engineering techniques. The term "article of manufacture" as used in this application encompasses a computer program accessible from any computer-readable device, carrier, or medium. For example, computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes), optical discs (e.g., compact discs (CDs), digital versatile discs (DVDs), etc.), smart cards, and flash memory devices (e.g., erasable programmable read-only memory (EPROMs), cards, sticks, or key drives, etc.). Additionally, the various storage media described herein may represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.
[0106] In the above embodiments, Figure 4The write cache exception handling device 400 can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).
[0107] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of this application.
[0108] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0109] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0110] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0111] If the aforementioned function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application embodiment, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or an access network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0112] The above description is merely a specific implementation of the embodiments of this application, but the protection scope of the embodiments of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the embodiments of this application should be covered within the protection scope of the embodiments of this application.
Claims
1. A RAID controller card, characterized in that, include: Logic controller and RAID controller, The logic controller is configured to receive a reset signal, generate a power loss signal based on the reset signal, send the power loss signal to the RAID controller, and send the reset signal to the RAID controller based on the power loss signal, wherein the reset signal is used to instruct the RAID controller to perform a reset. The RAID controller is used to shut down the core of the high-speed serial computer expansion bus standard PCIe according to the reset signal, and to perform a cache unloading COL operation according to the power loss signal. The PCIe core is used to control the PCIe bus to receive data. The COL operation refers to the process of writing cached data in the cache memory to non-volatile memory after the RAID controller card loses power. The RAID controller is also configured to send a lock command to the logic controller after receiving the power loss signal, the lock command being used to instruct the logic controller to lock the function of sending the power loss signal; The RAID controller is further configured to send an unlock command to the logic controller after completing the COL operation. The unlock command is used to instruct the logic controller to unlock the function of sending the power loss signal.
2. The RAID controller card according to claim 1, characterized in that, The logic controller includes a power-down processing unit and a reset processing unit. The power failure processing unit is used to generate a trigger signal based on the power loss signal and send the trigger signal to the reset processing unit. The reset processing unit is used to forward the reset signal to the RAID controller according to the trigger signal.
3. The RAID controller card according to claim 1, characterized in that, The RAID controller is also configured to send a COL completion signal to the logic controller after completing the COL operation; The logic controller is further configured to send the reset signal to the RAID controller after receiving the COL completion signal, the reset signal being used to instruct the RAID controller to perform a reset.
4. The RAID controller card according to any one of claims 1-3, characterized in that, The RAID controller is also used to periodically send heartbeat signals to the logic controller; The logic controller is also configured to unlock the function of sending the power loss signal after receiving the heartbeat signal.
5. The RAID controller card according to claim 4, characterized in that, The logic controller is also configured to lock the function of sending the power loss signal if the heartbeat signal is not received within a set time period.
6. The RAID controller card according to claim 4, characterized in that, Upon receiving the power loss signal, the RAID controller stops sending the heartbeat signal to the logic controller.
7. The RAID controller card according to any one of claims 1-3, characterized in that, The logic controller is also configured to receive a power supply signal, generate a power loss signal based on the power supply signal, and send the power loss signal to the RAID controller. The power supply signal is used to indicate that the electrical signal received by the RAID controller is abnormal.
8. A computing device, characterized in that, include: At least one processor, At least one memory, The RAID controller card according to any one of claims 1-7, wherein the RAID controller card is used to transmit data sent by the at least one processor to the at least one memory.
Citation Information
Patent Citations
Data protection device and data protection method for RAID (Redundant Array of Inexpensive Disks) card
CN104657290A
Interleaved host reset and subsequent reinitialization operations
CN113196224A
