Data processing method, device, system and storage device

By comparing the values ​​of the Traffic Class field in the PCIe TLP package in the processor of the solid-state drive and adopting the weighted polling or priority principle, the problem of read and write conflicts in the same namespace in the dual-host system is solved, improving the reliability of the system and stability.

CN116048403BActive Publication Date: 2024-12-10HEFEI DATANG STORAGE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310009083.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-04
Publication Date
2024-12-10
Estimated Expiration
2043-01-04

AI Technical Summary

Technical Problem

In a dual-port dual-controller dual-host system, data access conflicts are prone to occur when two hosts read and write access to the same namespace of the solid-state drive at the same time.

Method used

By determining that one access operation takes precedence over another access operation by using a predetermined data scheduling management mechanism in a processor of the solid state drive, the specific method includes comparing the Traffic Class field values ​​in the PCIe TLP package and using weighted polling or pre-emptive Set the priority principle to determine the priority access operations.

Benefits of technology

It effectively avoids data access conflicts caused by performing two access operations on the same namespace at the same time, and improves the reliability and stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116048403B_ABST
    Figure CN116048403B_ABST
Patent Text Reader

Abstract

The present application discloses a data processing method, which is applied to a solid-state hard disk having a first port and a second port, wherein the first port and the second port are respectively connected to a first root complex and a second root complex, and the method comprises: when a first sub-controller and a second sub-controller in a processor of the solid-state hard disk receive a first access request of the first root complex and a second access request of the second root complex through the first port and the second port respectively, to perform an access operation on the same namespace in the flash memory of the solid-state hard disk, one access operation is determined to be executed in priority to another access operation according to a data scheduling management mechanism predetermined by the solid-state hard disk. When the solid-state hard disk receives two access requests for access operations on the same namespace, one of the access operations can be determined to be executed in priority, so as to avoid data access conflicts caused by performing two access operations on the same namespace at the same time. A data processing device, a system and a storage device are also disclosed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data security technology, and in particular to a data processing method, device, system and storage device. Background Art

[0002] In some scenarios where system reliability and real-time requirements are very high (such as banking and financial systems, online transaction processing (OLTP), online analytical processing (OLAP), high performance computing (HPC), big data, etc.), solid-state drives in a dual-port dual-controller dual-host system architecture are used. In a dual-port dual-controller dual-host system, two independent hosts access data to the flash memory space in the solid-state drive through their own exclusive data channels (i.e. ports). If one of the data channels fails, the other host can take over its task seamlessly and with low latency and continue to access data. This dual-interface redundant fault-tolerant mechanism can greatly improve system reliability.

[0003] However, if at a certain moment, two hosts want to read and write to the same shared area in the flash memory space, data access conflict will occur. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides a data processing method, device, system and storage device, which can avoid the phenomenon of data access conflict caused by performing two access operations on the same namespace at the same time.

[0005] In order to achieve the purpose of the present application, an embodiment of the present invention provides a data processing method, which is applied to a solid state drive having a first port and a second port, wherein the first port and the second port are respectively connected to a first root complex and a second root complex, and the data processing method includes:

[0006] When the first sub-controller and the second sub-controller in the processor of the solid-state drive receive the first access request of the first root complex and the second access request of the second root complex through the first port and the second port respectively, in order to perform an access operation on the same namespace in the flash memory of the solid-state drive, the root

[0007] According to a data scheduling management mechanism predetermined by the solid state drive, it is determined that an access operation takes precedence over another access operation 5 , wherein the access operation is a read operation or a write operation.

[0008] In an optional embodiment, when the first access request and the second access request are both requests for read operations or both requests for write operations, determining that one access operation takes precedence over another access operation according to a data scheduling management mechanism predetermined by the solid state drive includes:

[0009] Compare the value 0 of the Traffic Class field in the first PCIe TLP packet containing the first access request with the value of the Traffic Class field in the second PCIe TLP packet containing the second access request:

[0010] If the value of the Traffic Class field in the first PCIe TLP packet is equal to the value of the Traffic Class field in the second PCIe TLP packet, the priority is determined by weighted polling.

[0011] The access operation performed; wherein the weighted polling method includes weighted polling of the Traffic5Class domain field in the first PCIe TLP packet and the Traffic Class domain field in the second PCIe TLP packet.

[0012] In an optional embodiment, when one of the first access request and the second access request is a request for a read operation and the other is a request for a write operation, determining that one access operation takes precedence over the other access operation according to a data scheduling management mechanism predetermined by the solid state drive includes:

[0013] If the value 0 of the Traffic Class field in the first PCIe TLP packet containing the first access request is equal to the value of the Traffic Class field in the second PCIe TLP packet containing the second access request, the access operation to be executed first is determined according to a preset priority principle.

[0014] In an optional embodiment, determining the access operation to be executed first by weighted polling includes:

[0015] Weighted polling is performed on the Traffic Class field in the first PCIe TLP packet, the Traffic Class field in the second PCIe TLP packet, and one or more of the following items:

[0016] The processing capacity of the first sub-controller and the second sub-controller, the load of the first sub-controller and the second sub-controller, the traffic of the first port and the second port, the size of the memory space allocated to the first sub-controller and the second sub-controller respectively, the weights configured for the task queues of the first sub-controller and the second sub-controller respectively, and the sum of the weights of all business flows in the task queues of the first sub-controller and the second sub-controller respectively.

[0017] In an optional embodiment, before determining that one access operation takes precedence over another access operation according to a data scheduling management mechanism predetermined by the solid state drive, the data processing method further includes:

[0018] When the first sub-controller and the second sub-controller in the processor of the solid-state drive receive the first access request and the second access request through the first port and the second port respectively, the first sub-controller and the second sub-controller obtain each other's operating status; wherein the operating status includes a normal operating status and a fault status;

[0019] Determining that one access operation takes precedence over another access operation according to a data scheduling management mechanism predetermined by the solid state drive includes:

[0020] If one of the first sub-controller and the second sub-controller determines that it is in a normal operating state and the other sub-controller is in a fault state, the sub-controller in the normal operating state performs a read operation or a write operation corresponding to the received access request.

[0021] In an optional embodiment, when the first access request and the second access request are both requests for read operations or both requests for write operations, determining that one access operation takes precedence over another access operation according to a data scheduling management mechanism predetermined by the solid state drive further includes:

[0022] Compare the value of the Traffic Class field in the first PCIe TLP packet containing the first access request with the value of the Traffic Class field in the second PCIe TLP packet containing the second access request:

[0023] If the value of the Traffic Class field in the first PCIe TLP packet is greater than the value of the Traffic Class field in the second PCIe TLP packet, it is determined that the access operation corresponding to the request received through the first port is preferentially executed;

[0024] If the value of the Traffic Class field in the first PCIe TLP packet is smaller than the value of the Traffic Class field in the second PCIe TLP packet, it is determined that the access operation corresponding to the request received through the second port is preferentially executed.

[0025] In an optional embodiment, when one of the first access request and the second access request is a request for a read operation and the other is a request for a write operation, determining that one access operation takes precedence over the other access operation according to a data scheduling management mechanism predetermined by the solid state drive, further comprising:

[0026] If the value of the Traffic Class field in the first PCIe TLP packet is greater than the value of the Traffic Class field in the second PCIe TLP packet, it is determined that the access operation corresponding to the request received through the first port is preferentially executed;

[0027] If the value of the Traffic Class field in the first PCIe TLP packet is smaller than the value of the Traffic Class field in the second PCIe TLP packet, it is determined that the access operation corresponding to the request received through the second port is preferentially executed.

[0028] In order to achieve the above-mentioned object, an embodiment of the present invention provides a data processing device, including: a processor and a memory; wherein:

[0029] The memory is used to store the program for data processing;

[0030] The processor is used to read and execute a program for data processing, and perform the data processing method described in any of the above embodiments.

[0031] In order to achieve the above objectives, an embodiment of the present invention provides a storage medium storing computer executable instructions; the computer executable instructions are used to perform the data processing method described in any of the above embodiments when being read and executed.

[0032] In order to achieve the above-mentioned object, an embodiment of the present invention provides a data processing system, comprising a solid state hard disk having a first port and a second port, and a first root complex and a second root complex, wherein the first root complex and the second root complex are connected to the solid state hard disk through the corresponding first port and second port respectively;

[0033] The processor of the solid state drive is used to perform the data processing method described in any of the above embodiments.

[0034] In the above manner, when the solid-state drive receives access requests from two root complexes to perform access operations on the same namespace, it can be determined that one of the access operations takes precedence over the other access operation, thereby avoiding data access conflicts caused by performing two access operations on the same namespace at the same time.

[0035] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.

[0037] Figure 1 A flowchart of a data processing method provided by an embodiment of the present invention;

[0038] Figure 2 A block diagram showing a data processing device provided by an embodiment of the present invention;

[0039] Figure 3 A block diagram of a data processing system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the present application more clear, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other arbitrarily without conflict.

[0041] The steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions. Also, although a logical sequence is shown in the flowchart, in some cases, the steps shown or described can be performed in a sequence different from that shown here.

[0042] In order to solve the above technical problems, the embodiment of the present invention provides a data processing method. The data processing method is applied to Figure 3 The data processing system shown in FIG. Figure 3 As shown, the data processing system includes a solid state drive 100 having a first port 120 and a second port 130, and a first root complex 200 and a second root complex 300. The first root complex 200 and the second root complex 300 are connected to the solid state drive 100 through the corresponding first port 120 and the second port 130, respectively. Figure 1As shown, the method includes step S101.

[0043] Step S101, when the first sub-controller 112 and the second sub-controller 114 in the processor 110 of the solid-state drive 100 receive a first access request from the first root complex 200 and a second access request from the second root complex 300 through the first port 120 and the second port 130 respectively, to perform an access operation on the same namespace in the flash memory 140 of the solid-state drive 100, it is determined that one access operation takes precedence over another access operation according to a data scheduling management mechanism predetermined by the solid-state drive.

[0044] Here, access operation refers to read operation or write operation. The host in the dual-port dual-controller dual-host system architecture is the root complex. The root complex refers to the PCI Express switch fabric that connects the processor and memory subsystem to one or more switch devices. Among them, the processor generates transaction requests and connects to each other through the local bus. The root complex function can be implemented as a discrete device or integrated in the processor. A root complex may contain multiple PCIExpress ports, and multiple switch devices can be connected to the root complex or cascaded ports. Namespace is a form of code organization used by many programming languages. Namespaces are used to classify and distinguish different code functions to avoid conflicts caused by the same variable names between different codes when different code fragments (usually different people work together or call existing code fragments) are used at the same time. Generally speaking, a namespace is a uniquely identified set of names, so that there is no ambiguity when objects come from different places but have the same name. When using extended markup language, the namespace of extensible markup language XML is a collection of all element categories and attributes. The names of element categories and attributes can be unique through a unique XML namespace. Therefore, the "same namespace" refers to the same shared area in the flash memory space of the SSD.

[0045] In the above manner, when the solid-state drive 100 receives access requests from two root complexes to perform access operations on the same namespace, it can be determined that the access operation corresponding to one of the access requests takes precedence over the access operation corresponding to the other access request, thereby avoiding data access conflicts caused by performing two access operations on the same namespace at the same time.

[0046] In an optional embodiment, when the first access request and the second access request are both requests for read operations or both requests for write operations, determining that one access operation takes precedence over another access operation according to a data scheduling management mechanism predetermined by the solid state drive in step S101 includes:

[0047] Compare the value of the Traffic Class field in the first PCIe TLP packet containing the first access request with the value of the Traffic Class field in the second PCIe TLP packet containing the second access request:

[0048] If the value of the Traffic Class field in the first PCIe TLP packet is equal to the value of the Traffic Class field in the second PCIe TLP packet, the access operation to be performed preferentially is determined by weighted polling; wherein the weighted polling method includes weighted polling of the Traffic Class field in the first PCIe TLP packet and the Traffic Class field in the second PCIe TLP packet.

[0049] Here, the TLP packet, i.e., the Transaction Layer Packet, is a data packet sent by an endpoint or a root complex in the PCI Express system, and is generated at the transaction layer in the PCIe system. The root complex issues an access request by sending a PCIe TLP packet to the solid-state drive, wherein the PCIe TLP packet includes the access request of the root complex. The solid-state drive can determine the execution priority of the access operation and the execution order of multiple access operations by parsing the Traffic Class field in the PCIe TLP packet. When the solid-state drive receives the first PCIe TLP packet and the second PCIe TLP packet (i.e., when receiving an access operation to the same namespace in the flash memory of the solid-state drive), the order of access operations to the same namespace is determined by polling the values ​​of the Traffic Class field in the first PCIe TLP packet and the second PCIe TLP packet. The significance of polling the values ​​of the Traffic Class domain fields in the first PCIe TLP packet and the second PCIe TLP packet is that it is possible to quickly determine which access operation corresponding to the first PCIe TLP packet and the access operation corresponding to the second PCIe TLP packet should be executed first through relatively simple logic.

[0050] In an optional embodiment, when one of the first access request and the second access request is a request for a read operation and the other is a request for a write operation, determining in step S101 that one access operation takes precedence over another access operation according to a data scheduling management mechanism predetermined by the solid state drive includes:

[0051] If the value of the Traffic Class domain field in the first PCIe TLP packet containing the first access request is equal to the value of the Traffic Class domain field in the second PCIe TLP packet containing the second access request, the access operation to be executed first is determined according to a preset priority principle.

[0052] In an optional embodiment, the above-mentioned determination of the access operation to be executed preferentially by weighted polling includes:

[0053] Weighted polling is performed on the Traffic Class field in the first PCIe TLP packet and the Traffic Class field in the second PCIe TLP packet, as well as one or more of the following items: the processing capacity of the first sub-controller and the second sub-controller, the load of the first sub-controller and the second sub-controller, the traffic of the first port and the second port, the size of the memory space allocated to the first sub-controller and the second sub-controller respectively, the weights configured for the task queues of the first sub-controller and the second sub-controller respectively, and the sum of the weights of all business flows in the task queues of the first sub-controller and the second sub-controller respectively.

[0054] In an optional embodiment, before determining that one access operation takes precedence over another access operation according to the data scheduling management mechanism predetermined by the solid state drive, the data processing method further includes:

[0055] When the first sub-controller and the second sub-controller in the processor of the solid-state drive receive the first access request and the second access request through the first port and the second port respectively, the first sub-controller and the second sub-controller obtain each other's operating status; wherein the operating status includes a normal operating status and a fault status;

[0056] The above-mentioned determining that one access operation takes precedence over another access operation according to the data scheduling management mechanism predetermined by the solid state drive includes:

[0057] If one of the first sub-controller and the second sub-controller determines that it is in a normal operating state and the other sub-controller is in a fault state, the sub-controller in the normal operating state performs a read operation or a write operation corresponding to the received access request.

[0058] That is to say, at a certain moment of data transmission, if one of the first sub-controller and the second sub-controller is in a faulty state, then firstly, the faulty state information will be notified to the other party through the signal line between the two sub-controllers. Secondly, the root complex will continue to perform read operations or write operations through the link of the sub-controller in normal operation. Through this architecture, the entire system has higher reliability and stability.

[0059] In an optional embodiment, when the first access request and the second access request are both requests for read operations or both requests for write operations, determining that one access operation takes precedence over another access operation according to a data scheduling management mechanism predetermined by the solid state drive in step S101 further includes:

[0060] Compare the value of the Traffic Class field in the first PCIe TLP packet containing the first access request with the value of the Traffic Class field in the second PCIe TLP packet containing the second access request:

[0061] If the value of the Traffic Class field in the first PCIe TLP packet is greater than the value of the Traffic Class field in the second PCIe TLP packet, it is determined that the access operation corresponding to the request received through the first port is preferentially executed;

[0062] If the value of the Traffic Class field in the first PCIe TLP packet is smaller than the value of the Traffic Class field in the second PCIe TLP packet, it is determined that the access operation corresponding to the request received through the second port is preferentially executed.

[0063] In an optional embodiment, when one of the first access request and the second access request is a request for a read operation and the other is a request for a write operation, determining that one access operation takes precedence over the other access operation according to a data scheduling management mechanism predetermined by the solid state drive in step S101 further includes:

[0064] If the value of the Traffic Class field in the first PCIe TLP packet is greater than the value of the Traffic Class field in the second PCIe TLP packet, it is determined that the access operation corresponding to the request received through the first port is preferentially executed;

[0065] If the value of the Traffic Class field in the first PCIe TLP packet is smaller than the value of the Traffic Class field in the second PCIe TLP packet, it is determined that the access operation corresponding to the request received through the second port is preferentially executed.

[0066] In order to solve the above technical problems, an embodiment of the present invention provides a data processing device, such as Figure 2 As shown, the data processing device includes: a processor 20 and a memory 10; wherein,

[0067] The memory 10 is used to store a program for data processing;

[0068] The processor 20 is used to read and execute a program for data processing, and perform the data processing method described in any of the above embodiments.

[0069] In order to solve the above technical problems, an embodiment of the present invention provides a storage medium storing computer executable instructions; the computer executable instructions are used to perform the data processing method described in any of the above embodiments when being read and executed.

[0070] In order to solve the above technical problems, an embodiment of the present invention provides a data processing system, such as Figure 3 As shown, the data processing system includes a solid state drive 100 having a first port 120 and a second port 130, and a first root complex 200 and a second root complex 300. The first root complex 200 and the second root complex 300 are connected to the solid state drive 100 through the corresponding first port 120 and the second port 130, respectively.

[0071] The processor 110 of the solid state drive 100 is used to perform the data processing method described in any of the above embodiments.

[0072] Although the embodiments disclosed in the present invention are as above, the above contents are only embodiments adopted to facilitate understanding of the present invention and are not intended to limit the present invention. Any technician in the field to which the present invention belongs can make any modifications and changes in the form and details of implementation without departing from the spirit and scope disclosed in the present invention, but the patent protection scope of the present invention shall still be subject to the scope defined in the attached claims.

Claims

1. A data processing method, applied to a solid state drive having a first port and a second port, wherein the first port and the second port are connected to a first root complex and a second root complex, respectively, characterized in that: The data processing method comprises: When a first sub-controller and a second sub-controller in the processor of the solid-state drive receive a first access request of the first root complex and a second access request of the second root complex through the first port and the second port respectively, in order to perform an access operation on the same namespace in the flash memory of the solid-state drive, it is determined that one access operation takes precedence over another access operation according to a data scheduling management mechanism predetermined by the solid-state drive; wherein the access operation is a read operation or a write operation; When one of the first access request and the second access request is a request for a read operation and the other is a request for a write operation, determining that one access operation takes precedence over another access operation according to a data scheduling management mechanism predetermined by the solid state drive includes: If the value of the Traffic Class domain field in the first PCIe TLP packet containing the first access request is equal to the value of the Traffic Class domain field in the second PCIe TLP packet containing the second access request, the access operation to be executed first is determined according to a preset priority principle.

2. The data processing method according to claim 1, wherein: When the first access request and the second access request are both requests for read operations or both requests for write operations, determining that one access operation takes precedence over another access operation according to a data scheduling management mechanism predetermined by the solid state drive includes: Compare the value of the Traffic Class field in the first PCIe TLP packet containing the first access request with the value of the Traffic Class field in the second PCIe TLP packet containing the second access request: If the value of the Traffic Class field in the first PCIe TLP packet is equal to the value of the Traffic Class field in the second PCIe TLP packet, the access operation to be performed preferentially is determined by weighted polling; wherein the weighted polling method includes weighted polling of the Traffic Class field in the first PCIe TLP packet and the Traffic Class field in the second PCIe TLP packet.

3. The data processing method according to claim 2, wherein: The method of determining the access operation to be executed first by weighted polling includes: Weighted polling is performed on the Traffic Class field in the first PCIe TLP packet and the Traffic Class field in the second PCIe TLP packet, as well as one or more of the following items: the processing capacity of the first sub-controller and the second sub-controller, the load of the first sub-controller and the second sub-controller, the traffic of the first port and the second port, the size of the memory space allocated to the first sub-controller and the second sub-controller respectively, the weights configured for the task queues of the first sub-controller and the second sub-controller respectively, and the sum of the weights of all business flows in the task queues of the first sub-controller and the second sub-controller respectively.

4. The data processing method according to claim 1, characterized in that: Before determining that one access operation takes precedence over another access operation according to the data scheduling management mechanism predetermined by the solid state drive, the data processing method further includes: When the first sub-controller and the second sub-controller in the processor of the solid-state drive receive the first access request and the second access request through the first port and the second port respectively, the first sub-controller and the second sub-controller obtain each other's operating status; wherein the operating status includes a normal operating status and a fault status; The step of determining that one access operation takes precedence over another access operation according to a data scheduling management mechanism predetermined by the solid state drive includes: If one of the first sub-controller and the second sub-controller determines that it is in a normal operating state and the other sub-controller is in a fault state, the sub-controller in the normal operating state performs a read operation or a write operation corresponding to the received access request.

5. The data processing method according to claim 2, wherein: When the first access request and the second access request are both requests for read operations or both requests for write operations, determining that one access operation takes precedence over another access operation according to a data scheduling management mechanism predetermined by the solid state drive further includes: Compare the value of the Traffic Class field in the first PCIe TLP packet containing the first access request with the value of the Traffic Class field in the second PCIe TLP packet containing the second access request: If the value of the Traffic Class field in the first PCIe TLP packet is greater than the value of the Traffic Class field in the second PCIe TLP packet, determining to preferentially execute the access operation corresponding to the request received through the first port; If the value of the Traffic Class field in the first PCIe TLP packet is smaller than the value of the Traffic Class field in the second PCIe TLP packet, it is determined to preferentially execute the access operation corresponding to the request received through the second port.

6. The data processing method according to claim 1, wherein: When one of the first access request and the second access request is a request for a read operation and the other is a request for a write operation, the determining, according to a data scheduling management mechanism predetermined by the solid state drive, that one access operation is executed in priority to another access operation, further includes: If the value of the Traffic Class field in the first PCIe TLP packet is greater than the value of the Traffic Class field in the second PCIe TLP packet, determining to preferentially execute the access operation corresponding to the request received through the first port; If the value of the Traffic Class field in the first PCIe TLP packet is smaller than the value of the Traffic Class field in the second PCIe TLP packet, it is determined to preferentially execute the access operation corresponding to the request received through the second port.

7. A data processing device, comprising: A processor and a memory; characterized in that: The memory is used to store a program for data processing; The processor is used to read and execute the program for data processing to perform the data processing method according to any one of claims 1 to 6.

8. A storage medium storing computer executable instructions; the computer executable instructions are used to perform the data processing method according to any one of claims 1 to 6 when being read and executed.

9. A data processing system, comprising a solid state drive having a first port and a second port, and a first root complex and a second root complex, wherein the first root complex and the second root complex are connected to the solid state drive through the corresponding first port and the second port, respectively; The processor of the solid state drive is used to perform the data processing method according to any one of claims 1 to 6.