XOR calculation method, device and product for storage system

By directly loading data from the memory into the central processor register for XOR operation in the storage system, bypassing the cache, the problem of XOR operation affecting the performance of the storage system is solved, and the overall performance and efficiency are improved.

CN118394565BActive Publication Date: 2024-10-22INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410851666.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-22
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

When the existing storage system performs XOR operation, since the data needs to pass through the cache, the storage space of the cache is limited, which affects the performance of the storage system. Especially in the process of data storage and fault data recovery, it may cause other high-frequency faults. Business processing is affected.

Method used

By directly loading the data to be calculated from the memory into the register of the central processor for XOR operation in the storage controller, and writing the result directly into the memory, bypassing the cache and avoiding affecting the cache's processing of other high-frequency services, Improve the overall performance of the storage system.

Benefits of technology

It improves the performance of the storage system, avoids performance degradation caused by data bypassing the cache, improves the efficiency of XOR operations, and ensures efficient processing during data storage and fault recovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118394565B_ABST
    Figure CN118394565B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a XOR calculation method, device and product for a storage system, which belongs to the technical field of storage systems. The method is applied to a storage system, which includes a disk array and a storage controller of an independent disk structure with distributed parity or a disk structure with two types of stored parity codes. The storage controller includes a central processing unit and a memory. The method includes: when responding to a data storage instruction or executing a fault data recovery thread, the central processing unit obtains the data to be calculated from the memory and loads it into the register of the central processing unit; the central processing unit executes the XOR instruction to perform an XOR operation on the data to be calculated and generates an XOR operation result; the central processing unit stores the XOR operation result in the register in the memory; and writes the XOR operation result stored in the memory to the corresponding target location in the disk array. The embodiment of the present application aims to improve the performance of the storage system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of storage systems, and more specifically, to an XOR calculation method, device, and product for a storage system. Background Art

[0002] RAID (Redundant Array of Independent Disks) technology combines multiple hard disk devices into a disk array with larger capacity and better security. The stored data is divided into multiple segments and stored on different physical hard disk devices respectively. At the same time, copies of multiple important data are synchronized to different physical hard disk devices, thereby achieving a very good data redundancy backup effect.

[0003] With the demand for data storage in the process of data development, RAID technology has been widely used in storage systems. In RAID5 or RAID6 disk arrays, redundant data storage is achieved through parity check. Parity check obtains the check block by XOR calculation of the data blocks on the same strip. When there is a disk failure in RAID5 or 1 or 2 disk failures in RAID6, for any lost data block, XOR calculation can be performed based on parity check to recalculate the lost data block for data reconstruction.

[0004] However, in current storage systems, when the central processing unit obtains data that needs to be XOR-operated in the memory, it will first load the data into the cache. However, the storage space of the cache is limited. Loading the data that needs to be XOR-operated in the cache will cause other high-frequency business processing of the storage system to be affected, resulting in a decrease in the performance of the storage system. Summary of the invention

[0005] The embodiments of the present application provide a storage system XOR calculation method, device and product, aiming to improve the performance of the storage system.

[0006] In a first aspect, an embodiment of the present application provides an XOR calculation method for a storage system, which is applied to a storage system, wherein the storage system includes a disk array of an independent disk structure with distributed parity or a disk structure with two types of stored parity codes and a storage controller, wherein the storage controller includes a central processing unit and a memory, and the method includes:

[0007] In response to a data storage instruction or when executing a fault data recovery thread, the central processing unit obtains data to be operated from the memory and loads the data into a register of the central processing unit;

[0008] The central processing unit executes an XOR instruction to perform an XOR operation on the data to be operated, and generates an XOR operation result;

[0009] The central processing unit stores the XOR operation result in the register in a memory;

[0010] The XOR operation result stored in the memory is written into a corresponding target location in the disk array.

[0011] Optionally, the central processing unit obtains the data to be operated from the memory and loads the data into a register of the central processing unit, including:

[0012] The central processing unit executes a first non-temporary storage instruction to obtain the data to be calculated from the memory and load it into the register of the central processing unit. The first non-temporary storage instruction is used to load the data to be calculated stored in the memory into the register without passing through a cache.

[0013] Optionally, the central processing unit stores the XOR operation result in the register in a memory, comprising:

[0014] The central processing unit executes a second non-temporal storage instruction to store the XOR operation result in the register in the memory, and the second non-temporal storage instruction is used to load the XOR operation result stored in the register into the register without passing through the cache.

[0015] Optionally, the storage controller includes a plurality of central processing units, and after any central processing unit stores the XOR operation result in the register in a memory, the method further includes:

[0016] The central processing unit executes a memory barrier instruction, where the memory barrier instruction is used to enable the multiple central processing units to know the XOR operation result written into the memory by the central processing unit.

[0017] Optionally, before the central processing unit obtains the data to be operated from the memory and loads the data into the register of the central processing unit, the method further includes:

[0018] In response to a data storage instruction issued by any host, the storage controller obtains the data to be stored, divides the data to be stored into a plurality of data blocks, and stores the plurality of data blocks as the data to be calculated in the memory.

[0019] Optionally, the central processing unit executes an XOR instruction to perform an XOR operation on the data to be operated to generate an XOR operation result, including:

[0020] The central processing unit executes an XOR instruction to perform an XOR operation on the multiple data blocks to generate a check block corresponding to the data to be stored;

[0021] The central processing unit stores the XOR operation result in the register in a memory, including:

[0022] The central processing unit stores the generated check blocks corresponding to the data to be stored in the memory.

[0023] Optionally, the method further comprises:

[0024] The storage controller writes the data to be stored stored in the memory into the disk array according to the logical address corresponding to the data to be stored and the redundancy level adopted by the disk array of the storage system;

[0025] Writing the XOR operation result stored in the memory to a corresponding target location in the disk array includes:

[0026] According to the redundancy level adopted by the disk array of the storage system, a target position corresponding to the check block corresponding to the data to be stored is determined, and the check block corresponding to the data to be stored stored in the memory is written into the target position in the disk array.

[0027] Optionally, before the central processing unit obtains the data to be operated from the memory and loads the data into the register of the central processing unit, the method further includes:

[0028] In response to a data storage instruction issued by any host, the storage controller obtains the data to be stored, and reads the data blocks in the target stripe and the check blocks in the target stripe corresponding to the data to be stored in the disk array according to the logical address of the data to be stored, and stores the data to be stored, the data blocks in the target stripe and the check blocks in the target stripe as the data to be calculated in the memory.

[0029] Optionally, the central processing unit executes an XOR instruction to perform an XOR operation on the data to be operated to generate an XOR operation result, including:

[0030] The central processing unit executes an XOR instruction to perform an XOR operation on the data to be stored and the data blocks in the target stripe to generate a first XOR operation result;

[0031] The central processing unit executes an XOR instruction to perform an XOR operation on the first XOR operation result and the check block in the target stripe to generate an updated check block;

[0032] The central processing unit stores the XOR operation result in the register in a memory, including:

[0033] The central processing unit stores the generated updated check block in a memory.

[0034] Optionally, the method further comprises:

[0035] The storage controller writes the data to be stored stored in the memory into the disk array according to the logical address corresponding to the data to be stored and the redundancy level adopted by the disk array of the storage system;

[0036] Writing the XOR operation result stored in the memory to a corresponding target location in the disk array includes:

[0037] The storage position of the check block in the target stripe in the disk array is used as the target position, and the updated check block stored in the memory is written into the target position in the disk array to cover the check block in the target stripe.

[0038] Optionally, before the central processing unit obtains the data to be operated from the memory and loads the data into the register of the central processing unit, the method further includes:

[0039] Detecting whether there is any failed disk in the disk array, or when the storage system includes a disk array having a disk structure of the two types of stored parity check codes, detecting whether there are two failed disks in the disk array;

[0040] When there is a faulty disk in the disk array, a faulty data recovery thread is executed, including:

[0041] The storage controller obtains all data blocks and check blocks in the stripe where any failed data block in the failed disk is located, and stores all data blocks and check blocks in the stripe where the failed data block is located as the data to be calculated in the memory.

[0042] Optionally, the central processing unit executes an XOR instruction to perform an XOR operation on the data to be operated to generate an XOR operation result, including:

[0043] The central processing unit executes an XOR instruction to perform an XOR operation on all data blocks and check blocks in the stripe where the faulty data block is located, and generates a reconstructed data block corresponding to the faulty data block;

[0044] The central processing unit stores the XOR operation result in the register in a memory, including:

[0045] The central processing unit stores the generated reconstructed data block in a memory.

[0046] Optionally, writing the XOR operation result stored in the memory to a corresponding target location in the disk array includes:

[0047] When the failed disk recovers from the failure, the location where the failed data block is stored in the disk array is used as the target location corresponding to the reconstructed data block;

[0048] The reconstructed data block stored in the memory is rewritten to a target location in the disk array.

[0049] Optionally, the method further comprises:

[0050] In response to the stripe verification operation, all data blocks and verification blocks in the stripe to be verified are obtained in the disk array and stored in the memory;

[0051] The central processing unit obtains the stripe to be checked from the memory and loads it into the register of the central processing unit. The central processing unit executes an XOR instruction to perform an XOR operation on all data blocks in the stripe to be checked to generate a current check block.

[0052] When the current check block of the stripe to be checked is inconsistent with the check block, the current check block is stored in the memory, and the check block is updated with the current check block of the stripe to be checked in the disk array.

[0053] Optionally, the method further comprises:

[0054] In response to a target operation instruction sent by any host, the central processing unit directly reads the target data corresponding to the target operation instruction from the memory to bypass the cache of the storage controller;

[0055] The target operation instruction is an operation instruction for user data, and the target operation instruction includes a read operation instruction for any target data.

[0056] In a second aspect, an embodiment of the present application provides an XOR computing device for a storage system, which is applied to a storage system, wherein the storage system includes a disk array of an independent disk structure with distributed parity or a disk structure with two types of stored parity codes and a storage controller, wherein the storage controller includes a central processing unit and a memory, and the device includes a disk array writing module and a data loading module to be calculated, an XOR computing module, and a memory storage module arranged on the central processing unit, wherein:

[0057] A data loading module for operation, used for obtaining the data to be operated from the memory and loading it into the register of the central processing unit when responding to a data storage instruction or executing a fault data recovery thread;

[0058] An XOR operation module, used for executing an XOR instruction to perform an XOR operation on the data to be operated, and generating an XOR operation result;

[0059] A memory storage module, used for storing the XOR operation result in the register in a memory;

[0060] The disk array writing module is used to write the XOR operation result stored in the memory to the corresponding target position in the disk array.

[0061] In a third aspect, an embodiment of the present application provides a storage system, which includes a disk array of an independent disk structure with distributed parity or a disk structure with two types of stored parity codes and a storage controller, wherein the storage controller includes a central processing unit and a memory, and the storage system is used to execute the XOR calculation method of the storage system described in the first aspect of the embodiment.

[0062] In a fourth aspect, an embodiment of the present application provides a computer device, comprising: at least one processor, and a memory, wherein the memory stores a computer program that can be run on the processor, wherein when the processor executes the computer program, the XOR calculation method of the storage system described in the first aspect of the embodiment is performed.

[0063] In a fifth aspect, an embodiment of the present application provides a non-volatile readable storage medium, wherein the non-volatile readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the XOR calculation method of the storage system described in the first aspect of the embodiment is performed.

[0064] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the XOR calculation method of the storage system described in the first aspect of the embodiment.

[0065] Beneficial effects:

[0066] In response to a data storage instruction or executing a fault data recovery thread, the central processing unit obtains the data to be calculated from the memory and loads it into the register of the central processing unit; the central processing unit executes an XOR instruction to perform an XOR operation on the data to be calculated to generate an XOR operation result; the central processing unit stores the XOR operation result located in the register in the memory; and writes the XOR operation result stored in the memory to a corresponding target location in the disk array.

[0067] By directly loading the data to be operated that needs to participate in the XOR operation stored in the memory into the register of the central processing unit, the data to be operated bypasses the cache, avoiding affecting the cache's accelerated processing of other high-frequency services of the storage system, which can improve the overall performance of the storage system. In addition, the central processing unit executes the XOR instruction in the MMX logical operation instruction to perform the XOR operation, which can improve the efficiency of the XOR operation and further improve the performance of the storage system. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art.

[0069] Figure 1 A flowchart showing the steps of the XOR calculation method of the storage system provided by an embodiment of the present application is shown;

[0070] Figure 2 A transmission schematic diagram of an XOR calculation method of a storage system provided in an embodiment of the present application is shown;

[0071] Figure 3 A functional module diagram of an XOR computing device of a storage system provided by an embodiment of the present application is shown;

[0072] Figure 4 A schematic diagram of the structure of a storage system provided in an embodiment of the present application is shown;

[0073] Figure 5 A schematic diagram of a computer device provided in an embodiment of the present application is shown;

[0074] Figure 6 A schematic diagram of a non-volatile readable storage medium provided in an embodiment of the present application is shown;

[0075] Figure 7 A schematic diagram of a computer program product provided by an embodiment of the present application is shown. DETAILED DESCRIPTION

[0076] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0077] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, each embodiment of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in each embodiment of the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not constitute any limitation, and the various embodiments can be combined with each other and referenced to each other without contradiction.

[0078] RAID: Redundant Array of Independent Disks, Redundant Array of Independent Disks;

[0079] CPU: Central Processing Unit, central processing unit;

[0080] RAID5: independent disk structure with distributed parity;

[0081] RAID6: A disk structure with two types of stored parity codes.

[0082] A disk array composed of multiple disks using RAID technology can read and write data on multiple disks concurrently to improve the read and write performance of the storage system. RAID5 and RAID6 are currently the most common RAID levels. RAID5 uses parity to provide redundant data backup. Data is stored in stripes on multiple disks in the disk array. Parity blocks are also distributed on all disks in the disk array, and no dedicated check disk is used. When a disk in a RAID5 disk array is damaged, the damaged data can be rebuilt based on other data blocks in the same stripe and the corresponding check blocks.

[0083] Similar to RAID5, RAID6 also uses parity to achieve redundant data storage, but RAID6 introduces double parity and adds a second independent parity block. Therefore, when two disks in the disk array are damaged, the data on the two damaged disks can still be recovered, and the data reliability is very high.

[0084] The parity check block is obtained by performing an XOR operation on the data blocks at the same position on other hard disk drives. The XOR algorithm is a method of exchange between binary values. Its operation symbol is XOR, or represented by "⊕". There are four XOR operation combinations: 0⊕0=0, 0⊕1=1, 1⊕0=1, 1⊕1=0, and the XOR operation has the following characteristics:

[0085] 1. The result of the operation is independent of the order of operations; for example, (a⊕b)⊕c=a⊕(b⊕c);

[0086] 2. The data and results involved in the operation are circularly symmetric; for example, if a⊕b⊕c=d, then:

[0087] a=b⊕c⊕d; b=a⊕c⊕d; c=a⊕b⊕d;

[0088] Therefore, in RAID5 or RAID6, when any disk fails and is damaged, for any data block on the disk, the lost data block can be recalculated by performing XOR calculation based on other data blocks and check blocks on the stripe where the data block is located.

[0089] In actual applications, whether it is when generating a check block during data storage in a disk array or in the data reconstruction process after a disk failure, the data of the disk array will be read into the memory for an XOR operation.

[0090] However, due to the high processing speed of the CPU and the relatively low processing speed of the memory, the CPU will have to wait when accessing the memory, resulting in low processing efficiency. In order to solve this problem, in the existing storage system processing architecture, a cache is set between the CPU and the memory. For example, it includes a hierarchical structure of a first-level cache (L1 Cache), a second-level cache (L2Cache), and a third-level cache (L3 Cache). When the CPU writes or reads data to the memory, the data is also stored in the cache memory. When the CPU needs the data again, the CPU reads the data from the cache memory instead of accessing the slower memory.

[0091] Cache can significantly improve the data processing efficiency of the CPU, but the storage space of the cache is limited. If the cache stores data that is not frequently accessed, other useful data in the cache will be evicted from the cache to a lower memory hierarchy. That is, if the data to be processed by the CPU is continuously written into the cache, other frequently accessed data in the cache will inevitably be eliminated. When the CPU accesses these eliminated frequently accessed data, it will have to write them into the cache again, which will introduce additional operation time overhead and affect the overall performance of the storage system.

[0092] In addition, to ensure data consistency between the cache and the memory, there are two main ways to synchronize the CPU's cache write operations to the memory: write-through and write-back. However, no matter which synchronization method is used, it will consume performance and cause the performance of the storage system to deteriorate.

[0093] Therefore, in order to improve the performance of the storage system, an embodiment of the present application provides an XOR calculation method for the storage system.

[0094] Reference Figure 1 , shows a flowchart of the steps of an XOR calculation method for a storage system provided by an embodiment of the present application, the method is applied to a storage system, the storage system includes a RAID5 or RAID6 disk array and a storage controller, the storage controller includes a CPU and a memory, and the method may include the following steps:

[0095] S101: In response to a data storage instruction or when executing a fault data recovery thread, the central processing unit obtains data to be operated from the memory and loads the data into a register of the central processing unit.

[0096] In the actual implementation process, a storage system using RAID5 or RAID6 disk arrays needs to read data into the memory and then perform XOR operations, whether it is a normal data storage process or a data reconstruction process after a disk failure. The data flow pressure will continue to increase, and the data involved in the XOR operation is actually used once by the CPU of the storage controller and will not be read again in a short period of time. Even in the scenario of double disk failure in RAID6, the same data block may participate in two XOR operations, but usually the time for the same data to participate in the XOR operation is not continuous, and even if any data in the RAID6 disk array participates in two XOR operations, whether the data is written to the cache has little effect on the performance of the storage system, because the cache can only have an acceleration effect on data that is frequently accessed by the CPU.

[0097] For example, a stripe (one-Nth of a stripe) in a RAID6 disk array is assumed to be 128K. For a disk array consisting of 8 disks, the data size of a full stripe is 1M. This amount of data may drive other frequently accessed data out of the cache. Even if a full stripe of 1M is written to the cache, by the time the data on the stripe participates in the second XOR calculation, it may have been replaced by other data and eliminated from the cache.

[0098] Therefore, in this embodiment, when a storage system using a RAID5 or RAID6 disk array performs an XOR operation, the CPU of the storage controller directly reads the data to be calculated from the memory and loads it into the CPU register to prepare for the XOR calculation, so that the data to be calculated bypasses the cache, avoiding affecting the cache's accelerated processing of other high-frequency services of the storage system.

[0099] The data to be calculated varies depending on the scenario in which the XOR operation needs to be performed. For example, during data storage, the data to be calculated may be multiple data blocks of data to be stored, and a check block is obtained through the XOR operation. It may also be other data blocks and check blocks on the stripe where any lost data is located during the data recovery process of a failed disk.

[0100] In a feasible implementation manner, the CPU obtains the data to be operated from the memory and loads the data into the register of the CPU, including:

[0101] The central processing unit executes a first non-temporary storage instruction, obtains the data to be operated from the memory, and loads it into the register of the central processing unit. The first non-temporary storage instruction is used to load the data to be operated stored in the memory into the register without passing through the cache. The first non-temporary storage instruction may include a MOVNTQ / MOVNTDQ instruction.

[0102] For example, the CPU executes a MOVNTDQ instruction to obtain the data to be operated from the memory and loads the data into an xmm register of the CPU.

[0103] The MOVNTQ / MOVNTDQ instructions (Non-temporal Store of Packed Integers to an MMX Technology or Streaming SIMD Extension Register) enable data reads and writes from registers to memory that are implicitly weakly ordered and do no write allocation, thereby minimizing cache pollution.

[0104] The xmm register is set in the x86 series CPU and is a 128-bit register. It is part of the SSE (Streaming SIMD Extensions) instruction set. Compared with other general registers, the xmm register can store more data at the same time and can perform more efficient data processing. Therefore, using xmm registers for data processing is faster; in 64-bit mode, the CPU supports 16 xmm registers, represented by xmm0 to xmm15; in 32-bit mode, the CPU supports 8 xmm registers, represented by xmm0 to xmm7.

[0105] For example, the instruction form for executing the MOVNTDQ instruction is:

[0106] __asm____volatile__(

[0107] "movntdqa(%0,%1),%%xmm0)"

[0108] Among them, % indicates the read parameter of the instruction; %% indicates the identifier of the register.

[0109] S102: The central processing unit executes an XOR instruction to perform an XOR operation on the data to be operated, and generates an XOR operation result.

[0110] Specifically, the CPU may execute an MMX proprietary logic instruction: a pxor exclusive OR instruction to perform an exclusive OR operation on the data to be operated, and the pxor exclusive OR instruction has the following instruction format:

[0111] __asm__ __volatile__(

[0112] "pxor(%0,%1),%%xmm0" )

[0114] Among them, % indicates the read parameter of the instruction; %% indicates the identifier of the register.

[0115] After the data to be operated is loaded into the CPU's xmm register, the CPU can execute the pxor exclusive-OR instruction to perform an exclusive-OR operation on the data to be operated. The MMX instruction set is an instruction system containing 47 instructions under the x86 architecture, which are divided into data transmission, arithmetic operations, comparisons, conversions, shifts, and logic processing. By using the MMX proprietary logic instruction pxor instead of xor to perform an exclusive-OR operation, the efficiency of the exclusive-OR operation in a storage system using a RAID5 or RAID6 disk array can be accelerated, further improving the performance of the storage system.

[0116] S103: The central processing unit stores the XOR operation result in the register in a memory.

[0117] After the CPU bypasses the cache and performs an XOR operation on the data to be operated using the PXOR instruction, the XOR operation result stored in the CPU register can be directly written into the memory.

[0118] Specifically, the central processing unit executes a second non-temporary storage instruction to store the XOR operation result located in the register in the memory, and the second non-temporary storage instruction is used to load the XOR operation result stored in the register into the register without passing through the cache, and the second non-temporary storage instruction includes a MOVNTQ / MOVNTDQ instruction.

[0119] For example, in a feasible implementation, when the CPU executes the MOVNTDQ instruction, obtains the data to be operated from the memory and loads it into the xmm register of the CPU, and generates an XOR operation result through the pxor XOR instruction, the CPU can execute the MOVNTDQ instruction to store the XOR operation result located in the xmm register in the memory.

[0120] The CPU executes the MOVNTDQ instruction to store the XOR operation result in the xmm register in the memory. The instruction format is:

[0121] __asm__ __volatile__(

[0122] "movntdq %%xmm0,(%0,%1)" )

[0124] Among them, % indicates the read parameter of the instruction; %% indicates the identifier of the register.

[0125] In a feasible implementation, the storage system includes multiple CPU cores. In a multi-core CPU scenario, each CPU core generally has the shortest access latency to the local node cache, while the access latency to the non-local node cache will be affected by the on-chip interconnection structure and relative position. Each CPU core has a private first-level cache and a shared last-level cache. The private cache mechanism ensures that the CPU core in the local node has exclusive access to the cache resources of the local node. However, different caches may store different copies of the same data, which will seriously affect the consistency of processing by different CPU cores. Therefore, a cache consistency protocol is used in the storage system with multiple CPU cores to ensure that each CPU core shares data.

[0126] In this embodiment, the CPU of the storage controller directly reads the data to be calculated from the memory and loads it into the CPU register to prepare for XOR calculation, and the obtained XOR calculation result is also directly written into the memory, that is, the data to be calculated does not enter the cache, so the cache consistency protocol cannot be used to ensure that each CPU core shares the data.

[0127] Therefore, when the storage controller includes multiple CPUs, after any CPU stores the XOR operation result located in the register in the memory, the CPU executes a memory barrier instruction, and the memory barrier instruction is used to enable the multiple CPUs to know the XOR operation result written by the CPU into the memory.

[0128] Specifically, the memory barrier instruction is a store barrier instruction, which can make the XOR operation result stored in the memory visible to other CPUs to avoid data inconsistency problems.

[0129] For example, the instruction format for the CPU to execute a store barrier instruction is:

[0130] __asm__ __volatile__(

[0131] "sfence" ::: "memmory" )

[0133] Among them, memmory represents memory.

[0134] S104: Writing the XOR operation result stored in the memory into a corresponding target location in the disk array.

[0135] Different data to be calculated participating in the XOR operation will generate different XOR operation results. For example, during data storage, if the data to be calculated is multiple data blocks of data to be stored, the XOR operation result obtained through the XOR operation is the check block in the stripe corresponding to the data to be calculated; during the fault data recovery process of a failed disk, if the data to be calculated is other data blocks and check blocks on the stripe where any lost data block is located, the XOR operation result obtained through the XOR operation is the lost data block.

[0136] Reference Figure 2 , showing a transmission schematic diagram of the XOR calculation method of the storage system provided in an embodiment of the present application, when the CPU reads the data to be calculated, it does not pass through the cache, but directly reads the data to be calculated in the memory and loads it into the register of the CPU; when the CPU generates the XOR operation result, the CPU writes the XOR operation result in the register directly to the memory, and does not pass through the cache, thereby avoiding the problem of frequently accessed data in the cache being eliminated due to the space occupation of the cache by one-time access or infrequently accessed data, thereby improving the overall performance of the storage system.

[0137] In a feasible implementation manner, during the process of storing data in the disk array, the XOR calculation method of the storage system includes the following steps:

[0138] S11: In response to a data storage instruction issued by any host, the storage controller obtains data to be stored, divides the data to be stored into a plurality of data blocks, and stores the plurality of data blocks as the data to be calculated in the memory.

[0139] Specifically, the storage controller includes an IO card. When any host issues a data storage instruction, the IO card places the data to be stored in the memory, and the host carries the logical address corresponding to the data to be stored when issuing the data storage instruction.

[0140] When the data to be stored can generate a full stripe after parity check in RAID5 or RAID6, the data to be stored can be divided into multiple data blocks, the number of data blocks is the total number of disks in the disk array - 1, and then the multiple data blocks of the data to be stored are used as data to be calculated.

[0141] S12: The CPU executes the MOVNTDQ instruction to obtain the data to be operated from the memory and loads the data into the xmm register of the CPU.

[0142] S13: The CPU executes the pxor exclusive-OR instruction to perform an exclusive-OR operation on the multiple data blocks, and generates a check block corresponding to the data to be stored as an exclusive-OR operation result.

[0143] S14: The CPU executes the MOVNTDQ instruction to store the XOR operation result in the xmm register in the memory.

[0144] That is, the CPU stores the generated check block corresponding to the data to be stored in the memory.

[0145] S15: The storage controller writes the data to be stored stored in the memory into the disk array according to the logical address corresponding to the data to be stored and the redundancy level adopted by the disk array of the storage system, that is, the RAID level, such as RAID5 or RAID6; and determines the target position corresponding to the check block corresponding to the data to be stored according to the redundancy level adopted by the disk array of the storage system, and writes the check block corresponding to the data to be stored stored in the memory into the target position in the disk array.

[0146] In a feasible implementation manner, during the process of storing data in the disk array, the XOR calculation method of the storage system includes the following steps:

[0147] S21: In response to a data storage instruction issued by any host, the storage controller obtains the data to be stored, and reads the data blocks in the target stripe and the check blocks in the target stripe corresponding to the data to be stored in the disk array according to the logical address of the data to be stored, and stores the data to be stored, the data blocks in the target stripe and the check blocks in the target stripe as the data to be calculated in the memory.

[0148] In the actual implementation process, if the data to be stored needs to be merged into the data blocks stored in other stripes, the logical address of the data to be stored can be obtained, and the data blocks in the target stripe corresponding to the data to be stored and the check blocks in the target stripe can be read in the disk array, and the new check blocks after storage can be recalculated.

[0149] For example, when the data block in the target stripe corresponding to the data to be stored New Data is read in the disk array according to the logical address of the data to be stored and the data Old Data is already stored, the Old Data and the check block of the target stripe are read in the disk array and stored in the memory as the data to be calculated.

[0150] S22: The CPU executes the MOVNTDQ instruction to obtain the data to be operated from the memory and loads the data into the xmm register of the CPU.

[0151] S23: The CPU executes a pxor exclusive-OR instruction to perform an exclusive-OR operation on the data to be stored and the data blocks in the target stripe, and generates a first exclusive-OR operation result.

[0152] In order to avoid the read consumption and XOR operation cost caused by taking out all the data blocks in the target stripe corresponding to the data New Data to be stored and obtaining new check blocks, an XOR calculation can be performed on the data New Data to be stored and the data blocks in the target stripe that already store the data Old Data, and the XOR difference is obtained as the first XOR operation result.

[0153] S24: The CPU executes a pxor XOR instruction to perform an XOR operation on the first XOR operation result and the check block in the target stripe to generate an updated check block.

[0154] The XOR difference between the data New Data to be stored and the data Old Data already stored in the data block in the target stripe is XORed with the check block in the target stripe to obtain the updated check block in the target stripe.

[0155] In a RAID5 disk array, only one check block needs to be updated, while in a RAID6 disk array, both check blocks need to be updated.

[0156] S25: The CPU executes the MOVNTDQ instruction to store the XOR operation result in the xmm register in the memory.

[0157] That is, the CPU stores the generated updated check block in the memory.

[0158] S26: The storage controller writes the data to be stored stored in the memory into the disk array according to the logical address corresponding to the data to be stored and the redundancy level adopted by the disk array of the storage system; and uses the storage position of the check block in the target stripe in the disk array as the target position, and writes the updated check block stored in the memory into the target position in the disk array, overwriting the check block in the target stripe.

[0159] In a feasible implementation, during fault data recovery, if a disk failure occurs in the storage system, such as when the disk is unplugged or the disk is detected to be unresponsive, a fault data recovery thread will be automatically started.

[0160] Specifically, it is detected whether there is any faulty disk in the disk array, or whether there are two faulty disks in the RAID6 disk array; when there is a faulty disk in the disk array, a faulty data recovery thread is executed, including the following steps:

[0161] S31: The storage controller obtains all data blocks and check blocks in the stripe where any faulty data block in the faulty disk is located, and stores all data blocks and check blocks in the stripe where the faulty data block is located as the data to be calculated in the memory.

[0162] For example, when a stripe in a RAID5 disk array includes data blocks A1, A2, A3, A4 and a check block P, if a faulty disk causes data block A1 to be lost, the faulty data block A1 is reconstructed by performing XOR calculation on data blocks A2, A3, A4 and check block P:

[0163] A1=A2⊕A3⊕A4⊕P

[0164] Alternatively, if the failed disk causes the loss of the parity block P, the lost parity block P can be reconstructed by obtaining data blocks A1, A2, A3, and A4 and performing XOR calculations:

[0165] P=A1⊕A2⊕A3⊕A4.

[0166] S32: The CPU executes the MOVNTDQ instruction to obtain the data to be operated from the memory and loads the data into the xmm register of the CPU.

[0167] S33: the CPU executes a pxor exclusive-OR instruction to perform an exclusive-OR operation on all data blocks and check blocks in the stripe where the faulty data block is located, to generate a reconstructed data block corresponding to the faulty data block;

[0168] S34: The CPU executes the MOVNTDQ instruction to store the XOR operation result in the xmm register in the memory.

[0169] That is, the CPU stores the generated reconstructed data block in the memory.

[0170] S35: After the failed disk recovers from the failure, the location where the failed data block is stored in the disk array is used as the target location corresponding to the reconstructed data block; and the reconstructed data block stored in the memory is rewritten to the target location in the disk array.

[0171] In the actual implementation process, when the failed disk is not restored, as long as there is hot spare space in the disk array, such as a hot spare disk, the lost data in the failed disk can be reconstructed and stored in the hot spare space.

[0172] In a feasible implementation, the storage system inspects the stripes in the disk array. During the inspection, all data blocks in the same stripe are obtained for XOR operation, and the newly obtained check block is compared with the check block of the stripe to see if they are consistent.

[0173] Specifically, in response to a stripe verification operation, all data blocks and verification blocks in the stripe to be verified are obtained in the disk array and stored in the memory; the CPU obtains the stripe to be verified from the memory and loads it into the register of the CPU, and the CPU executes a pxor exclusive-OR instruction to perform an exclusive-OR operation on all data blocks in the stripe to be verified to generate a current verification block; when the current verification block of the stripe to be verified is inconsistent with the verification block, the current verification block is stored in the memory, and the verification block in the disk array is updated with the current verification block of the stripe to be verified.

[0174] That is, during the stripe inspection process, the stripe data will not pass through the cache, and will not affect the data in the cache that needs to be frequently accessed.

[0175] Specifically, in response to a target operation instruction issued by any host, the CPU directly reads the target data corresponding to the target operation instruction from the memory to bypass the cache of the storage controller. The target operation instruction is an operation instruction for user data, and the target operation instruction includes a read operation instruction for any target data.

[0176] In the actual implementation process, in addition to the data that requires the CPU to perform XOR operations, the operation process for user data can also bypass the cache, because the user data has a low heat or frequent access probability in the spatial and temporal dimensions, so it does not affect the high-performance operation of the storage system in the cache. The data that allows bypassing the cache can be customized according to the needs of the actual implementation. For example, it can be a read operation instruction for any target data. The CPU can bypass the cache and directly obtain the target data read from the disk array from the memory, and then return the target data to the host that reads the data. In the heterogeneous computing method of the storage system provided in this embodiment, by using the MOVNTDQ instruction, the one-time access or infrequently accessed data to be calculated is directly loaded into the CPU's xmm register for XOR operation, bypassing the cache, or the XOR operation result is directly refreshed to the memory through the MOVNTDQ instruction, avoiding the pollution of the CPU's cache, avoiding the impact of the cache on the accelerated processing of other high-frequency services of the storage system, and improving the overall performance of the storage system;

[0177] 2. The XOR operation is performed by using the MMX proprietary logic instruction pxor instead of xor, making the XOR operation more efficient, thereby improving the efficiency of the Raid56 XOR operation and further improving the overall performance of the storage system.

[0178] Reference Figure 3, shows a functional module diagram of an XOR computing device of a storage system provided by an embodiment of the present application, which is applied to a storage system, wherein the storage system includes a disk array of an independent disk structure with distributed parity check or a disk structure with two types of stored parity check codes and a storage controller, wherein the storage controller includes a central processing unit and a memory, and the device includes a data loading module 100 to be calculated, an XOR computing module 200, a memory storage module 300 and a disk array writing module 400, wherein the data loading module 100 to be calculated, the XOR computing module 200 and the memory storage module 300 are arranged on the central processing unit, specifically:

[0179] The data loading module 100 is used for the central processing unit to obtain the data to be operated from the memory and load it into the register of the central processing unit when responding to the data storage instruction or executing the fault data recovery thread;

[0180] XOR operation module 200, used for the central processing unit to execute XOR instruction to perform XOR operation on the data to be operated, and generate XOR operation result;

[0181] A memory storage module 300, used for the central processing unit to store the XOR operation result located in the register in a memory;

[0182] The disk array writing module 400 is used to write the XOR operation result stored in the memory to the corresponding target position in the disk array.

[0183] Optionally, the to-be-calculated data loading module includes:

[0184] A loading unit is used to execute a first non-temporary storage instruction, obtain the data to be operated from the memory, and load it into the register of the central processing unit. The first non-temporary storage instruction is used to load the data to be operated stored in the memory into the register without passing through the cache.

[0185] Optionally, the memory storage module includes:

[0186] A memory storage unit is used to execute a second non-temporary storage instruction to store the XOR operation result located in the register in the memory, and the second non-temporary storage instruction is used to load the XOR operation result stored in the register into the register without passing through the cache.

[0187] Optionally, the storage controller includes multiple CPUs, and the CPU also includes:

[0188] A memory barrier module is used to execute a memory barrier instruction, wherein the memory barrier instruction is used to enable the multiple central processing units to know the XOR operation results written into the memory by the central processing unit.

[0189] Optionally, the device further comprises:

[0190] The first module for determining data to be calculated is used for responding to a data storage instruction issued by any host, the storage controller obtains the data to be stored, divides the data to be stored into multiple data blocks, and stores the multiple data blocks as the data to be calculated in the memory.

[0191] Optionally, the XOR operation module includes:

[0192] A first XOR operation unit, configured to execute an XOR instruction to perform an XOR operation on the plurality of data blocks to generate a check block corresponding to the data to be stored;

[0193] The memory storage module comprises:

[0194] The first memory storage unit is used to store the generated check block corresponding to the data to be stored in the memory.

[0195] Optionally, the disk array writing module further includes:

[0196] The first writing unit is used to write the data to be stored stored in the memory into the disk array according to the logical address corresponding to the data to be stored and the redundancy level adopted by the disk array of the storage system; determine the target position corresponding to the check block corresponding to the data to be stored according to the redundancy level adopted by the disk array of the storage system, and write the check block corresponding to the data to be stored stored in the memory into the target position in the disk array.

[0197] Optionally, the device further comprises:

[0198] The second module for determining data to be calculated is used to respond to a data storage instruction issued by any host, the storage controller obtains the data to be stored, and reads the data blocks in the target stripe and the check blocks in the target stripe corresponding to the data to be stored in the disk array according to the logical address of the data to be stored, and stores the data to be stored, the data blocks in the target stripe and the check blocks in the target stripe as the data to be calculated in the memory.

[0199] Optionally, the XOR operation module includes:

[0200] A second XOR operation unit is configured to execute an XOR instruction to perform an XOR operation on the data to be stored and the data block in the target stripe to generate a first XOR operation result; execute an XOR instruction to perform an XOR operation on the first XOR operation result and the check block in the target stripe to generate an updated check block;

[0201] The memory storage module comprises:

[0202] The second memory storage unit is used to store the generated updated check block in the memory.

[0203] Optionally, the disk array writing module further includes:

[0204] A second writing unit is used to write the data to be stored stored in the memory into the disk array according to the logical address corresponding to the data to be stored and the redundancy level adopted by the disk array of the storage system; use the storage position of the check block in the target stripe in the disk array as the target position, write the updated check block stored in the memory into the target position in the disk array, and overwrite the check block in the target stripe.

[0205] Optionally, the device further comprises:

[0206] A first fault detection module is used to detect whether there is any faulty disk in the disk array, or when the storage system includes a disk array of the disk structure of the two types of stored parity check codes, detect whether there are two faulty disks in the disk array;

[0207] A first fault recovery module, configured to execute a fault data recovery thread when there is a faulty disk in the disk array;

[0208] The third module for determining data to be calculated is used for the storage controller to obtain all data blocks and check blocks in the stripe where any faulty data block in the faulty disk is located, and store all data blocks and check blocks in the stripe where the faulty data block is located as the data to be calculated in the memory.

[0209] Optionally, the XOR operation module includes:

[0210] A third XOR operation unit, used for the central processor to execute an XOR instruction, perform an XOR operation on all data blocks and check blocks in the stripe where the faulty data block is located, and generate a reconstructed data block corresponding to the faulty data block;

[0211] The memory storage module comprises:

[0212] The third memory storage unit is used for the central processor to store the generated reconstructed data block in the memory.

[0213] Optionally, the disk array writing module further includes:

[0214] The third writing unit is used to use the location where the failed data block is stored in the disk array as the target location corresponding to the reconstructed data block after the failed disk recovers from the failure; and rewrite the reconstructed data block stored in the memory to the target location in the disk array.

[0215] Optionally, the device further includes an inspection module, configured to:

[0216] In response to a stripe verification operation, all data blocks and verification blocks in the stripe to be verified are obtained in the disk array and stored in the memory; the central processing unit obtains the stripe to be verified from the memory and loads it into a register of the central processing unit, and the central processing unit executes an XOR instruction to perform an XOR operation on all data blocks in the stripe to be verified to generate a current verification block; when the current verification block of the stripe to be verified is inconsistent with the verification block, the current verification block is stored in the memory, and the verification block is updated with the current verification block of the stripe to be verified in the disk array.

[0217] Optionally, the device further comprises:

[0218] A target operation module is used to respond to a target operation instruction issued by any host, and the central processing unit directly reads the target data corresponding to the target operation instruction from the memory to bypass the cache of the storage controller; wherein the target operation instruction is an operation instruction for user data, and the target operation instruction includes a read operation instruction for any target data.

[0219] Reference Figure 4 , showing a structural schematic diagram of a storage system provided in an embodiment of the present application, the storage system includes a disk array of an independent disk structure with distributed parity or a disk structure with two types of stored parity codes and a storage controller, the storage controller includes a central processing unit and a memory, and the storage system is used to execute the XOR calculation method of the storage system described in this embodiment.

[0220] Reference Figure 5 , shows a schematic diagram of a computer device provided in an embodiment of the present application, comprising: at least one processor 501, and a memory 502, wherein the memory 502 stores a computer program that can be run on the processor, wherein the processor 501 executes the XOR calculation method of the storage system described in this embodiment when executing the computer program.

[0221] Reference Figure 6, shows a schematic diagram of a non-volatile readable storage medium provided in an embodiment of the present application, wherein the non-volatile readable storage medium 600 stores a computer program 601, wherein when the computer program is executed by a processor, the XOR calculation method of the storage system described in this embodiment is executed.

[0222] Reference Figure 7 , shows a schematic diagram of a computer program product provided in an embodiment of the present application, wherein the computer program product 700 includes a computer program / instruction 701, which, when executed by a processor, implements the XOR calculation method of the storage system described in this embodiment.

[0223] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0224] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0225] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0226] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0227] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0228] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0229] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0230] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A XOR calculation method for a storage system, characterized in that: Applied to a storage system, the storage system includes a disk array of an independent disk structure with distributed parity check or a disk structure with two types of stored parity check codes and a storage controller, the storage controller includes a central processing unit and a memory, and the method includes: In response to a data storage instruction or when executing a fault data recovery thread, the central processing unit obtains the data to be operated from the memory and loads the data into a register of the central processing unit, wherein the central processing unit executes a first non-temporary storage instruction for loading the data to be operated stored in the memory into the register without passing through a cache, so as to obtain the data to be operated; The central processing unit executes an XOR instruction to perform an XOR operation on the data to be operated, and generates an XOR operation result; The central processing unit stores the XOR operation result in the register in a memory, wherein the central processing unit executes a second non-temporal storage instruction for loading the XOR operation result stored in the register into the memory without passing through a cache, so as to store the XOR operation result in the memory; The XOR operation result stored in the memory is written into a corresponding target location in the disk array.

2. The method according to claim 1, characterized in that The storage controller includes a plurality of central processing units. When any central processing unit stores the XOR operation result in the register in a memory, the method further includes: The central processing unit executes a memory barrier instruction, where the memory barrier instruction is used to enable the multiple central processing units to know the XOR operation result written into the memory by the central processing unit.

3. The method according to claim 1, characterized in that Before the central processing unit obtains the data to be operated from the memory and loads the data into the register of the central processing unit, the method further includes: In response to a data storage instruction issued by any host, the storage controller obtains the data to be stored, divides the data to be stored into a plurality of data blocks, and stores the plurality of data blocks as the data to be calculated in the memory.

4. The method according to claim 3, characterized in that The central processing unit executes the XOR instruction to perform an XOR operation on the data to be operated, and generates an XOR operation result, including: The central processing unit executes an XOR instruction to perform an XOR operation on the multiple data blocks to generate a check block corresponding to the data to be stored; The central processing unit stores the XOR operation result in the register in a memory, including: The central processing unit stores the generated check blocks corresponding to the data to be stored in the memory.

5. The method according to claim 4, characterized in that The method further comprises: The storage controller writes the data to be stored stored in the memory into the disk array according to the logical address corresponding to the data to be stored and the redundancy level adopted by the disk array of the storage system; Writing the XOR operation result stored in the memory to a corresponding target location in the disk array includes: According to the redundancy level adopted by the disk array of the storage system, a target position corresponding to the check block corresponding to the data to be stored is determined, and the check block corresponding to the data to be stored stored in the memory is written into the target position in the disk array.

6. The method according to claim 1, characterized in that Before the central processing unit obtains the data to be operated from the memory and loads the data into the register of the central processing unit, the method further includes: In response to a data storage instruction issued by any host, the storage controller obtains the data to be stored, and reads the data blocks in the target stripe and the check blocks in the target stripe corresponding to the data to be stored in the disk array according to the logical address of the data to be stored, and stores the data to be stored, the data blocks in the target stripe and the check blocks in the target stripe as the data to be calculated in the memory.

7. The method according to claim 6, characterized in that The central processing unit executes the XOR instruction to perform an XOR operation on the data to be operated, and generates an XOR operation result, including: The central processing unit executes an XOR instruction to perform an XOR operation on the data to be stored and the data blocks in the target stripe to generate a first XOR operation result; The central processing unit executes an XOR instruction to perform an XOR operation on the first XOR operation result and the check block in the target stripe to generate an updated check block; The central processing unit stores the XOR operation result in the register in a memory, including: The central processing unit stores the generated updated check block in a memory.

8. The method according to claim 7, characterized in that The method further comprises: The storage controller writes the data to be stored stored in the memory into the disk array according to the logical address corresponding to the data to be stored and the redundancy level adopted by the disk array of the storage system; Writing the XOR operation result stored in the memory to a corresponding target location in the disk array includes: The storage position of the check block in the target stripe in the disk array is used as the target position, and the updated check block stored in the memory is written into the target position in the disk array to cover the check block in the target stripe.

9. The method according to claim 1, characterized in that: Before the central processing unit obtains the data to be operated from the memory and loads the data into the register of the central processing unit, the method further includes: Detecting whether there is any failed disk in the disk array, or when the storage system includes a disk array having a disk structure of the two types of stored parity check codes, detecting whether there are two failed disks in the disk array; When there is a faulty disk in the disk array, a faulty data recovery thread is executed, including: The storage controller obtains all data blocks and check blocks in the stripe where any failed data block in the failed disk is located, and stores all data blocks and check blocks in the stripe where the failed data block is located as the data to be calculated in the memory.

10. The method according to claim 9, characterized in that The central processing unit executes the XOR instruction to perform an XOR operation on the data to be operated, and generates an XOR operation result, including: The central processing unit executes an XOR instruction to perform an XOR operation on all data blocks and check blocks in the stripe where the faulty data block is located, and generates a reconstructed data block corresponding to the faulty data block; The central processing unit stores the XOR operation result in the register in a memory, including: The central processing unit stores the generated reconstructed data block in a memory.

11. The method according to claim 10, characterized in that Writing the XOR operation result stored in the memory to a corresponding target location in the disk array includes: When the failed disk recovers from the failure, the location where the failed data block is stored in the disk array is used as the target location corresponding to the reconstructed data block; The reconstructed data block stored in the memory is rewritten to a target location in the disk array.

12. The method according to claim 1, characterized in that The method further comprises: In response to the stripe verification operation, all data blocks and verification blocks in the stripe to be verified are obtained in the disk array and stored in the memory; The central processing unit obtains the stripe to be checked from the memory and loads it into the register of the central processing unit. The central processing unit executes an XOR instruction to perform an XOR operation on all data blocks in the stripe to be checked to generate a current check block. When the current check block of the stripe to be checked is inconsistent with the check block, the current check block is stored in the memory, and the check block is updated with the current check block of the stripe to be checked in the disk array.

13. The method according to claim 1, characterized in that The method further comprises: In response to a target operation instruction sent by any host, the central processing unit directly reads the target data corresponding to the target operation instruction from the memory to bypass the cache of the storage controller; The target operation instruction is an operation instruction for user data, and the target operation instruction includes a read operation instruction of any target data.

14. An XOR computing device of a storage system, characterized in that: Applied to a storage system, the storage system includes a disk array of an independent disk structure with distributed parity check or a disk structure with two types of stored parity check codes and a storage controller, the storage controller includes a central processing unit and a memory, the device includes a disk array writing module and a to-be-calculated data loading module, an XOR calculation module and a memory storage module arranged on the central processing unit, wherein: a data to be operated loading module, used for obtaining the data to be operated from the memory and loading it into the register of the central processing unit in response to a data storage instruction or when executing a fault data recovery thread, wherein the central processing unit executes a first non-temporary storage instruction for loading the data to be operated stored in the memory into the register without passing through a cache, so as to obtain the data to be operated; An XOR operation module, used for executing an XOR instruction to perform an XOR operation on the data to be operated, and generating an XOR operation result; a memory storage module, configured to store the XOR operation result in the register in a memory, wherein the central processing unit executes a second non-temporal storage instruction for loading the XOR operation result stored in the register into the memory without passing through a cache, so as to store the XOR operation result in the memory; The disk array writing module is used to write the XOR operation result stored in the memory to the corresponding target position in the disk array.

15. A storage system, characterized in that: The storage system includes a disk array of an independent disk structure with distributed parity or a disk structure with two types of stored parity codes and a storage controller. The storage controller includes a central processing unit and a memory. The storage system is used to execute the XOR calculation method of the storage system described in any one of claims 1-13.

16. A computer device, characterized in that: include: At least one processor, and a memory, wherein the memory stores a computer program that can be run on the processor, wherein the processor executes the XOR calculation method of the storage system according to any one of claims 1 to 13 when executing the computer program.

17. A non-volatile readable storage medium, characterized in that: The non-volatile readable storage medium stores a computer program, wherein the computer program, when executed by a processor, performs the XOR calculation method of the storage system according to any one of claims 1 to 13.

18. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the XOR calculation method of the storage system described in any one of claims 1 to 13 is implemented.