Storage main control chip for multiple storage units and storage control method
By building a RAID processing module into the storage main control chip and directly constructing RAID in the chip, the performance and cost issues in existing RAID implementation methods are solved, and a high-performance, low-power and flexible storage solution is achieved.
Patent Information
- Application Number
- CN202311634035.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-01
- Publication Date
- 2024-09-10
AI Technical Summary
Existing RAID implementation methods have problems such as software RAID occupying system resources, resulting in reduced performance and high hardware RAID costs. There is a lack of low-cost solutions that do not affect system performance.
The RAID processing module is built into the storage main control chip and the RAID control module is integrated to perform RAID construction directly in the chip to avoid CPU operation instructions and realize the built-in RAID function of the storage product.
It improves data security and integrity, reduces system performance impact and hardware costs, reduces CPU overhead and power consumption, and improves the performance and flexibility of storage products.
Smart Images

Figure CN118626002A
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage technology, and in particular to a storage master control chip and a storage control method for multiple storage units. Background Art
[0002] The storage control chip is one of the most important components in storage products. As the "central brain" of storage products, it is responsible for the reasonable allocation of data load on each storage unit on the one hand, and undertakes the entire data transfer, connecting the storage unit and the host end on the other hand. The control chip can also implement a series of functional algorithms such as ECC error correction, wear leveling, bad block management, read and write cache, garbage collection, data encryption, etc.
[0003] RAID is the abbreviation of Redundant Array of Independent Disks, which means Redundant Array of Independent Disks, or disk array for short. Its main function is to form an array of multiple independent disks (hard disks) and provide redundancy to improve data reliability. After different versions of iteration, the current RAID versions include RAID 0, RAID 1, RAID 5, RAID 6, RAID 10, etc.
[0004] There are two main ways to implement existing RAID:
[0005] Software RAID: RAID functions are implemented through the operating system or RAID software. For example, in the Linux operating system, 3 hard disks can be used to form RAID 5.
[0006] Hardware RAID: RAID functions are implemented entirely through hardware. For example, multiple hard disks are connected through independent RAID hardware cards, and then all hard disks are configured into a new virtual disk volume (with RAID function).
[0007] Disadvantages of existing implementations:
[0008] Software RAID: There is no independent hardware and interface, and it needs to occupy certain system resources (CPU, hard disk interface speed), which will reduce system performance, and RAID itself will also be affected by the stability of the operating system;
[0009] Hardware RAID: requires additional controller hardware (such as a RAID card) and multiple disk arrays to form a RAID disk, which is very costly.
[0010] Therefore, existing storage technologies require a technical solution that can implement RAID at a low cost without affecting system performance. Summary of the invention
[0011] The purpose of this application is to provide a storage master chip and storage control method for multiple storage units. A RAID processing module is built into the storage master chip, which can avoid the shortcomings of software RAID having a large impact on system performance and hardware RAID requiring multiple hardware component costs, while improving the data security and integrity of a single storage product.
[0012] To achieve the above-mentioned purpose, the embodiment of the present application adopts the following technical scheme: a storage master control chip for multiple storage units, comprising: a host-side interface, the host-side interface is an interface for the storage product to communicate with the CPU system, and the host-side interface is used to send addresses, instructions and data packets to the storage product; a data processing module, the data processing module is connected to the host-side interface, processes the addresses and instructions sent by the host-side interface, receives and processes the data packets from the host-side interface; a timing control module, the timing control module is connected to the data processing module, receives the address data, instruction data and data packets from the data processing module data packet; a RAID control module, the RAID control module is connected to the timing control module, receives address data, instruction data and data packets from the timing control module, and distributes the data to different storage units in the storage product or copies the data to different storage units in the storage product according to the RAID control command and the address; a device-side interface, the device-side interface is connected to the RAID control module, the device-side interface is an interface for data exchange between the storage master chip and the storage unit, the output of the device-side interface is the input of the storage unit, and the output of the storage unit is the input of the device-side interface.
[0013] In the above technical solution, the embodiment of the present application realizes the function of RAID building for the internal storage unit (LUN) by integrating the RAID control module in the storage main control chip, and finally realizes the storage product with built-in RAID function. The storage main control chip has a built-in RAID processing module, which is specifically used to process the RAID building instructions, eliminating the CPU's operating instructions for RAID building. Therefore, it avoids the shortcomings of software RAID having a large impact on system performance and hardware RAID implementation requiring the cost of multiple hardware components, while improving the data security and integrity of a single storage product.
[0014] Further, according to an embodiment of the present application, the data processing module includes an address module, and the address module is used to perform address processing on the address data sent by the host-side interface.
[0015] Further, according to an embodiment of the present application, the data processing module includes a command module, and the command module is used to perform command parsing processing on the instruction data sent by the host-side interface.
[0016] Further, according to an embodiment of the present application, the data processing module includes: a data module, which receives data packets from a host-side interface; an ECC check module, which is connected to the data module and verifies the data packets from the data module; and a cache module, which is connected to the ECC check module and receives and caches data packets from the ECC check module.
[0017] Further, according to an embodiment of the present application, the device-side interface is connected to the timing control module, and the data from the storage unit is sent to the timing control module, and then sent to the host-side interface after being processed by the data processing module.
[0018] Further, according to an embodiment of the present application, the timing control module performs timing processing on the address data, instruction data, data packets from the data processing module and the data from the storage unit according to the data format required by the storage device protocol and the host-side protocol, so that the device-side interface and the host-side interface can correctly identify the incoming and outgoing data from each other.
[0019] Further, according to an embodiment of the present application, the RAID version in the RAID control module is one or more of RAID 0, RAID 1, RAID 5, RAID 6, and RAID 10.
[0020] In order to achieve the above object, the embodiment of the present application further discloses a storage control method for multiple storage units, comprising the following steps:
[0021] Receiving first data from a host-side interface;
[0022] determining a type of the first data;
[0023] If the first data is data to be written, verify the data and generate a corresponding verification code, append the verification code to the source data block and cache it as second data, and perform time sequence processing on the second data;
[0024] A RAID control command and an address are generated, and the second data after the timing processing is stored in different storage units in the storage product according to the RAID control command and the address.
[0025] Further, according to an embodiment of the present application, if the first data is address data or instruction data, timing processing is performed on the first data.
[0026] In order to achieve the above-mentioned purpose, an embodiment of the present application further discloses a storage product having a storage master control chip with multiple storage units as described above.
[0027] Compared with the prior art, this application has the following beneficial effects:
[0028] 1. High performance: The RAID control logic is integrated into the storage main control chip, and data RAID is implemented through multiple storage units of a single storage device. While ensuring data integrity and security, it also eliminates the cumbersome process and high cost of building RAID with multiple physical hard disks.
[0029] 2. High integration: A separate, dedicated RAID control module is integrated inside the main control chip to process the complex algorithm for building RAID, reducing the internal overhead of the storage main control chip and improving the performance of storage products.
[0030] 3. Low power consumption: When using a storage product equipped with a master chip constructed by the method of the present invention, the CPU does not need to consider the formation of RAID, thereby reducing CPU overhead and the power consumption of the entire system. At the same time, the master chip is internally set with relevant sleep (Sleep-State) and inactive (Inactive-State) state machines, which greatly reduces the power consumption of the master chip itself.
[0031] 4. Flexibility: The RAID control module has independent algorithms, which enables the storage master chip to configure storage units according to different usage scenarios and switch RAID versions freely.
[0032] 5. Compatibility: The timing control module can match different storage product protocols (Specifications), and the main control chip can adjust different timings to match them according to the protocol requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The present application is further described below in conjunction with the accompanying drawings and embodiments.
[0034] Figure 1 It is a structural schematic diagram of a storage master control chip for multiple storage units in the present application.
[0035] Figure 2 It is a flow chart of a storage control method for multiple storage units in the present application.
[0036] Figure 3 It is a schematic diagram of the state machine transfer of the storage master chip used for multiple storage units in this application.
[0037] Figure 4 It is a structural diagram of embodiment 1 of the present application.
[0038] Figure 5 It is a schematic diagram of the workflow of operating the storage unit to implement RAID 10 in the first embodiment. DETAILED DESCRIPTION
[0039] In order to make the purpose and technical solution of the present invention clearly and completely described, and the advantages more clearly understood, the embodiments of the present invention are further described in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are part of the embodiments of the present invention, rather than all of the embodiments, and are only used to explain the embodiments of the present invention, and are not used to limit the embodiments of the present invention. All other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] In the description of the present invention, it should be noted that the terms "center", "middle", "upper", "lower", "left", "right", "inner", "outer", "top", "bottom", "side", "vertical", "horizontal" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "one", "first", "second", "third", "fourth", "fifth", "sixth" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0041] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0042] For the purpose of simplicity and illustration, the principles of the embodiments are mainly described by reference to examples. In the following description, many specific details are proposed to provide a thorough understanding of the embodiments. However, it is obvious that for those of ordinary skill in the art, these embodiments may not be limited to these specific details in practice. In some instances, known methods and structures are not described in detail to avoid making these embodiments unnecessarily difficult to understand. In addition, all embodiments can be used in combination with each other.
[0043] like Figure 1 As shown, the present application discloses a storage master chip for multiple storage units, which is installed on a storage product, and the storage product includes multiple storage units (LUN, Logic Unit). The storage master chip includes a host-side interface, a data processing module, a timing control module, a RAID control module, and a device-side interface. Among them, the host-side interface is an interface for the storage product to communicate with the CPU system, and is used to send addresses, instructions and data packets to the storage product. The data processing module is connected to the host-side interface, processes the addresses and instructions sent by the host-side interface, receives and processes data packets from the host-side interface. The timing control module is connected to the data processing module, receives address data, instruction data and data packets from the data processing module. The RAID control module is connected to the timing control module, receives address data, instruction data and data packets from the timing control module, and distributes data to different storage units in the storage product or copies data to different storage units in the storage product according to the RAID control command and address. The device-side interface is connected to the RAID control module. The device-side interface is an interface for data exchange between the storage master chip and the storage unit. The output of the device-side interface is the input of the storage unit, and the output of the storage unit is the input of the device-side interface.
[0044] In this regard, the present application integrates a RAID control module in the storage master chip to realize the function of RAID building for the internal storage unit (LUN), and finally realizes the storage product with built-in RAID function. The storage master chip has a built-in RAID processing module, which is specifically used to process RAID building instructions, eliminating the CPU's operating instructions for RAID building. Therefore, it avoids the shortcomings of software RAID having a large impact on system performance and hardware RAID implementation requiring the cost of multiple hardware components, while improving the data security and integrity of a single storage product.
[0045] Furthermore, the data processing module includes an address module, a command module and a data module, an ECC check module, and a cache module. Among them, the address module is connected to the host-side interface and is used to perform address processing on the address data sent by the host-side interface. The command module is connected to the host-side interface and is used to perform command parsing processing on the instruction data sent by the host-side interface. The data module is connected to the host-side interface and receives data packets from the host-side interface. The ECC check module is connected to the data module and checks the data packets from the data module. The cache module is connected to the ECC check module and receives data packets from the ECC check module and caches them.
[0046] In addition, the device-side interface is connected to the timing control module, and the data from the storage unit is sent to the timing control module, which is then processed by the data processing module and sent to the host-side interface. The timing control module performs timing processing on the received data. Specifically, the timing control module performs timing processing on the address data, instruction data, data packets from the data processing module and the data from the storage unit according to the data format required by the storage device protocol and the host-side protocol, so that the device-side interface and the host-side interface can correctly identify the incoming and outgoing data. The data from the storage unit that has undergone timing processing is transmitted to the data processing module, passes through the cache module, the ECC check module and the data module in turn, and is finally output through the host-side interface.
[0047] In addition, the RAID version in the RAID control module is one or more of RAID 0, RAID 1, RAID 5, RAID 6, and RAID 10. The present application uses an independent algorithm of the RAID control module to enable the storage main control chip to configure the storage unit according to different usage scenarios and freely switch the RAID version.
[0048] like Figure 2 As shown, the present application also discloses a storage control method for multiple storage units, comprising the following steps:
[0049] Receiving first data from a host-side interface;
[0050] determining a type of the first data;
[0051] If the first data is data to be written, verify the data and generate a corresponding verification code, append the verification code to the source data block and cache it as second data, and perform time sequence processing on the second data;
[0052] A RAID control command and an address are generated, and the second data after the timing processing is stored in different storage units in the storage product according to the RAID control command and the address.
[0053] Based on this, the storage master control chip executes the storage control method, which specifically includes the following steps:
[0054] 1. First, when the storage control chip receives data from the host interface, the storage control chip will first determine the type of data so that it can be delivered to the corresponding module for processing.
[0055] 2. When the data transmitted by the host interface is address data or command data, the storage main control chip will directly hand over the data to the timing control module for processing, and the timing control module will perform timing processing on the incoming data according to the storage device protocol.
[0056] 3. When the data transmitted by the host interface is data to be written, these incoming data blocks will first enter the ECC check module. After the ECC check module generates the corresponding check code, the check code is attached to the source data block and stored in the cache module.
[0057] 4. After all data blocks are cached in the cache module, the data in the cache module will be transmitted to the timing control module according to the data request of the RAID control module, and the timing control module will perform timing processing on the incoming data according to the storage device protocol.
[0058] 5. Finally, the RAID control module takes out the data from the cache module after being processed by the timing processing module according to the received RAID control command and address, and stores the data into the storage unit (LUN) according to the requirements of different RAID versions.
[0059] like Figure 3 As shown, the present application sets relevant sleep (Sleep-State) and inactive (Inactive-State) state machines inside the storage master chip to reduce the power consumption of the storage master chip itself. Specifically, the state machine transfer of the storage master chip includes:
[0060] 1. After the storage master chip is powered on (Power-On) the storage master chip will start the state initialization (Reset) program internally, and then the master chip will enter the input waiting (Idle-State) state.
[0061] 2. When the storage master chip in the input waiting (Idle-State) state receives data input from the host interface or feedback from the device interface, it will enter the data identification (Identification) state. The data types are divided into three types: command (Command), address (Address) and data (Data).
[0062] 3. After entering the data identification state, there will be a judgment process:
[0063] 3.1. If the data is normal (no error occurs, no transmission pause command, etc.), the storage main control chip will enter the data transmission (Transfer-State) state and perform normal data transmission (input or output);
[0064] 3.2. If the data is abnormal (including data loss, instruction error, invalid address, etc.), the storage main control chip will enter the inactive state;
[0065] 3.3. If the storage master chip receives a pause command at this moment, it will enter the sleep state and wait for wake-up and retransmission (return to the transfer state) or give up the current transmission and enter the input waiting state.
[0066] 4. When the storage control chip is in the data transmission (Transfer-State) state, the normal data transmission categories include the data receiving (Receive-Data) state and the data sending (Sending-Data) state. The former is used for the host interface to write data to the storage unit, and the latter is used for the data output from the storage unit to the host interface. When the data transmission is completed, it will enter the transmission waiting (Idele-State) state. If there is no subsequent data transmission, the data transmission process ends (End).
[0067] 5. After the storage main control chip is in the inactive state, it will re-enter the input waiting state after being reset.
[0068] 6. After the storage master chip is in the sleep state, it can be reactivated and data can be transmitted or the data transmission can be abandoned and returned to the input waiting state.
[0069] In summary, compared with the prior art, the storage master control chip and control method for multiple storage units described in this application have the following beneficial effects:
[0070] 1. High performance: The RAID control logic is integrated into the storage main control chip, and data RAID is implemented through multiple storage units of a single storage device. While ensuring data integrity and security, it also eliminates the cumbersome process and high cost of building RAID with multiple physical hard disks.
[0071] 2. High integration: A separate, dedicated RAID control module is integrated inside the storage master chip to process the complex algorithm for building RAID, reducing the internal overhead of the storage master chip and improving the performance of storage products.
[0072] 3. Low power consumption: When using a storage product equipped with a master chip constructed by the method of the present invention, the CPU does not need to consider the formation of RAID, thereby reducing CPU overhead and the power consumption of the entire system. At the same time, the master chip is internally set with relevant sleep (Sleep-State) and inactive (Inactive-State) state machines, which greatly reduces the power consumption of the master chip itself.
[0073] 4. Flexibility: The RAID control module has independent algorithms, which enables the storage master chip to configure storage units according to different usage scenarios and switch RAID versions freely.
[0074] 5. Compatibility: The timing control module can match different storage product protocols (Specifications), and the main control chip can adjust different timings to match them according to the protocol requirements.
[0075] Below through Figure 4-5 A specific embodiment is listed to further illustrate the technical solution of the present application, but the present application is not limited to this embodiment.
[0076] [Example]
[0077] This embodiment uses the storage master chip described in this application to operate four storage units (LUN 0, LUN 1, LUN 2, LUN 3) to form RAID 10:
[0078] RAID 0 means combining two or more physical hard disks into one, with data being distributed on each hard disk. Since the bandwidth is doubled, the theoretical speed of RAID 0 should be N times that of a single hard disk. However, since the data is not stored on only one hard disk, but divided into data blocks and then stored on different hard disks, the security is also reduced by N times. If any hard disk is damaged, all data will be lost.
[0079] RAID 1 refers to storing data in two or more hard disks in a mirrored manner. The data in these hard disks are backed up for each other. When a physical hard disk fails, the system can automatically switch to the mirrored hard disk for reading and writing, thereby improving data security and availability. However, since the data needs to be written multiple times in a mirrored manner, the performance (speed) will decrease when writing.
[0080] RAID 10 is a RAID version that complements the advantages and disadvantages of RAID 0 and RAID 1. It requires at least four hard disks to build. First, data is written to two (or more) hard disks through RAID 0, and then each hard disk of RAID 0 is mirrored using RAID 1, thereby achieving the purpose of making data reading, writing and storage both fast and safe.
[0081] Based on this, the storage device with built-in RAID function is composed of a storage main control chip using the method of the present invention and four internal storage units connected to each other through an interface.
[0082] The main control chip includes a host-side interface, an address module, a command module, a data module, an ECC check module, a cache module, a timing control module, a RAID control module and a device-side interface. The RAID control module is used to control and manage the storage unit to implement the RAID function, and other modules are used to process address, data, command, timing and other information.
[0083] The storage unit consists of four LUNs in total. LUN 0 and LUN 1, LUN 2 and LUN 3 form two RAID 1 structures respectively, and these two RAID 1 structures together form RAID 0.
[0084] The workflow of the storage master chip operating the storage unit to implement RAID 10 includes:
[0085] 1. When the storage control chip receives a command from the host interface requesting to store data in RAID 10 mode, it will internally process the data packet (A) into data packets (A1, A2) that conform to the RAID 10 mode, and then write them to the storage unit through the interface;
[0086] 2. Then, the processed data (A) is written to LUN 0 (A1) and LUN 2 (A2) through the interface to form RAID 0;
[0087] 3. Then, the data A1 in LUN 0 is mirrored to LUN 1, and the data in LUN 2 is mirrored to LUN 3, forming RAID 1;
[0088] 4. Finally, two groups of RAID 1 form RAID 0, completing the purpose of using the master control chip of the storage master control chip architecture and method to form RAID 10 inside the storage unit.
[0089] The above describes the illustrative specific implementation methods of the present application so that technicians in this technical field can understand the present application, but the present application is not limited to the scope of the specific implementation methods. For technicians in this technical field, as long as the changes are still within the spirit and scope of the present application defined and determined by the attached claims, all application creations based on the concept of the present application are protected.
Claims
1. A storage master control chip for multiple storage units, characterized in that: include: A host-side interface, which is an interface for the storage product to communicate with the CPU system, and is used to send address data, instruction data and data packets to the storage product; A data processing module, the data processing module is connected to the host-side interface, processes the address data and instruction data sent by the host-side interface, receives and processes data packets from the host-side interface; A timing control module, the timing control module is connected to the data processing module and receives address data, instruction data and data packets from the data processing module; A RAID control module, the RAID control module is connected to the timing control module, receives address data, instruction data and data packets from the timing control module, and distributes data to different storage units in the storage product or copies data to different storage units in the storage product according to the RAID control command and address; A device-side interface, wherein the device-side interface is connected to the RAID control module, and is an interface for data exchange between the storage master chip and the storage unit. The output of the device-side interface is the input of the storage unit, and the output of the storage unit is the input of the device-side interface.
2. A storage master control chip for multiple storage units according to claim 1, characterized in that: The data processing module includes an address module, and the address module is used to perform address processing on the address data sent by the host-side interface.
3. A storage control chip for multiple storage units according to claim 1, characterized in that: The data processing module includes a command module, and the command module is used to perform command parsing processing on the instruction data sent by the host end interface.
4. A storage master control chip for multiple storage units according to claim 1, characterized in that: The data processing module comprises: A data module, wherein the data module receives data packets from a host-side interface; An ECC check module, the ECC check module is connected to the data module, and the ECC check module checks the data packet from the data module; A cache module, wherein the cache module is connected to the ECC check module, and the cache module receives data packets from the ECC check module and caches them.
5. The storage master control chip for multiple storage units according to claim 1, characterized in that: The device-side interface is connected to the timing control module, and sends the data from the storage unit to the timing control module, which is then processed by the data processing module and sent to the host-side interface.
6. A storage master control chip for multiple storage units according to claim 5, characterized in that: The timing control module performs timing processing on the address data, instruction data, data packets from the data processing module and the data from the storage unit according to the data format required by the storage device protocol and the host-side protocol, so that the device-side interface and the host-side interface can correctly identify the incoming and outgoing data from each other.
7. A storage master control chip for multiple storage units according to claim 1, characterized in that: The RAID version in the RAID control module is one or more of RAID 0, RAID 1, RAID 5, RAID 6, and RAID 10.
8. A storage control method for multiple storage units, characterized in that: The following steps are involved: Receiving first data from a host-side interface; determining a type of the first data; If the first data is data to be written, verify the data and generate a corresponding verification code, append the verification code to the source data block and cache it as second data, and perform time sequence processing on the second data; A RAID control command and an address are generated, and the second data after the timing processing is stored in different storage units in the storage product according to the RAID control command and the address.
9. A storage control method for multiple storage units according to claim 8, characterized in that: If the first data is address data or instruction data, timing processing is performed on the first data.
10. A storage product, characterized in that: It comprises a storage master control chip for multiple storage units as described in any one of claims 1 to 7.
