A data processing method and system
By offloading data read/write tasks to the target hard drive and distributing them to multiple hard drives for processing, the problem of excessive resource consumption when the server handles a large number of hard drive read/write tasks is solved, thus improving execution efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHENGDU HUAWEI TECH CO LTD
- Filing Date
- 2024-11-29
- Publication Date
- 2026-06-05
Smart Images

Figure CN122152192A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage technology, and in particular to a data processing method and system. Background Technology
[0002] When a read / write task involves a large number of hard drives on a server, the server's processor needs to use significant resources (such as computing power and cache) to execute the task. For example, when handling read / write tasks involving numerous hard drives, the processor needs to read a large amount of data into its cache, thus consuming a significant portion of the processor's cache. Furthermore, the more hard drives involved in the read / write task, the more resources the processor uses, and the longer the execution time of the task.
[0003] Even if the server is equipped with a redundant array of independent disks (RAID) card, the RAID card still has the same problems when handling read and write tasks involving a large number of hard drives. Summary of the Invention
[0004] To address the aforementioned technical problems, this application provides a data processing method and system. On the one hand, it can offload data read / write tasks from the host to the hard disk, thereby reducing the host's workload and freeing up host resources. On the other hand, it can also distribute a data read / write task to multiple hard disks for processing, thereby improving the execution efficiency of data read / write tasks.
[0005] Firstly, a data processing system is provided, including a host and multiple hard disks. The multiple hard disks provide multiple physical blocks, which constitute a first storage space. The multiple hard disks include a target hard disk and a first hard disk, the target hard disk being different from the first hard disk. The target hard disk is used to receive target input / output (I / O) instructions from the host. The target I / O instructions include multiple target addresses. The target addresses indicate one or more physical blocks of the first storage space. The target I / O instructions instruct processing of the storage space indicated by the multiple target addresses. The target hard disk is also used to instruct the first hard disk to process a portion of the storage space indicated by the target addresses according to the target I / O instructions.
[0006] In the above scheme, within the data processing system, the host offloads data read / write tasks to the target hard drive via I / O instructions. The completion of the target I / O instruction by the target hard drive is considered the completion of the data read / write task. Therefore, this technical solution offloads the data read / write tasks that would otherwise be executed by the host to the target hard drive, utilizing the target hard drive's resources (such as processing and storage resources) to perform the data read / write tasks. This reduces the host's workload and frees up its resources. Furthermore, the target hard drive instructs the first hard drive to process the storage space indicated by a portion of multiple target addresses. This is equivalent to the target hard drive offloading a portion of the entire data read / write task to the first hard drive, utilizing multiple hard drives to execute different parts of the entire data read / write task in parallel, thereby improving the overall execution efficiency of the data read / write task.
[0007] Optionally, the aforementioned multiple target addresses include some / all of the physical block addresses provided by the target hard disk in the first storage space.
[0008] In some possible implementations, the target hard disk is specifically used to send a first I / O instruction to the first hard disk. The first I / O instruction is generated based on the target I / O instruction and carries a portion of multiple target addresses. The first I / O instruction is used to instruct the storage space indicated by the target address carried by the first I / O instruction to be processed.
[0009] This technical solution provides a method for a target hard disk to instruct a first hard disk to complete a portion of a data read / write task. Specifically, the target hard disk sends a portion of the task to the first hard disk in the form of I / O instructions (specifically, the first I / O instruction). The way the first hard disk completes the portion of the data read / write task is by completing the first I / O instruction. It can be understood that when the workload of the entire data read / write task is large, the target hard disk can split the entire data read / write task into multiple independent parts. By sending the first I / O instruction to multiple first hard disks respectively, the multiple first hard disks can execute different parts of the entire data read / write task in parallel, thereby improving the execution efficiency of the entire data read / write task.
[0010] Optionally, the target hard disk can further divide the read / write task involved in the target I / O instruction into M subtasks and instruct the M hard disks to process the M subtasks respectively, thereby further improving the speed at which the target I / O instruction is processed. The M subtasks are distinct, and there is a one-to-one correspondence between the M hard disks and the M subtasks. For example, the first hard disk among the M hard disks corresponds to the first subtask among the M subtasks, where M is an integer greater than or equal to 2.
[0011] In some possible implementations, the first storage space is used to determine multiple stripes, multiple target addresses indicating physical blocks belonging to multiple target stripes, multiple target stripes belonging to multiple stripes, and multiple target stripes including one or more first stripes, the first stripe being the stripe to which the physical block indicated by the target address carried by the first IO instruction belongs.
[0012] In the above scheme, after striping the data stored in the first storage space, since multiple stripes are independent of each other and data belonging to different stripes are also independent of each other, the target address carried by the first IO instruction is determined by stripe. This makes it easier to split the entire data read and write task into multiple independent parts, thereby realizing the allocation and data management of multiple parts, so that multiple parts can be executed in parallel by multiple hard drives, improving the execution efficiency of the entire data read and write task.
[0013] Optionally, when multiple target bands include multiple first bands, the multiple first bands can be continuous bands or discontinuous bands, and this application does not limit this.
[0014] Optionally, the physical blocks provided by the target hard disk belong to the first target stripe among multiple target stripes.
[0015] In some possible implementations, the target hard disk is also used to determine the first hard disk based on the first stripe, and / or the number of I / O instructions to be processed by multiple hard disks.
[0016] This technical solution provides several implementation methods for determining the first hard drive from the target hard drive. Method 1: The target hard drive can be determined based on the first stripe. For example, the target hard drive can be determined based on the number of first stripes, or based on the physical block where the parity block of the first stripe is located. The first stripe can be any stripe from multiple target stripes, and it can also be a stripe with specified characteristics. For example, the first stripe is a stripe whose physical block containing the parity block belongs to a specified hard drive (e.g., the first hard drive). Another example is that the first stripe is the first N stripes from multiple target stripes, where N is an integer greater than or equal to 1. Method 2: The target hard drive can be determined based on the number of I / O instructions to be processed from multiple hard drives. For example, the target hard drive can determine the hard drive with the fewest I / O instructions to be processed from multiple hard drives as the first hard drive. Yet another example is that the target hard drive can determine any one of the hard drives with fewer than L I / O instructions to be processed from multiple hard drives as the first hard drive, where L is an integer greater than or equal to 1. Method 3: The target hard drive can also be determined by combining the first stripe and the number of I / O instructions to be processed across multiple hard drives. For example, the target hard drive can be determined based on the physical block where the first stripe's checksum block is located and the number of I / O instructions to be processed across multiple hard drives. In summary, the above solutions provide multiple ways to determine the first hard drive, adapting to the needs of determining the first hard drive in various scenarios, enabling the determined first hard drive to efficiently complete the read and write tasks involved in the first I / O instruction.
[0017] Optionally, the target hard drive can also be determined as the first hard drive based on the hard drive's processing power, estimated processing time, etc.
[0018] In some possible implementations, the first hard drive is the hard drive that provides the parity block in the first stripe.
[0019] This method of determining the first hard drive is simple, fast, and easy to implement.
[0020] In some possible implementations, the first hard drive is the one with the fewest I / O instructions to be processed among the multiple hard drives.
[0021] This method of determining the first hard drive ensures that the data read and write tasks are performed quickly and efficiently by selecting the hard drive with the least load, and also helps to balance the load among multiple hard drives.
[0022] In some possible implementations, the target hard disk is also used to process the storage space indicated by another portion of the target addresses according to target I / O instructions.
[0023] In the above solution, the target hard drive itself also handles some data read / write tasks. Therefore, this technical solution utilizes not only the resources of the first hard drive but also the resources of the target hard drive itself, allowing different parts of the entire data read / write task to be processed simultaneously by both the first and target hard drives, thereby improving the overall execution efficiency of the data read / write task. Furthermore, by having the target hard drive directly handle part of the data read / write task, the target hard drive avoids sending first I / O instructions to the first hard drive and receiving the execution results of those instructions. In other words, the completion time of this part of the data read / write task does not include the communication time between the target and first hard drives, thus further improving the execution efficiency of this part of the data read / write task.
[0024] Optionally, the target hard disk processes the storage space indicated by another part of the multiple target addresses according to the target I / O instructions. This can be done by the target hard disk processing the storage space indicated by the other part of the target addresses using its own processing capabilities, or by the target hard disk distributing some of the tasks to be processed to other hard disks in the data processing system for processing. For specific implementation details, please refer to the above introduction about the first hard disk.
[0025] In some possible implementations, the first hard disk is also used to return a response message of the first I / O instruction to the target hard disk. This response message describes the processing status of the first hard disk in handling the read / write task, which is the read / write task indicated by the first I / O instruction.
[0026] The above scheme provides a method for the first hard disk to return a response message for the first I / O instruction. Specifically, by sending a response message for the first I / O instruction to the target hard disk, the first hard disk enables the target hard disk to obtain the processing status of the first I / O instruction, thus facilitating the target hard disk to grasp the overall processing status of the data read / write task.
[0027] Optionally, the target hard disk is also used to maintain the context of the first I / O instruction. This method can offload the maintenance task of maintaining the first I / O instruction context from the host to the target hard disk, thereby reducing the workload of the host and freeing up the host's resources, such as releasing the bandwidth resources occupied by maintaining the first I / O instruction context.
[0028] Secondly, a data processing method is provided, applied to a data processing system as described in any of the first aspects. The method includes: a target hard disk in the data processing system receiving a target I / O instruction from a host in the data processing system, and then sending a first I / O instruction to a first hard disk in the data processing system. The target I / O instruction includes multiple target addresses. The target I / O instruction is used to instruct processing of the storage space indicated by the multiple target addresses. The first I / O instruction is generated by the target hard disk based on the target I / O instruction. The first I / O instruction carries a portion of the multiple target addresses. The first I / O instruction is used to instruct processing of the storage space indicated by the target addresses carried by the first I / O instruction.
[0029] In some possible implementations, multiple hard disks in the data processing system are used to provide multiple physical blocks. These multiple physical blocks constitute a first storage space. The first storage space is used to determine multiple stripes. The physical blocks indicated by the aforementioned multiple target addresses belong to multiple target stripes. The multiple target stripes belong to multiple stripes. The multiple target stripes include one or more first stripes. A first stripe is the stripe to which the physical block indicated by the target address carried by the first I / O instruction belongs.
[0030] In some possible implementations, the above method further includes: the target hard disk is determined based on the first stripe, and / or the number of I / O instructions to be processed by multiple hard disks.
[0031] In some possible implementations, the target hard disk is determined based on the first stripe and / or the number of I / O instructions to be processed by multiple hard disks, including: the target hard disk determines the hard disk where the parity block in the first stripe is located as the first hard disk.
[0032] In some possible implementations, the target hard disk is determined based on the first stripe and / or the number of I / O instructions to be processed among multiple hard disks, including: the target hard disk determines the hard disk with the fewest I / O instructions to be processed among multiple hard disks as the first hard disk.
[0033] In some possible implementations, the above method further includes: the target hard disk processing the storage space indicated by another portion of the target addresses according to the target I / O instructions.
[0034] In some possible implementations, the above method further includes: the target hard disk receiving an instruction completion message from the first hard disk; and, based on the instruction completion message, sending a response message for the target I / O instruction to the host.
[0035] Thirdly, a data processing method is provided, applied to a target hard disk. The target hard disk is a hard disk in a data processing system as described in any of the first aspects. The data processing system includes a host. The method includes: the target hard disk receiving a target I / O instruction from the host, and sending a first I / O instruction to a first hard disk in the data processing system. The target I / O instruction includes a plurality of target addresses. The target I / O instruction is used to instruct processing of storage space indicated by the plurality of target addresses. The first I / O instruction is generated by the target hard disk based on the target I / O instruction. The first I / O instruction carries a portion of the target addresses from the plurality of target addresses. The first I / O instruction is used to instruct processing of storage space indicated by the target addresses carried by the first I / O instruction.
[0036] In some possible implementations, the data processing system described above includes multiple hard disks. The multiple hard disks are used to provide multiple physical blocks. The multiple physical blocks constitute a first storage space. The first storage space is used to determine multiple stripes. Multiple target addresses indicate physical blocks belonging to multiple target stripes. The multiple target stripes belong to multiple stripes. The multiple target stripes include one or more first stripes. A first stripe is the stripe to which the physical block indicated by the target address carried by a first I / O instruction belongs. The method further includes: the target hard disks are determined based on the first stripes, and / or, the number of I / O instructions to be processed by the multiple hard disks.
[0037] In some possible implementations, the target hard disk is determined based on the first stripe and / or the number of I / O instructions to be processed by multiple hard disks, including: the target hard disk determines the hard disk where the parity block in the first stripe is located as the first hard disk.
[0038] In some possible implementations, the target hard disk is determined based on the first stripe and / or the number of I / O instructions to be processed among multiple hard disks, including: the target hard disk determines the hard disk with the fewest I / O instructions to be processed among multiple hard disks as the first hard disk.
[0039] In some possible implementations, the above method also includes: the target hard disk processing the storage space indicated by another portion of the target addresses according to the target I / O instructions.
[0040] In some possible implementations, the above method further includes: the target hard disk receiving an instruction completion message from the first hard disk; and, based on the instruction completion message, sending a response message for the target I / O instruction to the host.
[0041] Fourthly, a data processing method is provided, applied to a first hard disk. The first hard disk is a hard disk in a data processing system as described in any of the first aspects. The method includes: the first hard disk receiving a first I / O instruction from a target hard disk in the data processing system. The first I / O instruction is used to instruct processing of a storage space indicated by a target address carried by the first I / O instruction. In response to the first I / O instruction, the first hard disk sends an instruction completion message to the target hard disk.
[0042] Fifthly, a chip is provided, including a controller and a power supply circuit for supplying power to the controller, which is used to perform the method of any of the third aspects, or to perform the method of any of the fourth aspects.
[0043] In a sixth aspect, a storage device is provided, including a controller and a storage medium for storing instructions, the controller for executing the instructions, and when the controller executes the instructions, implementing the method of any of the third aspects, or implementing the method of any of the fourth aspects.
[0044] In a seventh aspect, a computer program product comprising instructions is provided, which, when executed by a storage device, causes the storage device to perform the method of any of the third aspects, or the method of any of the fourth aspects.
[0045] Eighthly, a computer-readable storage medium is provided, including computer program instructions that, when executed by a storage device, perform the method of any of the third aspects or the method of any of the fourth aspects. Attached Figure Description
[0046] Figure 1 This is a structural diagram of a data processing system provided in an embodiment of this application;
[0047] Figure 2 This is a schematic diagram illustrating the result of RAID5-based data storage provided in an embodiment of this application;
[0048] Figure 3 This is a structural diagram of another data processing system provided in an embodiment of this application;
[0049] Figure 4 This is a schematic diagram illustrating another result of RAID5-based data storage provided in an embodiment of this application;
[0050] Figure 5 This is a structural diagram of another data processing system provided in an embodiment of this application;
[0051] Figure 6 This is a schematic diagram illustrating another result of RAID5-based data storage provided in an embodiment of this application;
[0052] Figure 7 This is a flowchart illustrating a data processing method provided in an embodiment of this application;
[0053] Figure 8 This is a schematic diagram of the distribution of LBAs in a data processing system provided in an embodiment of this application;
[0054] Figure 9A This is a schematic diagram illustrating the process of a second hard disk executing a second I / O instruction, as provided in an embodiment of this application.
[0055] Figure 9B This is a schematic diagram illustrating another process by which a second hard disk executes a second I / O instruction, as provided in an embodiment of this application.
[0056] Figure 9C This is a schematic diagram illustrating another process by which a second hard disk executes a second I / O instruction, as provided in an embodiment of this application.
[0057] Figure 9D This is a schematic diagram illustrating another process by which a second hard disk executes a second I / O instruction, as provided in an embodiment of this application.
[0058] Figure 10 This is a schematic diagram of the structure of a storage device provided in an embodiment of this application. Detailed Implementation
[0059] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0060] This application provides three data processing systems. These systems can offload data read / write tasks to the target hard drive within the data processing system. The target hard drive then splits the data read / write tasks, assigning different parts of each task to different hard drives. This reduces the workload of the host computer and frees up host resources. Furthermore, it leverages the abundant resources (including computing power and read / write bandwidth) provided by numerous hard drives to execute different parts of the data read / write tasks in parallel, thereby improving the overall processing efficiency of the data read / write task and ultimately enhancing the processing efficiency of multiple data read / write tasks. The first data processing system can be found in [reference needed]. Figure 1 And an introduction to related content; the second type of data processing system can be found in [reference needed]. Figure 3 And an introduction to related content; the third type of data processing system can be found in [reference needed]. Figure 5 And an introduction to related content.
[0061] (I) The first type of data processing system
[0062] See Figure 1 , Figure 1 This is a structural diagram of a data processing system provided in an embodiment of this application. For example... Figure 1 As shown, the data processing system 10 includes a host 11, a hard disk 12, and a high-speed interconnect bus 13. The host 11 communicates with the hard disk 12, and multiple hard disks 12 communicate with each other via the high-speed interconnect bus 13.
[0063] The data processing system 10 is a computing device, with the host 11, hard disk 12, and high-speed interconnect bus 13 deployed on the same device.
[0064] The host 11 can be, for example, a central processing unit (CPU), a data processing unit (DPU), a graphics processing unit (GPU), a neural network processing unit (NPU), etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits.
[0065] Hard drive 12 can be either a physical hard drive or a virtual hard drive. A physical hard drive refers to an actual hard drive device, such as a hard disk drive (HDD) or a solid-state drive (SSD). A virtual hard drive refers to a hard drive device simulated by software. A virtual hard drive can be created on a physical hard drive or on a network storage device (such as direct-attached storage, network-attached storage, storage area networks, etc.), such as virtual hard drives in virtual machines (e.g., VMDK, VHD, VDI formats), virtual hard drives in cloud storage services, etc.
[0066] Since there are various product types of hard drive 12, for ease of explanation, the following text will use hard drive 12 as a solid-state drive for example.
[0067] When hard drive 12 is an SSD (see...) Figure 1The hard disk 12 (SDK 12) is a storage device built from flash memory chips, including an SSD controller and a storage medium. The SSD controller executes input / output (I / O) instructions. The SSD controller can be a chip, such as a field-programmable gate array (FPGA) or an ASIC. The storage medium consists of several flash memory chips. Each flash memory chip can be divided into several physical chunks of a fixed size. Therefore, each physical chunk has a standard capacity, for example, 2 to the power of N (M), where N is a positive integer. Optionally, the SSD controller and the flash memory chips in the storage medium can be mounted on the same printed circuit board (PCB), presented as a disk or card, and communicate with the host 11 or other hard disks 12 via a high-speed interconnect bus 13 through the input / output (I / O) interface on the PCB. In the case where the hard disk 12 includes an SSD controller and storage media, if the IO instruction received by the hard disk 12 is a read instruction, the SSD controller concurrently reads data from one or more physical blocks of the storage media and then sends the data to the outside of the hard disk 12. If the IO instruction received by the hard disk 12 is a write instruction, the SSD controller concurrently writes data from the outside of the hard disk 12 to one or more physical blocks of the storage media.
[0068] High-speed interconnect bus 13 refers to the communication bus connecting host 11, hard disk 12, and other devices. Host 11, hard disk 12, and other devices connected via high-speed interconnect bus 13 have equal status, thus allowing direct data exchange and communication between these devices. High-speed interconnect bus 13 can be, for example, a unified bus (UB), an NV-LINK bus, a peripheral component interconnect express (PCIe) bus, etc.
[0069] In the data processing system 10, physical blocks in the hard disk 12 can be addressed based on their logical unit numbers (LUNs). The specific implementation mainly includes the following configuration and application phases:
[0070] Configuration Phase: A LUN is created using physical blocks from multiple hard disks 12. The size of the LUN depends on business requirements. After determining the size of the LUN, the physical blocks included in the LUN can be determined. In specific implementations, either all physical blocks from a single hard disk 12 can be used to form the LUN, or only a portion of the physical blocks from a single hard disk 12 can be used to form the LUN; this application does not impose a specific limitation.
[0071] For example, the specific process of using a portion of the physical blocks from all hard disks 12 to form a LUN is as follows: A portion of the physical blocks from all hard disks 12 are mapped into multiple logical blocks; logical block addresses (LBAs) are assigned to all logical blocks; and a mapping relationship is established between LBAs and physical block addresses (PBAs). When the mapping between physical blocks and logical blocks is one-to-one, one PBA corresponds to one LBA; when the mapping is one-to-many, one PBA corresponds to multiple LBAs; and when the mapping is many-to-one, multiple PBAs correspond to one LBA. The mapping relationship between physical blocks and logical blocks is determined by the user.
[0072] Application Phase: LBAs are used to indicate the physical blocks that make up the LUN. Specifically, the PBA corresponding to a given LBA is determined by looking up the correspondence between LBAs and PBAs. For ease of explanation, the following descriptions of LBAs will consistently use the example of a one-to-one correspondence between LBAs and PBAs.
[0073] To provide reliable data services, the data processing system 10 typically employs a redundant array of independent disks (RAID) algorithm to write data to the LUN. Data reliability refers to the stability and reliability of data during storage, transmission, and processing. Data reliability requires that data can be correctly accessed, used, and recovered when needed. RAID is a high-performance, highly reliable storage technology that combines multiple independent hard drives in different ways to create a large-capacity hard drive group. RAID algorithms primarily utilize data striping, mirroring, and data verification technologies to achieve high performance, reliability, fault tolerance, and scalability in data processing. RAID algorithms include RAID5, RAID6, RAID50, and RAID60, among others. Different RAID algorithms differ in disk utilization, reliability, read / write performance, and redundancy calculation requirements.
[0074] Writing data using RAID algorithms primarily refers to encoding the data using RAID to obtain parity data, and then distributing the data and its parity data across multiple hard drives. Writing data to a LUN using RAID algorithms typically operates on a logical block basis, dividing all logical blocks in the LUN into multiple stripes for management. Each stripe includes data blocks and parity blocks. Data blocks are physical blocks used to store data, and parity blocks are physical blocks used to store parity data. The data blocks and parity blocks in each stripe originate from different hard drives. The parity data in a stripe is used to verify the data within that stripe, ensuring the reliability of the data in that stripe. Because different stripes contain different logical blocks, the data in different stripes is independent of each other. Therefore, multiple stripes are independent of each other; specifically, reading or writing data in one stripe does not affect the data in another stripe.
[0075] In summary, implementing striped management in LUNs facilitates parallel data reading and writing and redundancy verification, thereby providing a certain degree of redundancy and fault tolerance. Even if one hard drive fails, the data on that hard drive can still be recovered using data from the other hard drives.
[0076] The following will use RAID5 as an example of the RAID algorithm, combined with... Figure 1 The data processing system 10 describes the process of storing data in a LUN using RAID 5.
[0077] RAID 5 requires a 1:1 ratio of data blocks to parity blocks within a stripe, meaning n data blocks correspond to one parity block. Furthermore, RAID 5 requires that data blocks and parity blocks be distributed across all the hard drives that make up the LUN. This way, if one hard drive fails, causing data blocks stored on that drive to be corrupted, the corrupted data blocks can be recovered using data blocks and parity blocks from the remaining hard drives that belong to the same stripe as the corrupted data blocks.
[0078] because Figure 1 Only four hard disks 12 used for grouping LUNs are shown in the data processing system 10, therefore... Figure 1 In the data processing system 10, when storing data based on RAID5, the ratio of data blocks to parity blocks in each stripe is 3:1.
[0079] See Figure 2 , Figure 2 This is a schematic diagram of a result of storing data based on RAID5 provided in an embodiment of this application. Figure 2The four solid-state drives (SSDs) 11, 12, 13, and 14 shown correspond to different hard drives 12 in the data processing system 10. The process of storing data on SSDs 11, 12, 13, and 14 using RAID 5 is as follows:
[0080] The parity block PA1 is calculated using erasure coding (EC) algorithm with data blocks A11, A12, and A13. Then, data blocks A11, A12, A13 and parity block PA1 are stored in SSD11, SSD12, SSD13 and SSD14 respectively. The stripe S11 is composed of data blocks A11, A12, A13 and parity block PA1.
[0081] The check block PB1 is calculated using the EC encoding algorithm using data blocks B11, B12, and B13. Then, data blocks B11, B12, B13, and PB1 are stored on SSD 11, SSD 12, SSD 14, and SSD 13 respectively. The stripe S12 is composed of data blocks B11, B12, B13, and PB1.
[0082] The check block PC1 is calculated using the EC encoding algorithm using data blocks C11, C12, and C13. Then, data blocks C11, C12, C13, and check block PC1 are stored in SSD 11, SSD 13, SSD 14, and SSD 12 respectively. The stripe S13 is composed of data blocks C11, C12, C13, and check block PC1.
[0083] The check block PD1 is calculated using the EC encoding algorithm using data blocks D11, D12, and D13. Then, data blocks D11, D12, D13, and check block PD1 are stored in SSD 12, SSD 13, SSD 14, and SSD 11, respectively. The stripe S14 is composed of data blocks D11, D12, D13, and check block PD1.
[0084] It should be understood that for other data blocks, a check block is still calculated from three data blocks, and the different check blocks are distributed and stored on different hard disks 12.
[0085] As described above, when using RAID 5 to store data in a LUN, all logical blocks in the LUN are divided into multiple stripes. The data blocks and parity blocks in each stripe come from different hard drives.
[0086] In each stripe, the data blocks and parity blocks come from different hard drives, which can be understood as one or more of the following:
[0087] (1) Each stripe consists of a data block and a parity block, and the data block and the parity block in the stripe are not on the same hard drive;
[0088] (2) Each stripe includes multiple data blocks and a parity block. The parity block in the stripe is not on the same hard drive as any of the data blocks in the stripe.
[0089] (3) Each stripe includes multiple data blocks and a parity block. The parity block in the stripe is not on the same hard drive as any of the data blocks in the stripe, and any two data blocks in the stripe are not on the same hard drive.
[0090] (4) Each stripe includes multiple data blocks and multiple parity blocks. Any parity block in the stripe is not on the same hard drive as any of the data blocks in the stripe.
[0091] (5) Each stripe includes multiple data blocks and multiple parity blocks. Any one of the parity blocks in the stripe is not on the same hard disk as any one of the data blocks in the stripe, and any two of the parity blocks in the stripe are not on the same hard disk.
[0092] (6) Each stripe includes multiple data blocks and multiple parity blocks. Any parity block in the stripe is not on the same hard disk as any data block in the stripe, and any two data blocks in the stripe are not on the same hard disk.
[0093] (7) Each stripe includes multiple data blocks and multiple parity blocks. Any parity block in the stripe is not on the same hard disk as any data block in the stripe, and any two parity blocks in the stripe are not on the same hard disk, and any two data blocks in the stripe are not on the same hard disk.
[0094] As can be seen, when other RAID algorithms are used to store data in a LUN, such as RAID6, RAID50, RAID60, etc., all logical blocks in the LUN will also be divided into multiple stripes, and the data blocks and parity blocks in each stripe come from different hard drives.
[0095] In a scenario where data processing system 10 combines LUN and RAID algorithms to store data, host 11 is used to determine the target hard drive and assign the data read / write tasks to be processed to the target hard drive for execution. These data read / write tasks typically involve multiple data blocks. The following section will combine... Figure 2Further describe the data read / write tasks to be processed. For example... Figure 2 As shown, in one possible application scenario, the data read / write task to be processed involves data blocks in one stripe. For example, the data read / write task to be processed involves data blocks A11 and A12 in stripe S11. In another possible application scenario, the data read / write task to be processed involves data blocks in multiple stripes. For example, the data read / write task to be processed involves data blocks in stripes S11 to S13, including: data blocks A12, A13, B11, B12, B13, and C11.
[0096] Optionally, the target hard drive can be any hard drive in the data processing system 10, combined with Figure 2 To further clarify, the target hard drive can be any one of SSD 11, SSD 12, SSD 13 or SSD 14, for example, the target hard drive is SSD 11.
[0097] Optionally, the target hard drive can also be a hard drive selected by the host 11 based on preset rules. For example, the host 11 may determine the target hard drive based on the number of data read / write tasks to be processed, the type of data read / write tasks to be processed, the storage space indicated by the data read / write tasks to be processed, or the processing performance of the target hard drive. For a detailed explanation of how the host 11 determines the target hard drive, please refer to [link to relevant documentation]. Figure 7 The description.
[0098] After receiving the data read / write task to be processed, the target hard disk further splits the task into multiple data read / write subtasks, specifically M subtasks, where M is an integer greater than 1, such as 2, 3, 4, etc. This application does not limit the number of M. For example, the data read / write task to be processed involves data blocks A12, A13, B11, B12, B13, and C11, with M being 2. The two data read / write subtasks involve 'data blocks A12 and A13' and 'data blocks B11, B12, B13, and C11', respectively. For details on how the target hard disk obtains multiple data read / write subtasks, please refer to the following text. Figure 7 The description.
[0099] The data read / write subtask involves one or more data blocks. When a data read / write subtask involves multiple data blocks, these data blocks may be contiguous or non-contiguous; this application does not impose any restrictions on this. Combined with... Figure 2 To further explain, the data blocks involved in the data read / write subtask may include data block A12 and data block A13 (corresponding to the case of contiguous data), or the data blocks involved in the data read / write subtask may include data block A12 and data block B13 (corresponding to the case of non-contiguous data).
[0100] The target hard drive is also used to determine multiple hard drives, so that these hard drives can handle the aforementioned multiple data read / write subtasks respectively. Each determined hard drive can be used to handle one data read / write subtask or multiple data read / write subtasks; this application does not limit this. For ease of understanding, the following description uses one hard drive handling one data read / write subtask as an example. In this case, the number of data read / write subtasks is equal to the number of selected hard drives, both equal to M. For ease of description, the hard drives used to handle the data read / write subtasks, other than the target hard drive, can be referred to as the first hard drive. Optionally, the target hard drive can also be used to handle data read / write subtasks. For details on how multiple hard drives are determined as the target hard drive, please refer to the following text. Figure 7 The description.
[0101] It should be noted that there is no restriction on the order in which the target hard drive determines multiple data read / write subtasks and multiple hard drives. For example, the target hard drive can determine multiple data read / write subtasks first, and then determine multiple hard drives. Alternatively, multiple hard drives can be determined first, and then multiple data read / write subtasks can be determined. Furthermore, the operations of determining multiple data read / write subtasks and determining multiple hard drives can be performed in parallel.
[0102] In some potential application scenarios, data read / write tasks are generated by the client and sent to host 11. Host 11 then distributes the received data read / write tasks to the target hard drive. After receiving the data read / write task from host 11, the target hard drive performs operations such as splitting, distributing, or processing the task, allowing the first hard drive to assist in executing the data read / write task. When the target hard drive completes the data read / write task, it can also be considered that host 11 has completed the task. This completion includes the target hard drive itself and / or all first hard drives completing the data read / write sub-tasks. As can be seen, when completing data read / write tasks in this way, host 11 does not need to directly read or write the data involved in the task.
[0103] In some possible implementations, the host 11 sends the received data read / write task to the target hard disk by sending target I / O instructions. The target hard disk completing the data read / write task constitutes completing the processing of the target I / O instruction. The target I / O instruction is used to instruct processing of storage spaces indicated by multiple target addresses. A target address (such as a target LBA) can indicate one or more data blocks. For ease of description, the following will exemplify one target address indicating one data block. In a specific implementation, the host 11 directly sends the target I / O instruction to the target hard disk via the high-speed interconnect bus 13. This process can be described in the following... Figure 7The execution process of the host sending the first IO instruction to the first control disk in step S101 of the data processing method.
[0104] Optionally, the target I / O instruction can also be used to instruct the target hard disk to return a response message for the target I / O instruction.
[0105] After receiving the target I / O instruction, the target hard disk sends the data read / write subtask to the first hard disk via the first I / O instruction. The first I / O instruction instructs processing of the storage space indicated by a portion of multiple target addresses. In a specific implementation, the target hard disk directly sends the first I / O instruction to the first hard disk via the high-speed interconnect bus 13. This process can be described in the following... Figure 7 The execution process of the host sending the first IO instruction to the first control disk in step S101 of the data processing method.
[0106] Optionally, the first I / O instruction may also be used to instruct the first hard disk to return a response message for the first I / O instruction.
[0107] In some possible implementations, the first hard disk executes the data read / write operation indicated by the first I / O instruction by sending an I / O instruction (hereinafter referred to as the second I / O instruction) to the hard disk (hereinafter referred to as the second hard disk) where the data to be processed indicated by the first I / O instruction resides. Continuing with... Figure 2 To illustrate, taking SSD 13 as the first hard drive, and assuming the first I / O instruction instructs the first hard drive to perform read / write operations on data blocks B11, B12, and B13, SSD 13, upon receiving the first I / O instruction, generates three second I / O instructions based on the first I / O instruction. These three second I / O instructions are then sent to SSD 11 (containing data block B11), SSD 12 (containing data block B12), and SSD 14 (containing data block B13), respectively, instructing the three SSDs to complete the read / write operations indicated by the second I / O instructions. The process by which the first hard drive generates the second I / O instructions based on the first I / O instruction can be seen below. Figure 7 The execution process.
[0108] The second hard disk is then used to receive and execute the second I / O instructions from the first hard disk. This process can be seen below. Figure 7 The process of the first data disk executing the second IO instruction in step S104 of the data processing method.
[0109] It should be understood that the above-described control flow implementation in the form of instructions during the execution of data read and write tasks is merely an example, and this application does not specifically limit the implementation method of control flow during the execution of data read and write tasks.
[0110] It should be understood that the number of host computers 11 and hard disks 12 in data processing system 10 is based on... Figure 1The data processing system 10 shown is illustrated using one host 11 and four hard disks 12 as an example. In practical applications, the number of host 11 and hard disks 12 in the data processing system 10 can be greater, and this application does not impose a specific limitation. Furthermore, the multiple hard disks 12 in the data processing system 10 can be composed of hard disks of different specifications and types.
[0111] In summary, in the data processing system 10, the host computer assigns data read / write tasks to the target hard drive via I / O instructions. The completion of the target I / O instruction by the target hard drive is considered the completion of the data read / write task. Therefore, this technical solution offloads the data read / write tasks that should have been executed by the host computer to the target hard drive, utilizing the resources of the target hard drive (such as processing resources and storage resources) to execute the data read / write tasks. This reduces the workload of the host computer and frees up its resources. Furthermore, the target hard drive instructs the first hard drive to process the storage space indicated by a portion of the multiple target addresses. This is equivalent to the target hard drive offloading a portion of the entire data read / write task to the first hard drive, utilizing multiple hard drives to execute different parts of the entire data read / write task in parallel, thereby improving the overall execution efficiency of the data read / write task.
[0112] (II) Second type of data processing system
[0113] The second type of data processing system is as described above. Figure 1 Based on the structure of the data processing system 10, multiple data processing systems 10 are used as multiple nodes in the second type of data processing system. For details, please refer to... Figure 3 And an introduction to related content.
[0114] See Figure 3 , Figure 3 This is a structural diagram of another data processing system provided in an embodiment of this application. For example... Figure 3 As shown, the data processing system 20 includes nodes 21 and a high-speed interconnect bus 22. Multiple nodes 21 communicate with each other via the high-speed interconnect bus 22. Each node 21 includes a host 23 and a hard disk 24. Within a node 21, the host 23 and the hard disk 24, as well as multiple hard disks 24, communicate with each other via the high-speed interconnect bus 22.
[0115] If the data processing system 20 can be a cluster of computing devices, then node 21 is a computing device. When node 21 is a computing device, node 21 can be one of the aforementioned... Figure 1 The data processing system 10, the host 23 in node 21 can be the one described above. Figure 1 The host 11 in the data processing system 10 and the hard disk 24 in the node 21 can be the aforementioned Figure 1The hard disk 12 in the data processing system 10. For the sake of brevity, the structure of node 21 will not be described in detail here.
[0116] The high-speed interconnect bus 22 is used to transmit I / O instructions or data between multiple nodes 21. Specifically, the high-speed interconnect bus 22 is used to directly transmit I / O instructions or data between a host 23 in one node 21 and a host 23 in another node 21, to directly transmit I / O instructions or data between a host 23 in one node 21 and a hard disk 24 in another node 21, and to directly transmit I / O instructions or data between hard disks 24 in one node 21 and hard disks 24 in another node 21.
[0117] The high-speed interconnect bus 22 is also used to transfer I / O instructions or data between the host 23 and the hard disk 24 in the same node 21, and to transfer I / O instructions or data between multiple hard disks 24 in the same node 21.
[0118] Among them, the high-speed interconnect bus 22 can be the above-mentioned Figure 1 The high-speed interconnect bus 13 in the data processing system 10.
[0119] In the data processing system 20, physical blocks in all hard disks 24 of the data processing system 20 can be addressed based on LUNs. The specific implementation process can be referred to the process of addressing physical blocks in hard disk 12 based on LUNs in the data processing system 10 described above. For the sake of brevity, it will not be elaborated here.
[0120] In data processing system 20, by using a RAID algorithm to store data in a LUN, data processing system 20 can implement striped management of the data stored on hard disk 12. The following will use RAID5 as an example of the RAID algorithm, combined with... Figure 3 The data processing system 20 describes the process of storing data in a LUN using RAID 5.
[0121] because Figure 3 Only the number of nodes 21 used for group LUNs in data processing system 20 is shown as 2, and the number of hard disks 24 in each node 21 is 4, therefore in Figure 3 In the data processing system 20, when storing data based on RAID5, the ratio of data blocks to parity blocks in each stripe is 7:1.
[0122] See Figure 4 , Figure 4 This is a schematic diagram of another result of storing data based on RAID5 provided in an embodiment of this application. Figure 4The eight solid-state drives (SSDs) 21, 22, 23, 24, 25, 26, 27, and 28 shown correspond to different hard drives 24 in different nodes 21 of the data processing system 20. The process of storing data on SSDs 21, 22, 23, 24, 25, 26, 27, and 28 using RAID 5 is as follows:
[0123] The parity block PA2 is calculated using the EC encoding algorithm using data blocks A21, A22, A23, A24, A25, A26, and A27. Then, data blocks A21, A22, A23, A24, A25, A26, A27, and parity block PA2 are stored in SSDs 21, 22, 23, 24, 25, 26, 27, and 28 respectively. This results in stripe S21 composed of data blocks A21, A22, A23, A24, A25, A26, A27, and parity block PA2.
[0124] The parity block PB2 is calculated using the EC encoding algorithm using data blocks B21, B22, B23, B24, B25, B26, and B27. Then, data blocks B21, B22, B23, B24, B25, B26, B27, and parity block PB2 are stored on SSDs 21, 22, 23, 24, 25, 26, 28, and 27 respectively. This results in stripe S22 composed of data blocks B21, B22, B23, B24, B25, B26, B27, and parity block PB2.
[0125] The parity block PC2 is calculated using the EC encoding algorithm using data blocks C21, C22, C23, C24, C25, C26, and C27. Then, data blocks C21, C22, C23, C24, C25, C26, C27, and parity block PC2 are stored on SSDs 21, 22, 23, 24, 25, 27, 28, and 26 respectively. This results in stripe S23 composed of data blocks C21, C22, C23, C24, C25, C26, C27, and parity block PC2.
[0126] The parity block PD2 is calculated using the EC encoding algorithm using data blocks D21, D22, D23, D24, D25, D26, and D27. Then, data blocks D21, D22, D23, D24, D25, D26, D27, and parity block PD2 are stored on SSDs 21, 22, 23, 24, 26, 27, 28, and 25 respectively. This results in stripe S24 composed of data blocks D21, D22, D23, D24, D25, D26, D27, and parity block PD2.
[0127] It should be understood that for other data blocks, a check block is still calculated from seven data blocks, and the different check blocks are distributed and stored on different hard disks 24.
[0128] From the above, we can see that in a LUN composed of multiple nodes, using RAID 5 to store data, all logical blocks in the LUN are divided into multiple stripes. The data blocks and parity blocks in each stripe come from different hard drives, and each stripe is arranged across nodes. Similarly, when using other RAID algorithms to store data in a LUN composed of multiple nodes, such as RAID 6, RAID 50, or RAID 60, all logical blocks in the LUN will also be divided into multiple stripes, with the data blocks and parity blocks in each stripe coming from different hard drives, and each stripe being arranged across nodes.
[0129] In the scenario where data processing system 20 combines LUN and RAID algorithms to store data, host 23 is used to determine the target hard drive and assign the data read / write tasks to be processed to the target hard drive for execution. These data read / write tasks typically involve multiple data blocks. The following section will combine... Figure 4 Further describe the data read / write tasks to be processed. For example... Figure 4 As shown, in one possible application scenario, the data read / write task to be processed involves data blocks in one stripe. For example, the data read / write task to be processed involves data blocks A21 to A27 in stripe S21. In another possible application scenario, the data read / write task to be processed involves data blocks in multiple stripes. For example, the data read / write task to be processed involves data blocks in stripes S21 to S23, including: data blocks A26, A27, B21 to B27, C21, and C22.
[0130] Optionally, the target hard drive can be any hard drive in the data processing system 20, combined with Figure 4To further clarify, the target hard drive can be any one of SSD 21, SSD 22, SSD 23, SSD 24, SSD 25, SSD 26, SSD 27, or SSD 28. For example, the target hard drive is SSD 28.
[0131] Optionally, the target hard drive can also be a hard drive selected by the host 23 based on preset rules. For example, the host 23 may determine the target hard drive based on the number of data read / write tasks to be processed, the type of data read / write tasks to be processed, the storage space indicated by the data read / write tasks to be processed, or the processing performance of the target hard drive. For a detailed explanation of how the host 23 determines the target hard drive, please refer to the following text. Figure 7 The description of the host determining the target hard disk in step S101 of the data processing method.
[0132] After receiving the data read / write task to be processed, the target hard disk further breaks down the task into multiple data read / write subtasks, specifically M subtasks, where M is an integer greater than 1, such as M = 2, 3, 4, etc. This application does not limit the number of M subtasks. Continuing with... Figure 4 To further clarify, the data read / write tasks to be processed involve data blocks A26, A27, B21 to B27, C21, and C22, with M being 2. The two data read / write subtasks involve 'data blocks A26 and A27' and 'data blocks B21 to B27, C21, and C22' respectively. For details on how the target hard drive obtains multiple data read / write subtasks, please refer to the following text. Figure 7 The description.
[0133] The data read / write subtask involves one or more data blocks. When a data read / write subtask involves multiple data blocks, these data blocks may be contiguous or non-contiguous; this application does not impose any restrictions on this. Combined with... Figure 2 To further explain, the data blocks involved in the data read / write subtask may include data block A12 and data block A13 (corresponding to the case of contiguous data), or the data blocks involved in the data read / write subtask may include data block A12 and data block B13 (corresponding to the case of non-contiguous data).
[0134] The target hard drive is also used to determine multiple hard drives, so that these hard drives can handle the aforementioned multiple data read / write subtasks respectively. Each determined hard drive can be used to handle one data read / write subtask or multiple data read / write subtasks; this application does not limit this. For ease of understanding, the following description uses one hard drive handling one data read / write subtask as an example. In this case, the number of data read / write subtasks is equal to the number of selected hard drives, both equal to M. For ease of description, the hard drives used to handle the data read / write subtasks, other than the target hard drive, can be referred to as the first hard drive. Optionally, the target hard drive can also be used to handle data read / write subtasks. For details on how multiple hard drives are determined as the target hard drive, please refer to the following text. Figure 7 The description.
[0135] It should be noted that there is no restriction on the order in which the target hard drive determines multiple data read / write subtasks and multiple hard drives. For example, the target hard drive can determine multiple data read / write subtasks first, and then determine multiple hard drives. Alternatively, multiple hard drives can be determined first, and then multiple data read / write subtasks can be determined. Furthermore, the operations of determining multiple data read / write subtasks and determining multiple hard drives can be performed in parallel.
[0136] In some potential application scenarios, data read / write tasks are generated by the client and sent to host 23. Host 23 then distributes the received data read / write tasks to the target hard drive. After receiving the data read / write task from host 23, the target hard drive performs operations such as splitting, distributing, or processing the task, allowing the first hard drive to assist in executing the data read / write task. When the target hard drive completes the data read / write task, it can also be considered that host 23 has completed the task. This completion includes the target hard drive itself and / or all first hard drives completing the data read / write sub-tasks. As can be seen, when completing data read / write tasks in this way, host 23 does not need to directly perform read / write operations on the data involved in the task.
[0137] In some possible implementations, the host 23 sends the received data read / write task to the target hard disk by sending target I / O instructions. The target hard disk completing the data read / write task constitutes completing the processing of the target I / O instructions. The target I / O instructions are used to instruct processing of storage spaces indicated by multiple target addresses. A target address (such as a target LBA) can indicate one or more data blocks. For ease of description, the following will exemplify one target address indicating one data block. In a specific implementation, the host 23 directly sends the target I / O instructions to the target hard disk via the high-speed interconnect bus 22. This process can be described in the following... Figure 7 The execution process of the host sending the first IO instruction to the target control disk in step S101 of the data processing method.
[0138] Optionally, the target I / O instruction can also be used to instruct the target hard disk to return a response message for the target I / O instruction.
[0139] It should be noted that the host 23 sending the target I / O command can be either a host 23 located on the same node 21 as the target hard disk or a host 23 located on a different node 21. Regardless of the location of the host 23 sending the target I / O command, the host 23 can directly send the target I / O command to the target hard disk via the high-speed interconnect bus 22.
[0140] After receiving the target I / O instruction, the target hard disk sends the data read / write subtask to the first hard disk via the first I / O instruction. The first I / O instruction instructs processing of the storage space indicated by a portion of multiple target addresses. In a specific implementation, the target hard disk directly sends the first I / O instruction to the first hard disk via the high-speed interconnect bus 22. This process can be described in the following... Figure 7 The execution process of the host sending the first IO instruction to the first control disk in step S101 of the data processing method.
[0141] Optionally, the first I / O instruction may also be used to instruct the first hard disk to return a response message for the first I / O instruction.
[0142] It should be noted that the target hard drive for sending the first I / O command can be either a hard drive located on the same node 21 as the first hard drive or a hard drive located on a different node 21. Regardless of the location of the target hard drive, it can directly send the first I / O command to the first hard drive via the high-speed interconnect bus 22.
[0143] In some possible implementations, the first hard disk executes the data read / write operation indicated by the first I / O instruction by sending an I / O instruction (hereinafter referred to as the second I / O instruction) to the hard disk (hereinafter referred to as the second hard disk) where the data to be processed indicated by the first I / O instruction resides. Continuing with... Figure 4 To illustrate, taking SSD 27 as the first hard drive, and assuming the first I / O instruction instructs the first hard drive to perform read / write operations on data blocks B21, B22, and B23, SSD 27, upon receiving the first I / O instruction, generates three second I / O instructions based on the first I / O instruction. These three second I / O instructions are then sent to SSD 21 (containing data block B21), SSD 22 (containing data block B22), and SSD 23 (containing data block B23), respectively, instructing the three SSDs to complete the read / write operations indicated by the second I / O instructions. The process by which the first hard drive generates the second I / O instructions based on the first I / O instruction can be seen below. Figure 7 The execution process.
[0144] It should be noted that the first hard drive sending the second I / O command can be either located on the same node 21 as the second hard drive or on a different node 21. Regardless of the location of the first hard drive sending the second I / O command, it can directly send the second I / O command to the second hard drive via the high-speed interconnect bus 22.
[0145] The second hard disk is then used to receive and execute the second I / O instructions from the first hard disk. This process can be seen below. Figure 7 Data processing methods.
[0146] It should be understood that the above-described control flow implementation in the form of instructions during the execution of data read and write tasks is merely an example, and this application does not specifically limit the implementation method of control flow during the execution of data read and write tasks.
[0147] It should be understood that the number of nodes 21 in the data processing system 20, and the number of hosts 23 and hard disks 24 in a single node 21, are based on... Figure 4 The data processing system 20 shown includes two nodes 21, each node 21 including one host 23 and four hard disks 24. This is used as an example for illustration. In practical applications, the number of nodes 21, hosts 23, and hard disks 24 in the data processing system 20 can be more, and this application does not make a specific limitation. When the data processing system 20 includes more nodes 21, and each node 21 includes more hosts 23, these hosts 23 can distribute the data read and write tasks received from different clients within the same node or across nodes.
[0148] In summary, in the data processing system 20, hard drives in different nodes are connected via a high-speed interconnect bus 22, giving these hard drives equal status and enabling direct data exchange and communication between them. The data processing system 20 supports direct communication between multiple hard drives in a single node via the high-speed interconnect bus, as well as direct communication between hard drives in different nodes via the high-speed interconnect bus. In the data processing system 20, the host assigns data read / write tasks to the target hard drive via I / O instructions. The completion of the target I / O instruction by the target hard drive is considered the completion of the data read / write task. Therefore, this technical solution offloads the data read / write tasks that would otherwise be executed by the host to the target hard drive, utilizing the target hard drive's resources (such as processing resources and storage resources) to execute the data read / write tasks, thus reducing the host's workload and freeing up host resources. Furthermore, the target hard drive instructs the first hard drive to process the storage space indicated by a portion of multiple target addresses. This is equivalent to the target hard drive offloading a portion of the entire data read / write task to the first hard drive, utilizing multiple hard drives to execute different parts of the entire data read / write task in parallel, thereby improving the overall execution efficiency of the data read / write task.
[0149] (III) The third type of data processing system
[0150] See Figure 5 , Figure 5 This is a structural diagram of another data processing system provided in an embodiment of this application. For example... Figure 5 As shown, the data processing system 30 includes a first device cluster 31, a second device cluster 32, and a high-speed interconnect bus 33. The first device cluster 31 and the second device cluster 32 are different device clusters.
[0151] The first device cluster 31 includes multiple hosts 34. Figure 5 The illustration shows a scenario where the first device cluster 31 includes two hosts 34. In a specific implementation, the first device cluster 31 can be a computing device cluster, in which case the first device cluster 31 includes multiple computing devices, and each computing device includes one or more hosts 34. The hosts 34 can be as described above. Figure 1 The host 11 in the data processing system 10.
[0152] The second device cluster 32 includes multiple hard drives 35. Figure 5 The illustration shows a scenario where the second device cluster 32 includes eight hard disks 35. In a specific implementation, the second device cluster 32 can be a storage device cluster, in which case the second device cluster 32 includes multiple storage devices, each storage device including one or more hard disks 35. Here, storage devices refer to hardware devices used for storing and preserving data, including storage servers, storage arrays, etc. The hard disks 35 can be as described above. Figure 1 The hard disk 12 in the data processing system 10.
[0153] The high-speed interconnect bus 33 is used to transmit I / O instructions or data between the first device cluster 31 and the second device cluster 32, and also to transmit I / O instructions or data between multiple hosts 34 within the first device cluster 31, and between multiple hard disks 35 within the second device cluster 32. The high-speed interconnect bus 33 can be as described above. Figure 1 The high-speed interconnect bus 13 in the data processing system 10.
[0154] In the data processing system 30, physical blocks in all hard disks 35 of the second device cluster 32 can be addressed based on LUNs. The specific implementation process can be referred to the process of addressing physical blocks in hard disks 12 based on LUNs in the data processing system 10 described above. For the sake of brevity, it will not be elaborated here.
[0155] In data processing system 30, by using a RAID algorithm to store data in a LUN, data processing system 30 can implement striped management of the data stored on hard disk 35. The following will use RAID5 as an example of the RAID algorithm, combined with... Figure 5 The data processing system 30 describes the process of storing data in a LUN using RAID 5.
[0156] because Figure 5 Only the number of hard disks 35 used for group LUNs in the second device cluster 32 is shown to be 8, therefore in Figure 5 In the data processing system 30, when storing data based on RAID5, the ratio of data blocks to parity blocks in each stripe is 7:1.
[0157] See Figure 6 , Figure 6 This is a schematic diagram of another result of storing data based on RAID5 provided in an embodiment of this application. Figure 6 The eight solid-state drives (SSDs) shown, SSD 31, SSD 32, SSD 33, SSD 34, SSD 35, SSD 36, SSD 37, and SSD 38, correspond to different drives 35 in the second device cluster 32. The process of storing data on SSDs 31, SSD 32, SSD 33, SSD 34, SSD 35, SSD 36, SSD 37, and SSD 38 using RAID 5 is as follows:
[0158] The parity block PA3 is calculated using the EC encoding algorithm using data blocks A31, A32, A33, A34, A35, A36, and A37. Then, data blocks A31, A32, A33, A34, A35, A36, A37, and parity block PA3 are stored in SSDs 31, 32, 33, 34, 35, 36, 37, and 38 respectively. The data blocks A31, A32, A33, A34, A35, A36, A37, and parity block PA3 together form stripe S31.
[0159] The parity block PB3 is calculated using the EC encoding algorithm using data blocks B31, B32, B33, B34, B35, B36, and B37. Then, data blocks B31, B32, B33, B34, B35, B36, B37, and parity block PB3 are stored in SSDs 31, 32, 33, 34, 35, 36, 28, and 37 respectively. This results in stripe S32 composed of data blocks B31, B32, B33, B34, B35, B36, B37, and parity block PB3.
[0160] The check block PC3 is calculated using the EC encoding algorithm using data blocks C31, C32, C33, C34, C35, C36, and C37. Then, data blocks C31, C32, C33, C34, C35, C36, C37, and check block PC3 are stored on SSDs 31, 32, 33, 34, 35, 37, 28, and 36 respectively. The data blocks C31, C32, C33, C34, C35, C36, C37, and check block PC3 together form stripe S33.
[0161] The parity block PD3 is calculated using the EC encoding algorithm using data blocks D31, D32, D33, D34, D35, D36, and D37. Then, data blocks D31, D32, D33, D34, D35, D36, D37, and parity block PD3 are stored on SSDs 31, 32, 33, 34, 36, 37, 28, and 35 respectively. The data blocks D31, D32, D33, D34, D35, D36, D37, and parity block PD3 together form stripe S34.
[0162] It should be understood that for other data blocks, a check block is still calculated from seven data blocks, and the different check blocks are distributed and stored on different hard disks 35.
[0163] As described above, when a LUN is formed in the second device cluster 32 and RAID 5 is used to store data, all logical blocks in the LUN are divided into multiple stripes. The data blocks and parity blocks in each stripe come from different hard drives. Optionally, when the second device cluster 32 is a storage device cluster, the multiple hard drives 35 providing the data blocks and parity blocks in the same stripe may be deployed in different storage devices; that is, the stripes are arranged across devices. It can be seen that when other RAID algorithms are used to store data in the LUN formed by the second device cluster 32, such as RAID 6, RAID 50, RAID 60, etc., all logical blocks in the LUN will also be divided into multiple stripes, and the data blocks and parity blocks in each stripe will come from different hard drives.
[0164] In a scenario where data processing system 30 combines LUN and RAID algorithms to store data, host 34 is used to determine the target hard drive and assign the data read / write tasks to be processed to the target hard drive for execution. These data read / write tasks typically involve multiple data blocks. The following section will combine... Figure 6 Further describe the data read / write tasks to be processed. For example... Figure 6 As shown, in one possible application scenario, the data read / write task to be processed involves data blocks in one stripe. For example, the data read / write task to be processed involves data blocks A31 to A37 in stripe S31. In another possible application scenario, the data read / write task to be processed involves data blocks in multiple stripes. For example, the data read / write task to be processed involves data blocks in stripes S31 to S33, including: data blocks A36, A37, B31 to B37, C31, and C32.
[0165] Optionally, the target hard drive can be any hard drive in the data processing system 30, combined with Figure 6 To further clarify, the target hard drive can be any one of SSD 31, SSD 32, SSD 33, SSD 34, SSD 35, SSD 36, SSD 37 or SSD 38, for example, the target hard drive is SSD 38.
[0166] Optionally, the target hard drive can also be a hard drive selected by the host 34 based on preset rules. For example, the host 34 may determine the target hard drive based on the number of data read / write tasks to be processed, the type of data read / write tasks to be processed, the storage space indicated by the data read / write tasks to be processed, or the processing performance of the hard drive. For a detailed explanation of how the host 34 determines the target hard drive, please refer to the following text. Figure 7 The description of the host determining the target hard disk in step S101 of the data processing method.
[0167] After receiving the data read / write task to be processed, the target hard disk further breaks down the task into multiple data read / write subtasks, specifically M subtasks, where M is an integer greater than 1, such as M = 2, 3, 4, etc. This application does not limit the number of M subtasks. Continuing with... Figure 6 To further clarify, the data read / write task to be processed involves data blocks A36, A37, B31 to B37, C31, and C32, with M being 2. The two data read / write subtasks involve 'data blocks A36 and A37' and 'data blocks B31 to B37, C31, and C32' respectively. For details on how the target hard drive obtains multiple data read / write subtasks, please refer to the following text. Figure 7 The description.
[0168] The data read / write subtask involves one or more data blocks. When a data read / write subtask involves multiple data blocks, these data blocks may be contiguous or non-contiguous; this application does not impose any restrictions on this. Combined with... Figure 2 To further explain, the data blocks involved in the data read / write subtask may include data block A12 and data block A13 (corresponding to the case of contiguous data), or the data blocks involved in the data read / write subtask may include data block A12 and data block B13 (corresponding to the case of non-contiguous data).
[0169] The target hard drive is also used to determine multiple hard drives, so that these hard drives can handle the aforementioned multiple data read / write subtasks respectively. Each determined hard drive can be used to handle one data read / write subtask or multiple data read / write subtasks; this application does not limit this. For ease of understanding, the following description uses one hard drive handling one data read / write subtask as an example. In this case, the number of data read / write subtasks is equal to the number of selected hard drives, both equal to M. For ease of description, the hard drives used to handle the data read / write subtasks, other than the target hard drive, can be referred to as the first hard drive. Optionally, the target hard drive can also be used to handle data read / write subtasks. For details on how multiple hard drives are determined as the target hard drive, please refer to the following text. Figure 7 The description.
[0170] It should be noted that there is no restriction on the order in which the target hard drive determines multiple data read / write subtasks and multiple hard drives. For example, the target hard drive can determine multiple data read / write subtasks first, and then determine multiple hard drives. Alternatively, multiple hard drives can be determined first, and then multiple data read / write subtasks can be determined. Furthermore, the operations of determining multiple data read / write subtasks and determining multiple hard drives can be performed in parallel.
[0171] In some potential application scenarios, data read / write tasks are generated by the client and sent to the host 34. The host 34 then distributes the received data read / write tasks to the target hard drive. After receiving the data read / write task from the host 34, the target hard drive performs operations such as splitting, distributing, or processing the task, allowing the first hard drive to assist in executing the data read / write task. When the target hard drive completes the data read / write task, it can also be considered that the host 34 has completed the task. This completion includes the target hard drive itself and / or all first hard drives completing the data read / write sub-tasks. As can be seen, when completing data read / write tasks in this way, the host 34 does not need to directly perform read / write operations on the data involved in the task.
[0172] In some possible implementations, the host 34 distributes the received data read / write tasks to the target hard disk by sending target I / O instructions. The target hard disk completing the data read / write task constitutes completing the processing of the target I / O instructions. These target I / O instructions instruct processing of storage spaces indicated by multiple target addresses. A single target address (such as a target LBA) can indicate one or more data blocks. For ease of description, the following explanation will exemplify one target address indicating one data block. In a specific implementation, the host 34 directly sends the target I / O instructions to the target hard disk via the high-speed interconnect bus 22. This process can be described in the following... Figure 7 The execution process of the host sending the first IO instruction to the target control disk in step S101 of the data processing method.
[0173] Optionally, the target I / O instruction can also be used to instruct the target hard disk to return a response message for the target I / O instruction.
[0174] It should be noted that the host 34 that sends the target I / O command can be any host 34 in the first device cluster 31, and the host 34 can send the target I / O command directly to the target hard disk through the high-speed interconnect bus 22.
[0175] After receiving the target I / O instruction, the target hard disk sends the data read / write subtask to the first hard disk via the first I / O instruction. The first I / O instruction instructs processing of the storage space indicated by a portion of multiple target addresses. In a specific implementation, the target hard disk directly sends the first I / O instruction to the first hard disk via the high-speed interconnect bus 33. This process can be described in the following... Figure 7 The execution process of the host sending the first IO instruction to the first control disk in step S101 of the data processing method.
[0176] Optionally, the first I / O instruction may also be used to instruct the first hard disk to return a response message for the first I / O instruction.
[0177] It should be noted that the first hard drive receiving the first I / O command can be any hard drive 35 in the second device cluster 32, excluding the target hard drive. Within the second device cluster 32, the target hard drive can directly send the first I / O command to the first hard drive via the high-speed interconnect bus 33.
[0178] In some possible implementations, the first hard disk executes the data read / write operation indicated by the first I / O instruction by sending I / O instructions (hereinafter referred to as second I / O instructions) to the hard disk (hereinafter referred to as the second hard disk) where the data to be processed indicated by the first I / O instruction resides. Continuing with the explanation in section 6, taking SSD 37 as the first hard disk and the first I / O instruction instructing the first hard disk to perform read / write operations on data blocks B31, B32, and B33 as an example, after receiving the first I / O instruction, SSD 37 generates three second I / O instructions based on the first I / O instruction and sends the three second I / O instructions to SSD 31 (where data block B31 resides), SSD 32 (where data block B32 resides), and SSD 33 (where data block B33 resides), respectively, to instruct the three SSDs to complete the read / write operation indicated by the second I / O instruction. The process by which the first hard disk generates the second I / O instructions based on the first I / O instruction can be seen in the following... Figure 7 The execution process.
[0179] The second hard disk is then used to receive and execute the second I / O instructions from the first hard disk. This process can be seen below. Figure 7 The process of the first data disk executing the second IO instruction in step S104 of the data processing method.
[0180] It should be understood that the above-described control flow implementation in the form of instructions during the execution of data read and write tasks is merely an example, and this application does not specifically limit the implementation method of control flow during the execution of data read and write tasks.
[0181] It should be understood that in the data processing system 30, the number of hosts 34 in the first device cluster 31 and the number of hard disks 35 in the second device cluster 32 are based on... Figure 5 The data processing system 30 shown is illustrated with an example where the first device cluster 31 includes two hosts 34 and the second device cluster 32 includes eight hard disks 35. In practical applications, the number of hosts 34 and hard disks 35 in the data processing system 30 can be greater, and this application does not impose a specific limitation. When the data processing system 30 includes more hosts 34, each of these hosts 34 can distribute the data read / write tasks received from different clients, and the control disk receiving the task controls the data read / write process in the corresponding stripe.
[0182] In summary, in the data processing system 30, hard drives 35 of a device cluster or hard drives 35 of different device clusters are connected via a high-speed interconnect bus 33, giving these hard drives equal status and enabling direct data exchange and communication between them. The data processing system 30 supports direct communication between multiple hard drives in a single node via the high-speed interconnect bus, as well as direct communication between hard drives in different nodes via the high-speed interconnect bus. In the data processing system 30, the host assigns data read / write tasks to the target hard drive via I / O instructions. The completion of the target I / O instruction by the target hard drive is considered a completion of the data read / write task. Therefore, this technical solution offloads data read / write tasks that would otherwise be performed by the host to the target hard drive, utilizing the target hard drive's resources (such as processing resources and storage resources) to execute the data read / write tasks, thus reducing the host's workload and freeing up host resources. Furthermore, the target hard disk instructs the first hard disk to process the storage space indicated by a portion of the multiple target addresses. In effect, the target hard disk offloads a portion of the data read / write task from the entire data read / write task to the first hard disk, thereby improving the execution efficiency of the entire data read / write task by using multiple hard disks to execute different parts of the entire data read / write task in parallel.
[0183] The above text combined Figures 1-6 The data processing system provided in the embodiments of this application has been introduced. Next, a data processing method provided in the embodiments of this application will be described. It should be noted that the application scenarios of the data processing method provided in the embodiments of this application are not limited to those described above. Figure 1 The first type of data processing system Figure 3 The second type of data processing system or Figure 5 The third type of data processing system, and all scenarios in which the data processing methods provided in the embodiments of this application can be applied, are within the protection scope of this application.
[0184] See Figure 7 , Figure 7 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 7 As shown, the data processing method provided in this application includes:
[0185] S101: The host sends the target I / O command to the target hard disk.
[0186] Accordingly, the target hard disk receives target I / O instructions from the host.
[0187] In scenarios where data processing systems provide LUN-based addressing, logical blocks within a LUN are divided into multiple stripes, and LBAs are assigned to the logical blocks within each stripe. The host machine of the data processing system stores the mapping between all stripes and all LBAs. Logical blocks within a stripe correspond only to data blocks within that stripe; parity blocks do not have corresponding logical blocks. That is, parity blocks typically do not have LBAs; only data blocks have LBAs. This is because data blocks store actual data information, and therefore each data block has a corresponding LBA to uniquely identify its location in the first storage space. Parity blocks, on the other hand, exist to provide data redundancy verification; therefore, parity blocks typically do not have independent LBAs but are associated with their corresponding data blocks.
[0188] The host can allocate consecutive LBAs for logical blocks within the same stripe, and ensure that LBAs in adjacent stripes are consecutive. Specifically, the smallest LBA in one stripe is adjacent to the largest LBA in one of its adjacent stripes, and the largest LBA in one stripe is adjacent to the smallest LBA in another of its adjacent stripes. Figure 2 Taking stripes S11-S14 in the data processing system 10 as an example, consecutive LBAs are assigned to all data blocks in each stripe, and the LBAs of data blocks in adjacent stripes are also consecutive, such as... Figure 8 As shown.
[0189] See Figure 8 , Figure 8 This is a schematic diagram illustrating the distribution of LBAs in a data processing system provided in an embodiment of this application. Figure 8 In the diagram, from stripe S11 to stripe S14, the LBA value gradually increases, and the LBAs of data blocks within each stripe are consecutive. For example, in stripe S11, the LBAs of data blocks A11, A12, and A13 are LBA 0, LBA 1, and LBA 2, respectively, while in stripe S12, the LBAs of data blocks B13, B12, and B11 are LBA 3, LBA 4, and LBA 5, respectively. Furthermore, the LBAs of any two adjacent stripes are also consecutive. For instance, the smallest LBA in stripe S12—LBA 3—is adjacent to the largest LBA in the adjacent stripe S11—LBA 2, and the largest LBA in stripe S12—LBA 5—is adjacent to the smallest LBA in the adjacent stripe S13—LBA 6.
[0190] It should be understood that the above-described assignment of consecutive LBAs to logical blocks within the same strip is merely an example. In practical applications, discrete LBAs can also be assigned to logical blocks within the same strip, and this application does not impose any specific limitations. However, for ease of explanation, the following description of LBA distribution in data processing systems will uniformly use the example of consecutive LBAs for logical blocks within the same strip and consecutive LBAs in adjacent strips.
[0191] After allocating LBAs to logical blocks within a stripe, the specific process for users to read and write data to all physical blocks comprising the LUN via access to the LUN is as follows: If a user wants to read data, the user generates a data read / write task carrying multiple target LBAs through the client and sends the task to the host in the data processing system; if a user wants to store data, the user generates a data read / write task carrying multiple target LBAs and target data through the client and sends the task to the host in the data processing system. The target LBA indicates one or more physical blocks. Specifically, the target address can be any one of LBA0-LBA9.
[0192] It is understood that the target LBA mentioned above is one way of representing the target address. In practical applications, this application does not limit the way the target address is represented.
[0193] In one specific implementation, after receiving a data read / write task from the client, the host can determine the target hard drive based on the performance or load of the data processing system. The data processing system can include various types of disks, each with potentially different processing performance. Disk processing performance determines the speed of I / O command processing; therefore, the host can prioritize disks with high processing performance as the target hard drive. Disk processing performance includes factors such as processing speed and cache size. Disk load affects the waiting time for I / O command processing; therefore, the host can prioritize disks with low load as the target hard drive to improve the speed of completing I / O commands. Disk load, for example, is the number of I / O commands waiting to be processed. Alternatively, the host can determine the target hard drive by combining both disk performance and load.
[0194] After receiving a data read / write task from the client, the host can determine the target hard drive based on the task. The data read / write task carries multiple target addresses, and the host can choose the hard drive containing the physical block indicated by the first target address as the target hard drive. Continuing with... Figure 8Multiple target addresses are LBA 1-LBA4, with the first target address being LBA 1. The hard drive where the indicated data block A12 resides is SSD 12. Therefore, SSD 12 can be used as the target hard drive. When logical blocks in a LUN are divided into multiple stripes, the host determines the stripe corresponding to the first target address based on the mapping between target addresses and data blocks, and the mapping between data blocks and stripes. For example, if the first target address is LBA 1, LBA 1 corresponds to data block A12, and data block A12 belongs to stripe S11, then the first target address corresponds to stripe S11. The host determines that the hard drive containing the parity block in the stripe corresponding to the first target address is the target hard drive. The hard drive where the parity block PA1 in stripe S11 resides is SSD 14; therefore, the target hard drive is SSD 14. Furthermore, the host can determine the target hard drive based on the number of multiple target addresses. For example, in scenarios with a small number of target addresses (e.g., less than 10, 20, or 30), the workload of the corresponding data read / write task is relatively small. The host can then select a hard drive with weaker processing performance as the target hard drive to avoid consuming the resources (including processing and storage resources) of the hard drive with stronger processing performance. Conversely, in scenarios with a large number of target addresses, the workload of the corresponding data read / write task is relatively large. The host can then select a hard drive with stronger processing performance as the target hard drive to quickly complete the data read / write task.
[0195] After identifying the target hard drive, the host sends a target I / O instruction to it. Correspondingly, the target hard drive receives the target I / O instruction from the host. This target I / O instruction includes multiple target addresses, which indicate one or more physical blocks of the first storage space. The target I / O instruction instructs processing of the storage space indicated by the multiple target addresses, where the first storage space is provided by the data processing system. Figure 8 For example, the first storage space consists of SSDs 11 to 14. In a specific implementation, the host sends target I / O commands to the target hard disk via a high-speed interconnect bus, and the target hard disk receives the target I / O commands from the host via the high-speed interconnect bus.
[0196] Optionally, the target I / O instruction can also be used to indicate a response message that returns the target I / O instruction.
[0197] Optionally, the target I / O instruction carries the data length. The data length is used to identify the size of the data. For example, if the target I / O instruction carries the information "8K", it means that the data is 8 kilobytes (KB).
[0198] Optionally, the target I / O instruction carries an instruction type. The instruction type is used to identify whether the target I / O instruction is a read instruction or a write instruction. If the target I / O instruction is a read instruction, it carries a read flag; if the target I / O instruction is a write instruction, it carries a write flag.
[0199] Optionally, the target I / O command carries a RAID algorithm. In this case, the target I / O command instructs the data to be read and written according to the RAID algorithm. For example, if the target I / O command carries "RAID5", then RAID5 should be used for data read and write operations.
[0200] Clearly, by sending data read / write tasks from the client to the target hard drive via target instructions, the host can offload data read / write tasks that should have been performed by the host to the target hard drive and utilize the resources of the target hard drive (such as processing resources, storage resources, etc.) to perform the data read / write tasks. This reduces the workload of the host and frees up the host's resources.
[0201] S102: The target hard disk generates the first I / O instruction based on the target I / O instruction.
[0202] The target I / O instruction includes multiple target addresses. The first I / O instruction carries a portion of the target addresses. The first I / O instruction is used to instruct the processing of the memory space indicated by the target address carried by the first I / O instruction.
[0203] In one specific implementation, when the target address is represented by a target LBA, the target hard disk divides multiple target LBAs in the target I / O instruction into multiple groups based on the correspondence between stripes and LBAs, ensuring that the data blocks corresponding to each group of target LBAs belong to the same stripe. Taking multiple target addresses LBA1-LBA10 as an example, the resulting groups of target LBAs are LBA1-LBA2 (group 1), LBA3-LBA5 (group 2), LBA6-LBA8 (group 3), and LBA9-LBA10 (group 4). The data blocks corresponding to the target LBAs in group 1 belong to stripe S11, those in group 2 to stripe S12, those in group 3 to stripe S13, and those in group 4 to stripe S14. Next, the target hard disk generates a first I / O instruction for each group, carrying all the target LBAs in that group and instructing the processing of the storage space commonly indicated by all the target LBAs in that group.
[0204] In another specific implementation, the target hard disk can further divide multiple target LBAs in the target I / O instruction into multiple groups using target values, such that the number of target addresses in each group is equal to or less than the target value. Continuing with the example of multiple target addresses LBA 1-LBA10, assuming the target value is 2, LBA 1-LBA10 can be divided into 5 groups: LBA1-LBA2, LBA 3-LBA 4, ..., LBA 9-LBA10. Next, the target hard disk generates a first I / O instruction for each group, carrying all the target LBAs in that group and instructing that the storage space commonly indicated by all the target LBAs in that group be processed. The target value is determined by the user. For example, the target value could be 1, 2, 3, 4, 5, 6, etc. Optionally, the target value depends on the number of hard disks in the data processing system; for example, the target value is equal to the number of target addresses in the target I / O instruction divided by the number of hard disks in the processing system, rounded up. For example, if the target I / O instruction has 10 target addresses and the system has 4 hard disks, then 10 / 4 and rounded up gives a target value of 3.
[0205] In the above description, the target addresses in the grouping results of the target hard disk for multiple target addresses are all contiguous. In other possible implementations, the grouping results of the target hard disk for multiple target addresses may also be non-contiguous. Again, taking multiple target addresses LBA1-LBA10 as an example, the target hard disk can group target LBAs whose physical blocks belong to the same hard disk into one group. The grouping results would then be "LBA5 and LBA6" (SSD 11), "LBA1 and LBA4" (SSD 12), "LBA2, LBA7 and LBA10" (SSD 13), and "LBA3, LBA8 and LBA9" (SSD 14). Next, the target hard disk generates a first I / O instruction for each group, so that a single first I / O instruction carries all the target LBAs in that group and instructs that the storage space commonly indicated by all the target LBAs in that group be processed.
[0206] The above process for determining the first I / O instruction is illustrated using a scenario where the logical blocks included in the LUN are divided into multiple stripes. It is understandable that this method is equally applicable in scenarios where the logical blocks included in the LUN are not divided into multiple stripes. For example, the target hard disk can group multiple target addresses by setting a data volume and then determine the first I / O instruction. As another example, the target hard disk can group target addresses whose physical blocks belong to the same hard disk into a single group and then determine the first I / O instruction.
[0207] It should be noted that the target hard drive determines the first I / O instruction to enable other hard drives to assist in processing the target I / O instruction. If the data read / write subtasks corresponding to some target addresses in the target I / O instruction are executed by the target hard drive, then there is no need to generate the first I / O instruction. Continuing with the example of multiple target addresses LBA1-LBA10, if the data read / write subtasks corresponding to LBA1-LBA2 are completed by the target hard drive, then the target hard drive does not need to generate a first I / O instruction carrying LBA1-LBA2.
[0208] In one possible scenario, multiple target addresses indicate physical blocks belonging to multiple target stripes, and these multiple target stripes belong to multiple stripes within a LUN. Continuing with this... Figure 8 If the multiple stripes in the LUN are stripe S11, stripe S12, stripe S13 and stripe S14, and the multiple target addresses are LBA1-LBA3, then the physical blocks indicated by the multiple target addresses belong to stripe S11 and stripe S12, that is, stripe S11 and stripe S12 are target stripes.
[0209] Multiple target stripes include one or more first stripes. A first stripe is the stripe to which the physical block indicated by the target address carried by the first I / O instruction belongs. It can also be understood that the stripe to which the physical block indicated by the target address carried by the first I / O instruction belongs is the first stripe, and the first stripe is also a target stripe. Continuing with the example of multiple target addresses LBA 1-LBA3, and target stripes S11 and S12, if the target address carried by the first I / O instruction is LBA 1-LBA 2, then the first stripe is stripe S11; if the target address carried by the first I / O instruction is LBA 1-LBA 3, then the first stripes are stripes S11 and S12.
[0210] The target hard disk also identifies a first hard disk for receiving and executing the first I / O instruction.
[0211] In one specific implementation, the target hard disk is determined based on the first stripe. This determination method is simple, fast, and easy to implement.
[0212] In some possible application scenarios, the number of stripes included in the first stripe may vary slightly depending on the target address carried by the first IO instruction, which can be divided into two cases.
[0213] Case 1: The number of the first stripe is one. For example, if the target address carried by the first I / O instruction is LBA 1-LBA2, then the first stripe is stripe S11, and the number of the first stripe is one.
[0214] Case 2: There are multiple first stripes. For example, if the target address carried by the first I / O instruction is LBA 1-LBA3, then the first stripe includes stripe S11 and stripe S12, and there are two first stripes.
[0215] In the scenario shown in Case 1, the target hard drive can identify the hard drive containing the parity block of the first stripe as the first hard drive. Taking stripe S11 as an example, if the hard drive containing the parity block PA1 of stripe S11 is SSD14, then the target hard drive can identify SSD14 as the first hard drive.
[0216] In the scenario shown in Case 2, the target hard drive can identify the hard drive containing the parity block of each first stripe as the first hard drive. Taking multiple first stripes including stripe S11 and stripe S12 as an example, the hard drive containing the parity block PA1 of stripe S11 is SSD14, and the hard drive containing the parity block PB1 of stripe S12 is SSD13. Therefore, SSD14 and SSD13 are both the first hard drives.
[0217] It is understandable that, based on the above scheme, there is a one-to-one correspondence between the multiple first hard disks and the multiple first stripes. Each first hard disk is used to receive and execute the first IO instruction used to instruct the processing of the first stripe corresponding to that first hard disk. In other words, there is also a one-to-one correspondence between the multiple first hard disks and the multiple first IO instructions.
[0218] In another specific implementation, the target hard drive determines the first hard drive based on the number of I / O instructions pending processing across multiple hard drives in the data processing system. The number of I / O instructions pending processing affects the speed at which hard drives complete I / O instructions. Therefore, the target hard drive can obtain the number of I / O instructions pending processing for each hard drive and select the N hard drives with the fewest pending I / O instructions as the first hard drive, where N is the number of the first I / O instructions. Continuing with... Figure 8 Assuming that the number of I / O instructions to be processed by SSDs 11-SSD 14 are 1, 2, 3, and 4 respectively, and the number of first I / O instructions is 2, then SSD 11 and SSD 12 can be identified as the first hard disks, each used to process one first I / O instruction. In this case, the correspondence between the first I / O instructions and the first hard disks is not limited in this application. This method of determination, by selecting the hard disk with the least load to perform part of the data read / write tasks, ensures that this part of the tasks is executed quickly and efficiently, and also helps with load balancing among multiple hard disks.
[0219] In another specific implementation, the target hard drive can also be determined based on the first stripe and the number of I / O instructions to be processed from multiple hard drives. Combined with... Figure 8It is known that the parity blocks of different stripes are located on different hard drives, and the number of I / O instructions to be processed may also differ among these hard drives. The target hard drive can detect whether the number of I / O instructions to be processed on the hard drive containing the parity block of the first stripe is less than a first threshold. If the number of I / O instructions to be processed on that hard drive is less than the first threshold, then that hard drive is designated as the first hard drive. If the number of I / O instructions to be processed on that hard drive is greater than or equal to the first threshold, then the target hard drive checks the number of I / O instructions to be processed on other hard drives sequentially from closest to furthest from the target hard drive, based on their distance from the target hard drive. If a hard drive is detected with a number of I / O instructions to be processed less than the first threshold, then that hard drive is designated as the first hard drive. If the number of I / O instructions to be processed on all hard drives is greater than or equal to the first threshold, then the hard drive containing the parity block of the first stripe is selected as the first hard drive. The first threshold is determined by the user. The first threshold is a positive integer, such as 3, 4, or 5. For example, taking the first stripe as stripe S12 and the first threshold equal to 5, the hard drive where the parity block PB1 of stripe S12 is located is SSD 13. If the number of pending IO instructions in SSD 13 is 8, then it is checked whether the number of pending IO instructions in SSD 12, which is adjacent to SSD 13, is less than 5. If the number of pending IO instructions in SSD 12 is 4, then SSD 12 is selected as the first hard drive. If the number of pending IO instructions in SSD 12 is 6, then it is checked whether the number of pending IO instructions in SSD 14, which is adjacent to SSD 13, is less than 5. If the number of pending IO instructions in SSD 14 is 3, then SSD 14 is selected as the first hard drive. If the number of pending IO instructions in SSD 14 is 6, then it is checked whether the number of pending IO instructions in SSD 11, which is not adjacent to SSD 13, is less than 5. If the number of pending I / O instructions in SSD 11 is 3, then SSD 11 is selected as the first hard drive; if the number of pending I / O instructions in SSD 11 is 7, then SSD 13 is selected as the first hard drive.
[0220] In summary, the above solutions provide multiple ways to determine the first hard drive, adapting to the needs of determining the first hard drive in various scenarios, so that the determined first hard drive can efficiently complete the read and write tasks involved in the first IO instruction.
[0221] It should be noted that the order in which the target hard drive determines the first I / O instruction and the first hard drive is not limited. For example, the target hard drive can determine the first I / O instruction first, and then determine the first hard drive. Alternatively, the target hard drive can determine the first hard drive first, and then determine the first I / O instruction. Of course, the target hard drive can also execute the processes of determining the first hard drive and determining the first I / O instruction in parallel.
[0222] S103: The target hard disk sends the first I / O instruction to the first hard disk.
[0223] In one specific implementation, the target hard disk sends a first I / O instruction to the first hard disk via a high-speed interconnect bus, and the first hard disk receives the first I / O instruction from the target hard disk via the high-speed interconnect bus.
[0224] S104: The first hard disk executes the first I / O instruction.
[0225] The process of the first hard disk executing the first I / O instruction includes generating the second I / O instruction, sending the second I / O instruction, and receiving the response information for the second I / O instruction. These will be described in turn below.
[0226] 1) The first hard disk generates the second I / O instruction.
[0227] After receiving the first I / O instruction, the first hard disk obtains the target address carried by the first I / O instruction, and generates a second I / O instruction for each target address based on the information stored on the first hard disk, as follows:
[0228] If the hard drive where the data block indicated by the target address resides is the first hard drive, the first hard drive will not generate a second I / O instruction for that target address. Taking LBA0 as the target address and SSD 11 as the first hard drive as an example, combined with... Figure 8 From the LBA distribution, we know that the data block corresponding to LBA 0 is data block A11, and data block A11 is on SSD 11. Therefore, the first control disk does not generate a second IO instruction for LBA 0.
[0229] If the hard drive containing the data block indicated by the target address is not the first hard drive, then the first hard drive generates a second I / O instruction carrying the target address. Taking target address LBA 1 and first hard drive SSD 11 as an example, combined with... Figure 8 From the distribution of LBAs, we can see that the data block corresponding to LBA 1 is data block A12, and data block A12 is on SSD 12. Therefore, the first hard drive generates a second IO instruction carrying LBA1.
[0230] 2) Send the second I / O instruction.
[0231] Based on the above description, it can be seen that the second I / O instruction generated by the first hard disk carries a target address. Therefore, the first hard disk sends the second I / O instruction to the hard disk (hereinafter referred to as the second hard disk) where the data block indicated by the target address in the second I / O instruction is located. Taking the second I / O instruction carrying LBA 1 as an example, since the data block indicated by LBA 1 is data block A12, and data block A12 is on SSD 12, the first hard disk sends the second I / O instruction to SSD 12. Correspondingly, SSD 12 receives the second I / O instruction and executes it.
[0232] 3) The second hard disk returns a response message for executing the second I / O instruction, and correspondingly, the first hard disk receives the response message for the second I / O instruction.
[0233] Next, we will further explain how the second hard drive executes the second I / O instructions.
[0234] In some possible implementations, the process of the second hard disk executing the second I / O instruction is related to the instruction type of the second I / O instruction (such as a read instruction or a write instruction) and the status of the data block (hereinafter referred to as the first data block) indicated by the target address carried by the second I / O instruction (such as normal data or data failure). The stripe to which the first data block belongs is called the first stripe.
[0235] The following will describe the specific process of the second hard drive executing the second I / O instruction in different scenarios.
[0236] Scenario 1: The second IO instruction carries a write instruction (such as carrying a write flag). The second IO instruction is used to instruct the first data in the host's memory to be stored in the first data block.
[0237] In a data processing system, host memory refers to the devices or components used to store programs and data. It temporarily stores the data and instructions needed by the host so that the processor can access and operate them quickly. Host memory can be directly accessed using direct memory access (DMA) technology. Examples of host memory include dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, virtual memory, and so on.
[0238] In a data processing system using RAID algorithms to store data, writing the first data from the host's memory to the first data block in the first stripe involves two processes: writing the first data to the first data block, and updating the parity block (hereinafter referred to as the first parity block) in the first stripe. To implement these two processes, the first hard drive needs to send second I / O instructions to the hard drive containing the first data block and the hard drive containing the first parity block, respectively. The process of these two hard drives executing the second I / O instructions can be seen in scenarios 11 and 12 below.
[0239] Scenario 11: The hard drive containing the first data block is the second hard drive.
[0240] See Figure 9A , Figure 9A This is a schematic diagram illustrating the process of a second hard disk executing a second I / O instruction, as provided in an embodiment of this application.
[0241] like Figure 9A As shown, the process of the second hard disk executing the second I / O instruction is as follows: the second hard disk reads the first data from the host's memory and writes the first data into the first data block on the second hard disk according to the target address in the second I / O instruction. After writing the first data into the first data block, it means that the second hard disk has completed the second I / O instruction. Therefore, the second hard disk sends an instruction completion message (i.e., the response message of the second I / O instruction) to the first hard disk through the high-speed interconnect bus to indicate that the execution was successful.
[0242] Scenario 12: The hard drive where the first check block is located is the second hard drive.
[0243] See Figure 9B , Figure 9B This is a schematic diagram illustrating another process by which a second hard disk executes a second I / O instruction, as provided in an embodiment of this application.
[0244] like Figure 9B As shown, the process of the second hard disk executing the second I / O instruction is as follows: The second hard disk reads the first data from the host's memory. The second hard disk sends a third I / O instruction to the third hard disk where the second data block is located. The third I / O instruction instructs the third hard disk to read the data of the second data block and send the data of the second data block to the second hard disk. After receiving the third I / O instruction, the third hard disk reads the data from the second data block on its own disk and sends a read completion message carrying the data to the second hard disk through the high-speed interconnect bus. After receiving the read completion message, the second hard disk obtains the data of the second data block from the read completion message, calculates the data of the first data and the second data block based on the RAID algorithm in the second I / O instruction, obtains the parity data of the first stripe, and then writes the parity data of the first stripe into the first parity block, completing the update of the first parity block. Here, the second data block is a data block in the first stripe that is different from the first data block. For example, if the first stripe is stripe S11, then the second hard disk is SSD 14, the first data block is data block A11, then the second data block includes data block A12 and data block A13, and correspondingly, the third hard disk includes SSD 12 and SSD 13.
[0245] Optionally, when only a portion of the data blocks in the first stripe are written, the second hard disk can calculate new data based on the data before and after the portion of the data blocks were written, as well as the old data stored on the first parity block. The new data is then written to the first parity block to overwrite the old data.
[0246] The second hard drive sends a completion message (i.e., a response message for the second I / O instruction) to the first hard drive via a high-speed interconnect bus to indicate that the instruction was successfully executed.
[0247] Scenario 2: The second IO instruction carries a read instruction (such as carrying a read flag). The second IO instruction is used to instruct the second data in the first data block to be stored in the host's memory.
[0248] In a data processing system that uses a RAID algorithm to store data, retrieving the second data from the first data block in the first stripe can be done in at least two ways: directly reading the second data from the first data block, and calculating the second data using the first parity block. These two methods are triggered by the first hard drive sending second I / O commands to the hard drive containing the first data block and the hard drive containing the first parity block, respectively. The process of these two hard drives executing the second I / O commands can be seen in scenarios 21 and 22 below.
[0249] Scenario 21: The hard drive containing the first data block is used as the second hard drive. Scenario 21 typically corresponds to the case where the second data is normal.
[0250] See Figure 9C , Figure 9C This is a schematic diagram illustrating another process by which a second hard disk executes a second I / O instruction, as provided in an embodiment of this application.
[0251] like Figure 9C As shown, the process of the second hard disk executing the second I / O instruction is as follows: the second hard disk reads the second data from the first data block according to the target address in the second I / O instruction, and writes the second data into the host's memory. After writing the second data into the host's memory, it means that the second hard disk has completed the second I / O instruction. Therefore, the second hard disk sends an instruction completion message (i.e., the response message of the second I / O instruction) to the first hard disk through the high-speed interconnect bus to indicate that the execution was successful.
[0252] Scenario 22: The hard drive containing the first check block is the second hard drive. Scenario 22 typically corresponds to a second data failure.
[0253] See Figure 9D , Figure 9D This is a schematic diagram illustrating another process by which a second hard disk executes a second I / O instruction, as provided in an embodiment of this application.
[0254] like Figure 9DAs shown, the process of the second hard disk executing the second I / O instruction is as follows: The second hard disk reads the parity data of the first stripe from the first parity block on the first disk. The second hard disk sends a third I / O instruction to the third hard disk where the second data block is located. The third I / O instruction instructs the third hard disk to read the data of the second data block and send the data of the second data block to the second hard disk. After receiving the third I / O instruction, the third hard disk reads the data from the second data block on the third hard disk and sends a read completion message carrying the data to the second hard disk through the high-speed interconnect bus. After receiving the read completion message, the second hard disk obtains the data of the second data block from the read completion message, calculates the parity data of the first stripe and the data of the second data block based on the RAID algorithm in the second I / O instruction, obtains the second data, and thus realizes the recovery of the second data. The second hard disk writes the second data into the host memory. After writing the second data into the host memory, it means that the second hard disk has completed the second I / O instruction. Therefore, the second hard disk sends an instruction completion message (i.e., the response message of the second I / O instruction) to the first hard disk through the high-speed interconnect bus to indicate that the execution was successful. Here, the second data block is a data block in the first stripe that is different from the first data block. For an introduction to the second data block, please refer to the description of scenario 1 above.
[0255] In the scenario where the hard drive where the data block indicated by the target address is located is the first hard drive, the first hard drive performs read and write tasks related to the target address. The specific process can be referred to the description of the second hard drive executing the second IO instruction above, which will not be repeated here.
[0256] If the first hard disk receives response messages for all second I / O instructions, and the first hard disk has also completed the read / write tasks related to the target address in the scenario where the hard disk containing the data block indicated by the target address is the first hard disk, it means that the first hard disk has completed the first I / O instruction. Therefore, the first hard disk sends an instruction completion message (i.e., the response message for the first I / O instruction) to the target hard disk via the high-speed interconnect bus to indicate successful execution.
[0257] S105: The target hard disk generates a response message for the target I / O instruction based on the response message of the first I / O instruction.
[0258] In a scenario where the hard drive containing the data block indicated by the target address carried by the target I / O instruction is the target hard drive, the target hard drive performs read and write tasks related to the target address. The specific process can be referred to the description of the second hard drive executing the second I / O instruction above, and will not be repeated here.
[0259] If the target hard disk receives response messages for all first I / O instructions and has completed the read / write tasks it needs to handle, it means the target hard disk has completed the target I / O instruction. Therefore, the target hard disk sends an instruction completion message (i.e., the response message for the target I / O instruction) to the host via the high-speed interconnect bus to indicate successful execution.
[0260] The target hard drive performs read and write tasks related to the data blocks on its own disk. This means the target hard drive itself also handles a portion of the data read and write tasks. This utilizes not only the resources of the first hard drive but also the resources of the target hard drive itself, allowing different parts of the data read and write task to be processed simultaneously by both drives, thus improving the overall execution efficiency. Furthermore, by having the target hard drive directly handle a portion of the data read and write tasks, the target hard drive avoids sending first I / O instructions to the first hard drive and receiving the execution results of those instructions. In other words, the completion time of this portion of the data read and write task does not include the communication time between the target and first hard drives, further improving its execution efficiency.
[0261] Optionally, from the time the target hard disk generates the first IO instruction until the target hard disk generates the response message for the target IO instruction, the target hard disk is also used to maintain the context of the first IO instruction. In this way, the task of maintaining the read and write task context when multiple hard disks are read and written can be offloaded from the host to the target hard disk, thereby reducing the workload of the host and releasing the host's resources, such as releasing the bandwidth resources occupied by maintaining the read and write task context.
[0262] In summary, in a data processing system, the host computer dispatches data read / write tasks to the target hard drive via I / O instructions. The completion of the target I / O instruction by the target hard drive is considered the completion of the data read / write task. Therefore, this technical solution offloads the data read / write tasks that would otherwise be executed by the host computer to the target hard drive, utilizing the target hard drive's resources (such as processing and storage resources) to perform the data read / write tasks. This reduces the host computer's workload and frees up its resources. Furthermore, by instructing the first hard drive to process a portion of the storage space indicated by multiple target addresses, the target hard drive effectively offloads a portion of the entire data read / write task to the first hard drive. This allows multiple hard drives to execute different parts of the entire data read / write task in parallel, thereby improving the overall execution efficiency of the data read / write task.
[0263] Furthermore, in this technical solution, the target hard drive instructs the first hard drive to complete a portion of the data read / write task by sending a portion of the task to the first hard drive in the form of an I / O instruction (specifically, a first I / O instruction). Therefore, the way the first hard drive completes a portion of the data read / write task is by completing the first I / O instruction. When the workload of the entire data read / write task is large, the target hard drive splits the entire data read / write task into multiple independent parts. By sending the first I / O instruction to multiple first hard drives respectively, the multiple first hard drives can execute different parts of the entire data read / write task in parallel, thereby improving the execution efficiency of the entire data read / write task. In the scenario of striped management of data stored in the first storage space, since multiple stripes are independent of each other, and data belonging to different stripes are also independent, the target address carried by the first I / O instruction is determined by stripe. This facilitates splitting the entire data read / write task into multiple independent parts, thereby realizing the allocation and data management of multiple parts, allowing multiple parts to be executed in parallel by multiple hard drives, improving the execution efficiency of the entire data read / write task.
[0264] In addition, in this technical solution, the first hard disk sends a response message of the first IO instruction to the target hard disk, enabling the target hard disk to obtain the processing status of the first IO instruction, so as to facilitate the target hard disk to grasp the overall processing status of the data read and write tasks.
[0265] This application also provides a chip system including a controller and a power supply circuit. The power supply circuit supplies power to the controller, and the controller performs the aforementioned operations. Figure 7 The data processing method involves operations performed by the target hard disk, or, in other words, by the controller to perform the aforementioned steps. Figure 7 The data processing method includes the operation steps performed by the first hard disk, or the controller is used to perform the aforementioned steps. Figure 7 The data processing steps are performed by the second hard drive. For simplicity, they will not be elaborated here. The controller can be implemented using computing devices or AI chips such as CPUs, DPUs, GPUs, NPUs, XPUs, system-on-chips (SoCs), offloading cards, and accelerator cards.
[0266] See Figure 10 , Figure 10 This is a schematic diagram of the structure of a storage device provided in an embodiment of this application. Figure 10 As shown, the storage device 1000 provided in this embodiment includes: a bus 1001, a processor 1002, a memory 1003, and a communication interface 1004. The processor 1002, the memory 1003, and the communication interface 1004 communicate with each other via the bus 1001. The storage device 1000 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the storage device 1000.
[0267] Bus 1001 can be a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a Unified Bus (Ubus or UB), a Compute Express Link (CXL) bus, a Cache Coherent Interconnect for Accelerators (CCIX) bus, etc. The Unified Bus is also known as the Lingqu Bus. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 10 The bus 1001 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 1001 may include a path for transmitting information between various components of the storage device 1000 (e.g., memory 1003, processor 1002, communication interface 1004).
[0268] The processor 1002 may include any one or more of the following computing devices: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP) or digital signal processor (DSP), ASIC, FPGA, CPLD, NPU, SoC, offload card, accelerator card, etc.
[0269] Memory 1003 may include volatile memory, such as random access memory (RAM). Processor 1002 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD). Furthermore, memory 1003 may also be implemented using storage class memory (SCM), phase change memory (PCM), or other types of storage media.
[0270] It is worth noting that the same type of storage medium can be configured in the same computing device to realize the function of memory 1003, or two or more types of storage media can be configured to realize the function of memory 1003. This application does not limit this.
[0271] The memory 1003 stores executable program code, and the processor 1002 executes the executable program code to implement the aforementioned. Figure 7 The data processing method involves operations performed by the target hard disk. In other words, the memory 1003 stores instructions for executing the data processing method.
[0272] Alternatively, the memory 1003 stores executable program code, and the processor 1002 executes the executable program code to implement the aforementioned functionality. Figure 7 The data processing method involves operations performed by the first hard disk. That is, the memory 1003 stores instructions for executing the data processing method.
[0273] Alternatively, the memory 1003 stores executable program code, and the processor 1002 executes the executable program code to implement the aforementioned functionality. Figure 7 The data processing method involves operations performed by the second hard disk. That is, the memory 1003 stores instructions for executing the data processing method.
[0274] The communication interface 1004 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the storage device 1000 and other storage devices or communication networks.
[0275] This application also provides a computer program product containing instructions. This computer program product may be a software or program product containing instructions, capable of running on a storage device or stored on any usable medium. When the computer program product runs on the storage device, it causes the storage device to perform the aforementioned actions. Figure 7 The steps performed by the target hard drive in the data processing method, or the aforementioned steps. Figure 7 The steps performed by the first hard disk in the data processing method, or the aforementioned steps, are executed. Figure 7 The steps performed by the second hard drive in the data processing method.
[0276] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any usable medium that a storage device can store, or a data storage device such as a data center containing one or more usable media. The usable medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that direct the storage device to perform the aforementioned actions. Figure 7The steps performed by the target hard drive in the data processing method, or the aforementioned steps. Figure 7 The steps performed by the first hard disk in the data processing method, or the aforementioned steps, are executed. Figure 7 The steps performed by the second hard drive in the data processing method.
[0277] It should be understood that in the embodiments of this application, "when," "...when," and "if" all refer to the device making corresponding processing under certain objective circumstances, and are not time-limited, nor do they require the device to make a judgment action, nor do they imply any other limitations.
[0278] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.
Claims
1. A data processing system, characterized in that, Includes the main unit and multiple hard drives. The plurality of hard disks are used to provide a plurality of physical blocks, the plurality of physical blocks constitute a first storage space, the plurality of hard disks include a target hard disk and a first hard disk, the target hard disk being different from the first hard disk; The target hard disk is used to receive target input / output (I / O) instructions from the host, wherein the target I / O instructions include multiple target addresses, the target addresses are used to indicate one or more physical blocks of the first storage space, and the target I / O instructions are used to instruct processing of the storage space indicated by the multiple target addresses; The target hard disk is also used to instruct the first hard disk to process the storage space indicated by a portion of the multiple target addresses according to the target I / O instructions.
2. The system according to claim 1, characterized in that, The target hard disk is specifically used to send a first I / O instruction to the first hard disk; The first I / O instruction is generated based on the target I / O instruction. The first I / O instruction carries a portion of the target addresses of the plurality of target addresses. The first I / O instruction is used to instruct the processing of the storage space indicated by the target address carried by the first I / O instruction.
3. The system according to claim 1 or 2, characterized in that, The first storage space was used to determine multiple stripes; The physical blocks indicated by the multiple target addresses belong to multiple target stripes, and the multiple target stripes belong to the multiple stripes. The multiple target stripes include one or more first stripes, and the first stripe is the stripe to which the physical block indicated by the target address carried by the first IO instruction belongs.
4. The system according to claim 3, characterized in that, The target hard disk is also used to determine the first hard disk based on the first stripe and / or the number of I / O instructions to be processed by the plurality of hard disks.
5. The system according to claim 4, characterized in that, The first hard disk is the hard disk that provides the check block in the first stripe.
6. The system according to claim 4, characterized in that, The first hard disk is the hard disk with the fewest I / O instructions to be processed among the plurality of hard disks.
7. The system according to any one of claims 1-6, characterized in that, The target hard disk is also used to process the storage space indicated by another portion of the target addresses of the plurality of target addresses according to the target IO instructions.
8. A data processing method, characterized in that, Applied to the data processing system as described in any one of claims 1-7, the data processing system comprising a host; the method comprising: The target hard disk in the data processing system receives target I / O instructions from the host, wherein the target I / O instructions include multiple target addresses and are used to instruct processing of the storage space indicated by the multiple target addresses; The target hard disk sends a first I / O instruction to the first hard disk in the data processing system. The first I / O instruction is generated by the target hard disk based on the target I / O instruction. The first I / O instruction carries a portion of the target addresses of the plurality of target addresses. The first I / O instruction is used to instruct the storage space indicated by the target address carried by the first I / O instruction to be processed.
9. The method according to claim 8, characterized in that, The data processing system includes multiple hard disks, which provide multiple physical blocks. The multiple physical blocks constitute a first storage space, which is used to determine multiple stripes. The physical blocks indicated by the multiple target addresses belong to multiple target stripes, and the multiple target stripes belong to the multiple stripes. The multiple target stripes include one or more first stripes, and the first stripe is the stripe to which the physical block indicated by the target address carried by the first IO instruction belongs.
10. The method according to claim 9, characterized in that, The method further includes: The target hard disk is determined based on the first stripe and / or the number of I / O instructions to be processed by the plurality of hard disks.
11. The method according to claim 10, characterized in that, The target hard disk is determined based on the first stripe, and / or the number of I / O instructions to be processed by the plurality of hard disks, including: The target hard drive determines that the hard drive containing the check block in the first stripe is the first hard drive.
12. The method according to claim 10, characterized in that, The target hard disk is determined based on the first stripe, and / or the number of I / O instructions to be processed by the plurality of hard disks, including: The target hard drive determines the hard drive with the fewest unprocessed I / O instructions among the plurality of hard drives as the first hard drive.
13. The method according to any one of claims 8-12, characterized in that, The method further includes: The target hard disk processes the storage space indicated by another portion of the multiple target addresses according to the target I / O instructions.
14. The method according to any one of claims 8-13, characterized in that, The method further includes: The target hard disk receives an instruction completion message from the first hard disk; The target hard disk sends a response message for the target I / O instruction to the host based on the instruction completion message.
15. A data processing method, characterized in that, The method is applied to a target hard drive, which is a hard drive in the data processing system according to any one of claims 1-7, the data processing system including a host; the method includes: The target hard disk receives a target I / O instruction from the host, wherein the target I / O instruction includes multiple target addresses and is used to instruct processing of the storage space indicated by the multiple target addresses; The target hard disk sends a first I / O instruction to the first hard disk in the data processing system. The first I / O instruction is generated by the target hard disk based on the target I / O instruction. The first I / O instruction carries a portion of the target addresses of the plurality of target addresses. The first I / O instruction is used to instruct the storage space indicated by the target address carried by the first I / O instruction to be processed.
16. The method according to claim 15, characterized in that, The data processing system includes multiple hard disks, which provide multiple physical blocks. These physical blocks constitute a first storage space, which is used to determine multiple stripes. The physical blocks indicated by the multiple target addresses belong to multiple target stripes, and the multiple target stripes belong to the multiple stripes. The multiple target stripes include one or more first stripes, where the first stripe is the stripe to which the physical block indicated by the target address carried by the first I / O instruction belongs. The method further includes: The target hard disk is determined based on the first stripe and / or the number of I / O instructions to be processed by the plurality of hard disks.
17. The method according to claim 16, characterized in that, The target hard disk is determined based on the first stripe, and / or the number of I / O instructions to be processed by the plurality of hard disks, including: The target hard drive determines that the hard drive containing the check block in the first stripe is the first hard drive.
18. The method according to claim 16, characterized in that, The target hard disk is determined based on the first stripe, and / or the number of I / O instructions to be processed by the plurality of hard disks, including: The target hard drive determines the hard drive with the fewest unprocessed I / O instructions among the plurality of hard drives as the first hard drive.
19. The method according to any one of claims 15-18, characterized in that, The method further includes: The target hard disk processes the storage space indicated by another portion of the multiple target addresses according to the target I / O instructions.
20. The method according to any one of claims 15-19, characterized in that, The method further includes: The target hard disk receives an instruction completion message from the first hard disk; The target hard disk sends a response message for the target I / O instruction to the host based on the instruction completion message.
21. A data processing method, characterized in that, Applied to a first hard disk, wherein the first hard disk is a hard disk in the data processing system as described in any one of claims 1-7, the method comprises: The first hard disk receives a first IO instruction from the target hard disk in the data processing system. The first IO instruction is used to instruct the storage space indicated by the target address carried by the first IO instruction to be processed. The first hard disk responds to the first IO instruction by sending an instruction completion message to the target hard disk.
22. A chip, characterized in that, It includes a controller and a power supply circuit, the power supply circuit being used to supply power to the controller, the controller being used to perform the method as described in any one of claims 15-20, or to perform the method as described in claim 21.
23. A storage device, characterized in that, The storage device includes a controller and a storage medium; The controller is configured to execute instructions stored in the storage medium to cause the storage device to perform the method as described in any one of claims 15-20, or to perform the method as described in any one of claims 21.