Data processing method and device
By completing parallel processing of packets with the same Cacheline address in multi-core chips and peripheral interactions on the memory side, the problem of bandwidth limitation on the weak side when processing strong SO request sequences is solved, and more efficient data processing and write bandwidth is achieved.
Patent Information
- Application Number
- CN202311246217.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2043-09-25
AI Technical Summary
In the interaction between multi-core chips and peripherals, when the SO request sequence with sequential constraints on the strong side enters the weak side, the weak side needs to ensure that the visible order of the final processing results meets the expectations of the strong side, but the use of a fully serial method will greatly affect the bandwidth.
By completing parallel processing of packets with the same Cacheline address on the memory side, the interaction with the bus is reduced, the delay is reduced, and the bandwidth is increased. The specific method includes the first management unit receiving a write request message, requesting permissions of the target Cacheline from the second management unit, and if other write requests are received before receiving the response message, the data is cached and written to the storage side after the response.
Parallel processing of packet data continuously with the same Cacheline address is realized, the efficiency of data processing is improved, the bus data interaction between the memory side and the storage side is reduced, the processing delay is reduced, and the data writing bandwidth is increased.
Smart Images

Figure CN119690692A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data storage, and more particularly to a data processing method and device. Background Art
[0002] In modern computing systems, multi-core chips all use shared memory to improve the efficiency of inter-process communication. A series of memory consistency models are defined around the order of software read and write operations and the visible order of read and write operation results on hardware. Common ones include sequential storage model (SC), total store order (TSO), and relaxed order model (RM). When the two models interact, that is, when the SO (Strict Order) request sequence with sequential constraints on the strong side enters the weak side, the weak side needs to ensure that the visible order of the final processing results meets the expectations of the strong side. If the weak side is processed in a completely serial manner, the bandwidth will be greatly affected. The typical scenario is the interaction between multi-core chips and peripherals. The communication bandwidth between them is very critical to the system performance. Therefore, how to efficiently process SO requests becomes a key factor in limiting bandwidth. Summary of the invention
[0003] The present application provides a data processing method and device, which can improve the processing efficiency of SO requests to a certain extent.
[0004] In order to achieve the above purpose, this application adopts the following technical solutions:
[0005] In the first aspect, an embodiment of the present application provides a data processing method. The method includes: a first management unit receives a first write request message, the first write request message is used to request that the first data be written into a target cache line Cacheline; the first management unit responds to the first write request message and sends a first request message to the second management unit, the first request message is used to request the permission of the target Cacheline; if the first management unit receives at least one second write request before receiving the first response message fed back by the second management unit, wherein the at least one second write request is used to request that at least one second data be written into the target Cacheline, then after receiving the first response message, the first management unit caches the first data and at least one second data into the first storage space corresponding to the first management unit; wherein the first response message is used to indicate the permission of the target Cacheline; the first management unit writes the target data in the first storage space to the second management unit, the target data including the first data and at least one second data.
[0006] In this way, the present application can realize parallel processing of small packets of data with the same cacheline address within a certain range to improve the efficiency of data processing. In addition, the present application processes small packets of data with the same cacheline address in parallel on the memory side and then writes them to the storage side to reduce the bus data interaction between the memory side and the storage side, thereby reducing processing delay and improving data writing bandwidth.
[0007] In a possible implementation, the first management unit includes a first management subnode and a second management subnode. After receiving a first response message, the first management unit caches the first data and at least one data in a first storage space corresponding to the first management unit, including: the first management subnode sends a second request message to the second management subnode in response to the first response message, the second request message is used to indicate that the permission of the target cacheline has been obtained, and is used to request that the first data be written into the target cacheline; the first management subnode receives a second response message fed back by the second management subnode, the second response message is used to indicate that writing of the first data is allowed; the first management subnode requests the second management subnode to write at least one second data in response to the second response message, and in the process of the first management subnode requesting the second management subnode to write at least one second data, the second management subnode obtains the first data and writes the first data into the first storage space; the second management subnode obtains the second data and writes the second data into the second storage space.
[0008] In this way, the present application completes the handshake process for small packets with the same cacheline address inside the memory side (which can also be understood as the upstream node) to reduce the interaction with the bus, reduce latency, and increase bandwidth.
[0009] In one possible implementation, requesting the second management subnode to write at least one second data includes: the first management subnode sends a third request message to the second management subnode, the third request message is used to request permission for the target cacheline; the first management subnode receives a third response message sent by the second management subnode, the third response message is used to indicate permission for the target cacheline; the first management subnode sends a fourth request message to the second management subnode in response to the third response message, the fourth request message is used to indicate writing a single second data to the target cacheline; the second management subnode obtains the single second data in response to the fourth request message, and writes the single second data to the first storage space after the first data is written to the first storage space.
[0010] In this way, the present application can realize parallel processing of small packets with the same cacheline address within the module on the memory side, which can effectively improve data processing efficiency.
[0011] In a possible implementation, the method further includes: if the first management unit does not receive other requests for writing data to the target cacheline before receiving the first response message fed back by the second management unit, the first management unit requests the second management unit to write the third data to the target cacheline. In this way, when the application does not receive a small packet with the same cacheline address in the Merge window, it can be processed according to the original IO Cache mode to avoid introducing negative benefits.
[0012] Exemplarily, small packets with the same cacheline address received outside the Merge window are also processed according to the original IO Cache mode.
[0013] In a possible implementation, the first management unit requests the second management unit to write the third data into the target cacheline, including: the first management unit sends a fifth request message to the second management unit, the fifth request message is used to request that the first data be written into the target cacheline; the first management unit responds to the fifth response message sent by the second management unit, and sends a data sending indication message to the data sending module, the data sending indication message is used to instruct the data sending module to send the first data to the second management unit; the fifth response message is used to indicate that the first data is allowed to be written. In this way, the present application interacts with the management unit on the storage side to write data into the storage space.
[0014] In a second aspect, the present application provides a data processing device, including a first management unit and a second management unit; the first management unit is used to receive a first write request message, the first write request message is used to request that the first data be written into a target cache line Cacheline; the first management unit is also used to send a first request message to the second management unit in response to the first write request message, the first request message is used to request the permission of the target Cacheline; the first management unit is also used to, if the first management unit receives at least one second write request before receiving a first response message fed back by the second management unit, wherein the at least one second write request is used to request that at least one second data be written into the target Cacheline, then, after receiving the first response message, the first management unit caches the first data and the at least one second data into a first storage space corresponding to the first management unit; wherein the first response message is used to indicate the permission of the target Cacheline; the first management unit is also used to write the target data in the first storage space to the second management unit, the target data including the first data and at least one second data.
[0015] In a possible implementation, the first management unit includes a first management subnode and a second management subnode, the first management subnode is used to send a second request message to the second management subnode in response to a first response message, the second request message is used to indicate that the permission of the target cacheline has been obtained, and is used to request to write the first data to the target cacheline; the first management subnode is also used to receive a second response message fed back by the second management subnode, the second response message is used to indicate that writing of the first data is allowed; the first management subnode is also used to request the second management subnode to write at least one second data in response to the second response message, and in the process of the first management subnode requesting the second management subnode to write at least one second data, the second management subnode obtains the first data and writes the first data into the first storage space; the second management subnode is used to obtain the second data and write the second data into the second storage space.
[0016] In a possible implementation, the first management subnode is further used to send a third request message to the second management subnode, where the third request message is used to request permission for the target cacheline; the first management subnode is further used to receive a third response message sent by the second management subnode, where the third response message is used to indicate permission for the target cacheline; the first management subnode is further used to send a fourth request message to the second management subnode in response to the third response message, where the fourth request message is used to indicate writing a single second data into the target cacheline; the second management subnode is further used to obtain the single second data in response to the fourth request message, and write the single second data into the first storage space after the first data is written into the first storage space.
[0017] In a possible implementation, the first management unit is further configured to, before receiving the first response message fed back by the second management unit, request the second management unit to write the third data into the target cacheline if no other request for writing the data into the target cacheline is received.
[0018] In one possible implementation, the first management unit is used to send a fifth request message to the second management unit, where the fifth request message is used to request that the first data be written into the target cacheline; the first management unit is also used to send a data sending indication message to the data sending module in response to a fifth response message sent by the second management unit, where the data sending indication message is used to instruct the data sending module to send the first data to the second management unit; the fifth response message is used to indicate that writing of the first data is allowed.
[0019] In a third aspect, an embodiment of the present application provides an electronic device. The electronic device includes: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device executes instructions of the method in the first aspect or any possible implementation of the first aspect.
[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable medium for storing a computer program, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0021] In a fifth aspect, an embodiment of the present application provides a computer program comprising instructions for executing the method in the first aspect or any possible implementation of the first aspect.
[0022] In the sixth aspect, an embodiment of the present application provides a chip comprising one or more interface circuits and one or more processors; the interface circuit is used to receive signals from a memory of an electronic device and send signals to the processor, the signals comprising computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device executes the instructions of the method in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0024] Figure 1 is a flowchart of an exemplary data processing method;
[0025] Figure 2 is a flowchart of an exemplary data processing method;
[0026] Figure 3 is a flowchart of an exemplary data processing method;
[0027] Figure 4 is a flow chart of a data processing method in an embodiment of the present application;
[0028] Figure 5 is a flow chart of a data processing method in an embodiment of the present application;
[0029] Figure 6 is a flow chart of a data processing method in an embodiment of the present application;
[0030] Figure 7 is a flow chart of a data processing method in an embodiment of the present application;
[0031] Figure 8 Schematic diagram of the structure of the device shown exemplarily. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0033] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0034] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.
[0035] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0036] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
[0037] Figure 1 The flowchart of a data processing method in the prior art is shown as an example. Figure 1 , specifically including:
[0038] Node A is the node on the Model-0 side, node C is the upstream boundary node, and node B is the downstream node.
[0039] 1) Node A sends a write request sequence with order requirements (including SO0 Req and SO1 Req) to node C.
[0040] 2) Node C sends a write request to node B serially.
[0041] Specifically, in response to SO0 Req (Request), Node C sends Req0 to Node B. After receiving DBID Rep0 (Response) fed back by Node B, Node C sends Req1 corresponding to SO1 Req to Node B, and receives DBID Rep1 fed back by Node B. DBID Rep carries the location of received data (which can also be understood as the location where data is written, which is in the storage space of Node B).
[0042] 3) Node C and node B perform data writing operations in parallel.
[0043] Exemplarily, node C sends Write Data0 and Write Data1 to node B to request writing of corresponding data. After writing the data into the storage space, node B sends Comp0 (Completion) and Comp1 to node C to indicate that the corresponding data has been written.
[0044] 4) Node C sends ACK to node B.
[0045] For example, after receiving the completion response, the upstream node C needs to send an Ack (Acknowledge) signal to node B in the order of write requests (i.e., SO0 Req and SO1Req) to inform the downstream (i.e., node B) that the corresponding request results are globally visible, and the visible order of the request results is guaranteed through sequential Ack handshakes.
[0046] exist Figure 1 In the method shown, the data on the node B side can be guaranteed to be written by the DBID handshake. That is, the node B side writes the received data into the cache in the order of the received Req. This allows the SO request sequence to be partially processed in parallel. However, this method still has the following problems:
[0047] 1) The related operations of the next data packet need to wait for the DBID response corresponding to the previous data packet before continuing processing. Therefore, there is still a serial processing part, and the delay of waiting for the response is high, resulting in low request bandwidth.
[0048] 2) The downstream node B needs to handshake with the upstream node C multiple times to ensure the order of data writing. This process has a large delay and many interactions, which causes communication burden and affects the efficiency of data writing.
[0049] Figure 2 For an exemplary flowchart of another data processing method of the prior art, please refer to Figure 2 Specifically, it includes: based on the hardware consistency protocol, expanding the consistency range, incorporating the intersection of the two storage models into the cache consistency domain on the weak order model side, completing sequential processing at the nodes at the intersection, and ensuring the global visible order of the results.
[0050] 1) Node C at the storage model interface receives a sequence of SO requests (including So Req0, SO Req1, etc.) sent by node A on the strong order model side, and determines that the result visibility order needs to be ensured on the weak order model side to meet the strong side requirements.
[0051] 2) After receiving the SO request sequence, node C obtains the E state (E state, also known as CompUC, which is an exclusive state, indicating that the corresponding cacheline is allocated to node C and cannot be used by other modules) from the downstream node B in parallel to complete the migration of the sequential processing node. In this process, the CC domain (Cache Coherency) is expanded (that is, the CC domain of node B is expanded to node C), giving the boundary node C the ability to process consistency, thereby ensuring the visible order of the request results.
[0052] After node C completes sequential processing, it no longer needs to ensure the order through serial handshakes with downstream nodes. Therefore, requests can be processed in parallel on the weak sequential model side, thereby improving the request bandwidth between models.
[0053] Combination Figure 2 , below Figure 3 The data processing flow diagram shown is used as an example for a brief explanation. In this scenario, when node A (IO device, such as a PCIe controller) interacts with the chip SOC, the SO write request on the IO side enters the SOC side. Node C, as the boundary node between IO and SOC, is used to complete sequential processing and cooperate with the internal node of the SOC (i.e., node B) to complete the request and improve the processing bandwidth.
[0054] The submodule that implements this function in node C is called the IO Cache module. Figure 3 , specifically including:
[0055] 1) Node C receives multiple write requests (So0 Req, SO1 Req, etc.) sent by node A.
[0056] 2) Based on multiple write requests, node C obtains E State from downstream node B in parallel (including sending CleanUqnique (for requesting E STATE), receiving ComRsp (for receiving E state) and feeding back Comp ACK (for responding to having received E state)), and expands CC Domain to complete the migration of sequential processing nodes.
[0057] After node C obtains permission (ie, E state), it sends a write-back request (ie, Write BACK) to node B according to the request order on the PCIe side to ensure the global visible order of the request results and complete the request processing in parallel.
[0058] This method applies a hardware consistency solution to complete the global visibility management of the operation results at the upstream node, avoiding the processing order through upstream and downstream handshakes, thereby realizing parallel processing of requests and improving bandwidth. However, this method cannot realize parallel processing when facing a sequence of SO requests with the same cacheline address.
[0059] The present application provides a data processing method, which can realize parallel processing of a continuous SO request sequence with the same cacheline address. Figure 4 For a flow chart of a data processing method provided in an embodiment of the present application, please refer to Figure 4 , including but not limited to the following steps:
[0060] S401: A first management unit receives a first write request message, where the first write request message is used to request to write first data into a target cacheline.
[0061] Exemplarily, PCIe (i.e., node A in the embodiment of the present application) sends a write request message to the first management unit to write data into the target Cacheline. The first management unit (i.e., node C in the embodiment of the present application) receives the write request message and obtains the Cacheline address indicated in the message. Among them, the Cacheline address indicated in the write request message is all or part of the address of the Cacheline. In the embodiment of the present application, multiple continuous small data packets are used as an example for explanation. Therefore, the small data corresponding to the small data packets involved in the embodiment of the present application are all data with a granularity smaller than one Cacheline. For example, taking a Cacheline length of 128Bytes (only for illustrative example, can be set according to actual needs, this application is not limited) as an example, correspondingly, the data packet corresponding to the write data with a length less than 128Bytes is called a small data packet, for example, a data packet with a length of 64Bytes of write data is a small data packet (referred to as a small packet in the embodiment of the present application, and will not be repeated below).
[0062] S402: The first management unit sends a first request message to the second management unit in response to the first write request message, where the first request message is used to request permission for a target cacheline.
[0063] Exemplarily, after the first management unit receives the write request message and obtains the target cacheline address to be written, it sends a first request message (also called an E State acquisition request message, or a cacheline state acquisition request, etc., which is not limited in this application) to the second management unit (i.e., node B in the embodiment of the present application). The first request message is used to request the state of the target cacheline (which can also be understood as permissions).
[0064] In an embodiment of the present application, the second management unit is used to manage the status (i.e., permissions) of all cachelines. It should be noted that a cacheline can only be used by one node (e.g., node C) at the same time, that is, the usage permission of a cacheline is enabled to a node. When the node has the usage permission of the target cacheline, other nodes cannot access (including writing and reading) the data in the target cacheline. In an embodiment of the present application, when a node requests the permission of a single cacheline (also referred to as usage permission) from the second management unit, the second management unit detects whether the target cacheline is available, which can also be understood as whether the status of the cacheline is unlocked, and can also be understood as the permissions of the cacheline are not assigned to any node. In one example, if the second management unit detects that the target cacheline is currently in an available state, that is, the target cacheline is not occupied by other nodes or modules, the second management unit can send the E state of the target cacheline to the first management unit to indicate that the first management unit is allowed to use the target cacheline. At the same time, the second management unit records the permission status of the target cacheline as unavailable, and the permission is assigned to the first management unit. In another example, if the second management unit detects that the target cacheline is in an unavailable state, the second management unit waits for the target cacheline to become available (i.e., other nodes return the cacheline usage rights), and then sends the E state of the target cacheline to the first management unit to indicate that the first management unit is allowed to use the target cacheline. At the same time, the second management unit records the permission state of the target cacheline as unavailable, and the permission is assigned to the first management unit.
[0065] Therefore, in an embodiment of the present application, there is a certain waiting time between the first management unit sending the first write request message and receiving the first response message (i.e., E state). This waiting time is called a merge (parallel) window in the embodiment of the present application, that is, the starting point of the merge window is the moment corresponding to the first management unit sending the first write request message, and the end point is the moment corresponding to the receipt of the first response message.
[0066] S403: If the first management unit receives at least one second write request before receiving the first response message fed back by the second management unit, wherein the at least one second write request is used to request to write at least one second data into the target cacheline, then after receiving the first response message, the first management unit caches the first data and at least one data into the first storage space corresponding to the first management unit; wherein the first response message is used to indicate the permissions of the target cacheline.
[0067] Exemplarily, in an embodiment of the present application, if the first management unit receives at least one second write request with the same cacheline address as the first write request within the merge window, that is, before receiving the first response message, the first management unit can execute an internal interaction process to cache the data requested to be written to the same cacheline into the storage space corresponding to the first management unit.
[0068] Exemplarily, if at least one second write request with the same address is not received in the merge window, or if other write requests with different cacheline addresses are received, the IO Cache process in the prior art is followed.
[0069] It should be noted that the "packets with the same cacheline address" described in the embodiments of the present application means that the cacheline addresses to be written indicated by multiple packets are within the same cacheline. For example, assume that the address of the first cacheline is 0 to 127 bytes. The cacheline address indicated by packet 1 is 0 to 63 bytes, and the cacheline address indicated by packet 2 is 64 to 127 bytes, then the cacheline addresses indicated by packet 1 and packet 2 are in the same cacheline (i.e., the first cacheline). Correspondingly, packet 1 and packet 2 are packets with the same cacheline address.
[0070] S404: The first management unit writes target data in the first storage space to the second management unit, where the target data includes first data and at least one second data.
[0071] Exemplarily, the first management unit writes multiple data with the same cacheline address received in the merge window into the cache, and then writes the data in the cache into the second management unit, thereby achieving parallel processing of multiple packets with the same cacheline address, reducing interactions on the bus, reducing latency, and improving bandwidth (i.e., throughput).
[0072] The data processing method in the embodiment of the present application is described in detail below with specific examples. Figure 5 This is a flowchart of an exemplary data processing method. In this example, a small packet with the same cacheline address is not received in the merge window. Figure 5 , including but not limited to the following steps:
[0073] S501, node A sends a first write request message to node C.
[0074] Exemplarily, when node A (e.g., PCIe) needs to write data, it sends a first write request message to node C. The first write request message is used to request writing of the first data. The first write request message includes, but is not limited to: the first cacheline address corresponding to the first data and other control information. Optionally, the control information includes, but is not limited to: write instructions and command identifiers, etc.
[0075] Exemplarily, the first cacheline address is the cacheline address where node A expects the first data to be written. Optionally, the first cacheline address includes, but is not limited to: a first starting address and a first length, the first starting address is used to indicate the starting position of the cacheline expected to be written, and the length is used to indicate the length of the data. For example, the first cacheline address includes: a starting address of 0 and a length of 64, then the first cacheline address indicated by it is 0 to 63 bytes, that is, the cacheline address requested to be written by the first write request message is 0 to 63 bytes.
[0076] Exemplarily, the write indication is used to request to write data. The command identifier is used to identify the request message, which can also be understood as identifying the session. Accordingly, all subsequent interactions performed for the write request message need to carry the command indication to indicate that the interaction information carrying the command identifier is performed for the write request.
[0077] S502: Node C sends a cacheline status request message to node B.
[0078] Exemplarily, the node C obtains the first cacheline address and other control information in response to the first write request message.
[0079] Node C sends a cacheline state request message (e.g., a Clean Unique message) to node B to request the E state of the target cacheline to which the first cacheline belongs (see above for details). The cacheline state request message includes, but is not limited to: identification information of node C, the first cacheline address, and an Estate request indication.
[0080] Exemplarily, the identification information of node C may be the ID of node C, etc., which is not limited in this application. The E State request indicates the E state used to request the target Cacheline, which can also be understood as requesting the use rights of the target Cacheline. The target Cacheline is the Cacheline where the first Cacheline is located, which will not be repeated below.
[0081] S503: Node B sends a cacheline status response message to node C.
[0082] Exemplarily, as described above, node B can detect the state of the target cacheline. When determining that the state of the target cacheline is available, node B sends a cacheline state response message to node C based on the identification information of node C. The message includes but is not limited to: the E State of the target cacheline, which is used to indicate that the permission of the target cacheline is allocated to node C.
[0083] Exemplarily, node B records the state of the target cacheline, for example, records the correspondence between the target cacheline and the identification information of node C, so as to indicate that the current usage rights of the target cacheline are allocated to node C.
[0084] In the embodiment of the present application, the time period between S502 and S503 is the merge window. In this example, the merge window is described by taking the case where no other small packets with the same cacheline address are received as an example.
[0085] S504, node C sends a Write Back message to node B.
[0086] Exemplarily, node C determines to obtain the usage permission (also understood as access permission) of the target cacheline based on the cacheline status response message. Node C sends a Write Back message to node B to request to write the first data and to indicate the release of the E state of the cacheline. That is, in the embodiment of the present application, if no continuous write request with the same cacheline address is received in the merge window, node C releases the usage permission of the cacheline.
[0087] The Write Back message includes but is not limited to: Write Back indication information, identification information of the node C, and the first cacheline address. The Write Back indication information is used to request to write data.
[0088] S505 , Node B sends a CompDBID (Data buffer Identification) message to Node C.
[0089] Exemplarily, in response to the Write Back message, node B reclaims the permission of the target cacheline corresponding to node C based on the identification information of node C and the first cacheline address.
[0090] Furthermore, based on the first cacheline address, node B determines a corresponding data cache address in a storage space (also referred to as a cache space) corresponding to node B. Node B sends a CompDBID message to node C to indicate that the first data is allowed to be written. The CompDBID message includes, but is not limited to, a command identifier, identification information of node B, and a data cache address.
[0091] S506, node C sends an ACK message to node A.
[0092] Exemplarily, in response to the CompDBID message, node C sends an ACK message to node A. The ACK message may also be referred to as a first write response message, which indicates that the first data is allowed to be written. The ACK message includes, but is not limited to, a command identifier, the identifier information of node B, and a data cache address.
[0093] S507, node A sends a write message to node B.
[0094] Exemplarily, in response to the ACK message, node A sends a write message (also referred to as a W dat message, which is not limited in this application) to node B based on the identification information of node B, where the write message is used to indicate that data is written to a specified address. The write message includes but is not limited to: first data, DBID, command identifier, etc.
[0095] S508, Node B writes the first data into the cache space.
[0096] Exemplarily, in response to the write message, node B writes the first data into the cache space indicated by DBID. Afterwards, node B may write the data in the cache space into the memory. The specific implementation method may refer to the existing technology, and this application will not repeat it.
[0097] Figure 6 is a flowchart of an exemplary data processing method. In this example, a small packet with the same cacheline address is received in the merge window as an example. Figure 6 , including but not limited to the following steps:
[0098] S601-1, node A sends a first write request message to node C.
[0099] Exemplarily, when node A (e.g., PCIe) needs to write data, it sends a first write request message to node C. The first write request message is used to request writing of the first data. The first write request message includes, but is not limited to: the first cacheline address corresponding to the first data and other control information. Optionally, the control information includes, but is not limited to: write indication and command identifier 1, etc.
[0100] Exemplarily, the first cacheline address is the cacheline address where node A expects the first data to be written. Optionally, the first cacheline address includes, but is not limited to: a first starting address and a first length, the first starting address is used to indicate the starting position of the cacheline expected to be written, and the length is used to indicate the length of the data. For example, the first cacheline address includes: a starting address of 0 and a length of 64, then the first cacheline address indicated by it is 0 to 63 bytes, that is, the cacheline address requested to be written by the first write request message is 0 to 63 bytes.
[0101] Exemplarily, the write indication is used to request to write data. The command identifier is used to identify the request message, which can also be understood as identifying the session. Accordingly, all subsequent interactions performed for the write request message need to carry the command indication to indicate that the interaction information carrying the command identifier is performed for the write request.
[0102] S602-1, the requesting node sends a cacheline status request message 1 to node B.
[0103] Exemplarily, the requesting node in node C (may also be referred to as a first management subunit, which is not limited in the present application) obtains the first cacheline address and other control information in response to the first write request message.
[0104] The requesting node sends a cacheline state request message 1 (e.g., a Clean Unique message) to node B to request the E state of the target cacheline to which the first cacheline belongs (see above for details). The cacheline state request message 1 includes, but is not limited to: identification information of node C, the first cacheline address, and an Estate request indication.
[0105] Exemplarily, the identification information of node C may be the ID of node C, etc., which is not limited in this application. The E State request indicates the E state used to request the target Cacheline, which can also be understood as requesting the use rights of the target Cacheline. The target Cacheline is the Cacheline where the first Cacheline is located, which will not be repeated below.
[0106] S601 - 2 , node A sends a first write request message to node C.
[0107] In this example, node A continues to send a second write request message to node C. The second write request message is used to request writing of the second data. The second write request message includes but is not limited to: the second cacheline address corresponding to the second data and other control information. Optionally, the control information includes but is not limited to: write indication and command identifier 2, etc.
[0108] Exemplarily, the second cacheline address is the cacheline address where node A expects the second data to be written. Optionally, the second cacheline address includes, but is not limited to: a second starting address and a second length, the second starting address is used to indicate the starting position of the cacheline expected to be written, and the length is used to indicate the length of the data. For example, the second cacheline address includes: a starting address of 64 and a length of 64, then the second cacheline address indicated by it is 64 to 127 bytes, that is, the cacheline address requested to be written by the second write request message is 64 to 127 bytes.
[0109] Exemplarily, the write indication is used to request to write data. The command identifier is used to identify the request message, which can also be understood as identifying the session. Accordingly, all subsequent interactions performed for the write request message need to carry the command indication to indicate that the interaction information carrying the command identifier is performed for the write request.
[0110] S603-1, Node B sends a Cacheline status response message 1 to Node C.
[0111] Exemplarily, as described above, node B can detect the state of the target cacheline. When determining that the state of the target cacheline is available, node B sends a cacheline state response message 1 to node C based on the identification information of node C. The message includes but is not limited to: the E State of the target cacheline, which is used to indicate that the permission of the target cacheline is allocated to node C.
[0112] Exemplarily, node B records the state of the target cacheline, for example, records the correspondence between the target cacheline and the identification information of node C, so as to indicate that the current usage rights of the target cacheline are allocated to node C.
[0113] In the embodiment of the present application, the time period between S602 and S603 is the merge window. In this example, other packets with the same cacheline address are received in the merge window as an example. It should be noted that in this example, only another packet with the same cacheline address is received in the merge window as an example. In other embodiments, more packets with the same cacheline address may be received, and the processing method is similar. This application will not give examples one by one.
[0114] It should be noted that in this example, in order to distinguish the steps executed for different write request messages, the "X-1" step in this example represents the step executed for the first write request message, and "X-2" represents the step executed for the second write request message.
[0115] S604-1, the requesting node sends a write back message 1 to the cache node.
[0116] Exemplarily, after receiving the second write request message, the requesting node determines, based on the cacheline address indicated by the second write request message, that the second cacheline address indicated by the second write request message and the first cacheline address indicated by the first write request message belong to the same target cacheline. In other words, the first data (also referred to as the first data packet) and the second data (also referred to as the second data packet) are data written to the same cacheline, and it can be understood that the first data packet and the second data packet are data packets with the same cacheline address that are received consecutively in the merge window.
[0117] It should be noted that in the embodiments of the present application, only the cacheline addresses of the first data and the second data are continuous addresses. In other embodiments, the first data and the second data may be discontinuous addresses in the same cacheline, and the present application does not limit this.
[0118] Exemplarily, the requesting node determines that a packet with the same cacheline address is received in the merge window, and then executes the internal node data processing flow to achieve parallel processing of the packets with the same cacheline address.
[0119] Please continue to refer to Figure 6 In the internal node data processing flow, the requesting node determines the usage permission (also known as access permission) of the target cacheline based on the cacheline status response message. Figure 5 The difference between the process in the example is that in this example, the requesting node sends a Write Back message 1 to the cache node (which may also be called an IO data Cache node, which is not limited in this application). That is, node C still holds the right to use the target Cacheline and does not return it to node B for the time being. In this way, when node C performs internal process processing on multiple data to be written into the target Cacheline, other modules or units cannot access the target Cacheline, thereby preventing data read and write errors.
[0120] Wherein, the Write Back message 1 includes but is not limited to: Write Back indication information and the first Cacheline address. Wherein, the Write Back message is used to request writing of the first data, and is used to indicate that the permission to use the target Cacheline described in the first Cacheline has been obtained. Optionally, the Write Back message may also carry EState to indicate that the permission to use the target Cacheline described in the first Cacheline has been obtained, which is not limited in this application.
[0121] S605-1, the cache node sends a CompDBID message 1 to the requesting node.
[0122] Exemplarily, the cache node determines the corresponding data cache address in the storage space corresponding to the cache node based on the first cacheline address in response to the Write Back message 1. The cache node sends a CompDBID message 1 to the requesting node to indicate that the first data is allowed to be written. The CompDBID message 1 includes, but is not limited to, a command identifier and a data cache address.
[0123] S606-1, the requesting node sends an ACK message 1 to node A.
[0124] Exemplarily, the requesting node sends ACK message 1 to node A in response to the CompDBID message. ACK message 1 may also be referred to as a first write response message, which indicates that the first data is allowed to be written. The ACK message includes but is not limited to: a command identifier, identification information of node C, and a data cache address.
[0125] S607-1, node A sends a write message 1 to node C.
[0126] Exemplarily, in response to ACK message 1, node A sends a write message (also referred to as a W dat message, which is not limited in this application) to node C based on the identification information of node C. The write message is used to indicate that data is written to a specified address. The write message includes but is not limited to: first data, DBID, command identifier, etc.
[0127] S608-1, the cache node writes the first data into the cache space.
[0128] Exemplarily, the cache node writes the first data into the cache space indicated by the DBID in response to the write message.
[0129] In the embodiment of the present application, in order to achieve the order-preserving feature of the same Cacheline address, the cache node will schedule the next CleanUnique request only after receiving the Write Back message corresponding to the previous write request and replying the CompDBID message. Figure 6 As shown, after the cache node executes S605-1, it can start to execute S602-2, that is, the data processing flow corresponding to the second write request, which specifically includes:
[0130] S602-2, the requesting node sends a cacheline status request message 2 to node B.
[0131] Exemplarily, the requesting node in node C (may also be referred to as a first subunit, which is not limited in the present application) obtains the second cacheline address and other control information in response to the second write request message.
[0132] The requesting node sends a cacheline state request message 2 (e.g., a Clean Unique message) to the cache node to request the E state of the target cacheline to which the first cacheline belongs (see above for details). The cacheline state request message 2 includes but is not limited to: the first cacheline address and the E state request indication.
[0133] S603-2, the cache node sends a Cacheline status response message 2 to the requesting node.
[0134] Exemplarily, as described above, in S604-1, the cache node obtains the E state of the target Cacheline. Accordingly, in this step, the cache node sends a Cacheline state response message 2 to the requesting node. The message includes but is not limited to: the E State of the target Cacheline, which is used to indicate that the permissions of the target Cacheline are allocated to the requesting node.
[0135] S604-2, the requesting node sends a write back message to the cache node.
[0136] Exemplarily, the requesting node determines to obtain the usage permission (also understood as access permission) of the target cacheline based on the cacheline status response message 2. The requesting node sends a Write Back message 2 to the cache node (also referred to as an IO data cache node, which is not limited in this application), wherein the Write Back message 2 includes but is not limited to: Write Back indication information and the second cacheline address. The Write Back message 2 is used to request to write the second data.
[0137] S605-2, the cache node sends a CompDBID message 2 to the requesting node.
[0138] Exemplarily, the cache node determines the corresponding data cache address in the storage space corresponding to the cache node based on the second cacheline address in response to the Write Back message 2. The cache node sends a CompDBID message 2 to the requesting node to indicate that the second data is allowed to be written. The CompDBID message 2 includes, but is not limited to, a command identifier and a data cache address.
[0139] In an embodiment of the present application, in order to ensure visibility and order preservation between data, the cache node controls the reply CompDBID to achieve visibility and order preservation. In another embodiment of the present application, for the case of the same cacheline address, the cache node can only reply to the CompDBID corresponding to the next write request after receiving the previous write data (i.e., receiving the write message). In other words, after the cache node receives the write back message, it records the order of the received write back messages. The cache node receives the corresponding write message in the order of the received write back messages, which can also be understood as receiving the corresponding write data before continuing to execute the following process.
[0140] For example, Figure 6 As shown, S606-1 to S607-1 corresponding to the first write request and S602-2 to S604-2 corresponding to the second write request are executed in parallel. The cache node receives the Write Back message 1 corresponding to the first write request before receiving the write back message 2 corresponding to the second write request. Correspondingly, the order of the command identifiers recorded by the cache node (which may also be recorded in other information orders, which is not limited in this application) is the command identifier corresponding to the Write Back message 1 (for example, the first command identifier) and the command identifier corresponding to the Write Back message 2 (for example, the second command identifier). Therefore, the cache node will execute S605-2 only after receiving the data requested to be written by the write back message 1 (that is, the first data). For example, assuming that S604-2 is executed before S607-1, the cache node receives the write back message 2. Based on the order of the currently recorded command identifiers (that is, the first command identifier), the cache node determines that the write data corresponding to the command identifier 1 (which can also be understood as the first write message or the write back message 1) has not yet been received. The cache node then saves the corresponding information (i.e., the second command identifier) in the order of the received write back messages. Subsequently, the cache node receives write message 1, and based on the command identifier, can determine the data requested to be written by the write message. Corresponding to write back message 1, the cache node writes the first data in write message 1 to the storage address allocated for the first data in S605-1 (i.e., the address indicated by DBID). And, the cache node executes S605-2.
[0141] S606-2, the requesting node sends an ACK message 2 to node A.
[0142] Exemplarily, the requesting node sends ACK message 2 to node A in response to CompDBID message 2. ACK message 2 may also be referred to as a second write response message, which indicates that the second data is allowed to be written. ACK message 2 includes but is not limited to: a command identifier, identification information of node C, and a data cache address.
[0143] S607-2, node A sends a write message 2 to node C.
[0144] Exemplarily, in response to ACK message 1, node A sends a write message 2 (also referred to as a W dat message, which is not limited in this application) to node C based on the identification information of node C. The write message 2 is used to indicate that data is written to a specified address. The write message 2 includes, but is not limited to: second data, DBID, command identifier, etc.
[0145] S608-1, the cache node writes the second data into the cache space.
[0146] Exemplarily, in response to write message 2, the cache node writes the second data into the cache space indicated by DBID.
[0147] S609: The cache node sends a write back message 3 to node B.
[0148] Exemplarily, after the cache node writes the first data and the second data, it sends a Write Back message 3 to node B to request writing of the target data (including the first data and the second data). The Write Back message 3 includes but is not limited to: a third command identifier, Write Back indication information, identification information of node C, and a third Cacheline address (including the first Cacheline address and the second Cacheline address). The Write Back indication information is used to request writing of data.
[0149] S610, node B sends CompDBID message 3 to node C.
[0150] Exemplarily, in response to the Write Back message 3, node B determines the corresponding data cache address in the storage space corresponding to node B based on the third Cacheline address. Node B sends a CompDBID message 3 to node C to indicate that writing of the target data is allowed. The CompDBID message 3 includes, but is not limited to: the third command identifier, the identification information of node B, and the data cache address.
[0151] S611, the cache node sends a write message 3 to node B.
[0152] Exemplarily, the cache node in node C responds to CompDBID message 3 and sends a write message 3 (also referred to as a W dat message, which is not limited in this application) to node B based on the identification information of node B. The write message 3 is used to instruct to write data to a specified address. The write message 3 includes, but is not limited to: target data, DBID, a third command identifier, etc.
[0153] S612, Node B writes the first data into the cache space.
[0154] Exemplarily, in response to the write message 3, the node B writes the target data into the cache space indicated by the DBID.
[0155] Figure 7 This is a flowchart of an exemplary data processing method. In this example, a small packet with the same cacheline address is received outside the merge window as an example. Figure 7 , including but not limited to the following steps:
[0156] S701-1, node A sends a first write request message to node C.
[0157] S702-1, the node sends a cacheline status request message 1 to node B.
[0158] S703-1, Node B sends a Cacheline status response message to Node C.
[0159] In this example, node C (specifically, the requesting node in node C) does not receive a packet with the same cacheline address in merge window 1 corresponding to the first write request, then Figure 5 The process in continues processing.
[0160] Details not described can be found here Figure 5 and Figure 6 , I will not go into details here.
[0161] S704-1, node C sends a Write Back message to node B.
[0162] Exemplarily, node C determines to obtain the usage permission (also understood as access permission) of the target cacheline based on the cacheline status response message. Node C sends a Write Back message to node B to request to write the first data and to indicate the release of the E state of the cacheline. That is, in the embodiment of the present application, if no continuous write request with the same cacheline address is received in the merge window, node C releases the usage permission of the cacheline.
[0163] The Write Back message includes but is not limited to: Write Back indication information, identification information of the node C, and the first cacheline address. The Write Back indication information is used to request to write data.
[0164] S705 - 1 , Node B sends a CompDBID message to Node C.
[0165] Exemplarily, in response to the Write Back message, node B reclaims the permission of the target cacheline corresponding to node C based on the identification information of node C and the first cacheline address.
[0166] Furthermore, based on the first cacheline address, node B determines a corresponding data cache address in a storage space (also referred to as a cache space) corresponding to node B. Node B sends a CompDBID message to node C to indicate that the first data is allowed to be written. The CompDBID message includes, but is not limited to, a command identifier, identification information of node B, and a data cache address.
[0167] S706-1, node C sends an ACK message to node A.
[0168] Exemplarily, in response to the CompDBID message, node C sends an ACK message to node A. The ACK message may also be referred to as a first write response message, which indicates that the first data is allowed to be written. The ACK message includes, but is not limited to, a command identifier, the identifier information of node B, and a data cache address.
[0169] S707-1, node A sends a write message to node B.
[0170] Exemplarily, in response to the ACK message, node A sends a write message (also referred to as a W dat message, which is not limited in this application) to node B based on the identification information of node B, where the write message is used to indicate that data is written to a specified address. The write message includes but is not limited to: first data, DBID, command identifier, etc.
[0171] S708-1, Node B writes the first data into the cache space.
[0172] Exemplarily, in response to the write message, node B writes the first data into the cache space indicated by DBID. Afterwards, node B may write the data in the cache space into the memory. The specific implementation method may refer to the existing technology, and this application will not repeat it.
[0173] In the embodiment of the present application, in order to achieve the order-preserving feature of the same Cacheline address, the cache node will schedule the next CleanUnique request only after receiving the Write Back message corresponding to the previous write request and replying the CompDBID message. Figure 7 As shown, after the cache node executes S705-1, it can start to execute S702-2, that is, the data processing flow corresponding to the second write request, which specifically includes:
[0174] S702-2, node C sends a cacheline status request message to node B.
[0175] Exemplarily, node C obtains the second cacheline address and other control information in response to the second write request message.
[0176] Node C sends a cacheline state request message (e.g., a Clean Unique message) to node B to request the E state of the target cacheline to which the second cacheline address belongs (see above for specific description). The cacheline state request message includes but is not limited to: identification information of node C, the second cacheline address, and Estate request indication.
[0177] Exemplarily, the identification information of node C may be the ID of node C, etc., which is not limited in this application. The E State request indicates the E state used to request the target Cacheline, which can also be understood as requesting the use rights of the target Cacheline. The target Cacheline is the Cacheline where the first Cacheline is located, which will not be repeated below.
[0178] S703-2, Node B sends a Cacheline status response message to Node C.
[0179] Exemplarily, as described above, node B can detect the state of the target cacheline. When determining that the state of the target cacheline is available, node B sends a cacheline state response message to node C based on the identification information of node C. The message includes but is not limited to: the E State of the target cacheline, which is used to indicate that the permission of the target cacheline is allocated to node C.
[0180] In the embodiment of the present application, in S704-1, node C has returned the use right of the target cacheline. Accordingly, in this step, node B detects that the target cacheline is currently in an available state.
[0181] Exemplarily, node B records the state of the target cacheline, for example, records the correspondence between the target cacheline and the identification information of node C, so as to indicate that the current usage rights of the target cacheline are allocated to node C.
[0182] S704-2, node C sends a Write Back message to node B.
[0183] Exemplarily, node C determines to obtain the usage permission (also understood as access permission) of the target cacheline based on the cacheline status response message. Node C sends a Write Back message to node B to request to write the second data and to indicate the release of the E state of the cacheline. That is, in the embodiment of the present application, if no continuous write request with the same cacheline address is received in the merge window, node C releases the usage permission of the cacheline.
[0184] The Write Back message includes but is not limited to: Write Back indication information, identification information of the node C, and the second cacheline address. The Write Back indication information is used to request to write data.
[0185] It should be noted that in merge window 2 (i.e., between node C executing S702-2 and S703-2), if node C receives a write request with the same cacheline address as the second write request message, it will Figure 6 The node internal data processing flow in the process of processing the second write request and other write requests with the same cacheline address will not be repeated here. The specific steps can be followed Figure 6 .
[0186] S705-2, Node B sends a CompDBID message to Node C.
[0187] Exemplarily, in response to the Write Back message, node B reclaims the permission of the target cacheline corresponding to node C based on the identification information of node C and the second cacheline address, that is, marks the target cacheline as available.
[0188] Furthermore, based on the second cacheline address, node B determines a corresponding data cache address in a storage space (also referred to as a cache space) corresponding to node B. Node B sends a CompDBID message to node C to indicate that the second data is allowed to be written. The CompDBID message includes, but is not limited to, a command identifier, identification information of node B, and a data cache address.
[0189] S706-2, node C sends an ACK message to node A.
[0190] Exemplarily, in response to the CompDBID message, node C sends an ACK message to node A. The ACK message may also be referred to as a first write response message, which indicates that the second data is allowed to be written. The ACK message includes but is not limited to: a command identifier, the identifier information of node B, and a data cache address.
[0191] S707-2, node A sends a write message to node B.
[0192] Exemplarily, in response to the ACK message, node A sends a write message (also referred to as a W dat message, which is not limited in this application) to node B based on the identification information of node B, where the write message is used to indicate that data is written to a specified address. The write message includes, but is not limited to: second data, DBID, command identifier, etc.
[0193] S708-2, Node B writes the second data into the cache space.
[0194] Exemplarily, in response to the write message, node B writes the second data into the cache space indicated by DBID. Afterwards, node B may write the data in the cache space into the memory. The specific implementation method may refer to the existing technology, and this application will not repeat it.
[0195] In summary, small packets received beyond the merge window are processed according to the original IO Cache mode (i.e. Figure 5) to process, thereby avoiding the introduction of negative benefits. It can be understood that in the original IO Cache mode, node C is used to manage requests. As an upstream node, it is used to interact with the downstream node B based on the upstream data sending end (such as PCIe, or other modules or chips, etc., which are not limited in this application) to write the data of the data sending end into node B. In an embodiment of the present application, if multiple small packets with the same cacheline address are received in the merge window, node C will execute the node internal data processing process, that is, through internal interaction, multiple data are written to the cache space corresponding to node C, and then interact with node B to write the corresponding data, thereby effectively reducing the number of interactions in multiple data packet scenarios to reduce the transmission delay on the bus. In addition, the delay of the internal interaction of the node is greatly shortened compared to the bus data interaction, further improving the overall throughput of data processing.
[0196] Figure 8 A schematic block diagram of a device 800 according to an embodiment of the present application is shown. The device 800 may include: a processor 801 and a transceiver / transceiver pin 802, and optionally, a memory 803. The processor 801 may be used to execute the steps executed by the database in each method of the aforementioned embodiment, and control the receiving pin to receive a signal, and control the sending pin to send a signal.
[0197] The components of the device 800 are coupled together via a bus 804, wherein the bus system 804 includes a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, various buses are labeled as the bus system 804 in the figure.
[0198] Optionally, the memory 803 may be used to store instructions in the aforementioned method embodiment.
[0199] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0200] Based on the same technical concept, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The computer program includes at least one code segment, and the at least one code segment can be executed by a computer to control the computer to implement the above method embodiment.
[0201] Based on the same technical concept, the embodiment of the present application also provides a computer program, which is used to implement the above method embodiment when executed by a computer.
[0202] The program may be stored in whole or in part on a storage medium packaged together with the processor, or may be stored in whole or in part on a memory not packaged together with the processor.
[0203] Based on the same technical concept, the embodiment of the present application further provides a processor, which is used to implement the above method embodiment. The above processor can be a chip.
[0204] The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of the present application can be implemented in a hardware manner, or can be implemented by a processor executing a software instruction. The software instruction can be composed of corresponding software modules, and the software module can be stored in a random access memory (Random Access Memory, RAM), a flash memory, a read-only memory (Read Only Memory, ROM), an erasable programmable read-only memory (Erasable Programmable ROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), a register, a hard disk, a mobile hard disk, a read-only compact disk (CD-ROM) or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.
[0205] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
Claims
1. A data processing method, characterized in that: include: The first management unit receives a first write request message, where the first write request message is used to request to write the first data into a target cache line; The first management unit sends a first request message to the second management unit in response to the first write request message, where the first request message is used to request permission for the target cacheline; If the first management unit receives at least one second write request before receiving the first response message fed back by the second management unit, wherein the at least one second write request is used to request to write at least one second data into the target cacheline, then after receiving the first response message, the first management unit caches the first data and the at least one second data into the first storage space corresponding to the first management unit; wherein the first response message is used to indicate the permission of the target cacheline; The first management unit writes target data into a second storage space corresponding to the second management unit, where the target data includes the first data and the at least one second data.
2. The method according to claim 1, characterized in that The first management unit includes a first management subnode and a second management subnode, and after receiving the first response message, the first management unit caches the first data and the at least one data into a first storage space corresponding to the first management unit, including: The first management subnode sends a second request message to the second management subnode in response to the first response message, where the second request message is used to indicate that the permission of the target cacheline has been obtained and to request to write the first data into the target cacheline; The first management subnode receives a second response message fed back by the second management subnode, where the second response message is used to indicate that writing of the first data is allowed; The first management subnode requests the second management subnode to write the at least one second data in response to the second response message, and in the process of the first management subnode requesting the second management subnode to write the at least one second data, the second management subnode obtains the first data and writes the first data into the first storage space; The second management subnode obtains the second data, and writes the second data into the second storage space.
3. The method according to claim 2, characterized in that The requesting the second management subnode to write the at least one second data includes: The first management subnode sends a third request message to the second management subnode, where the third request message is used to request permission for the target cacheline; The first management subnode receives a third response message sent by the second management subnode, where the third response message is used to indicate the permission of the target cacheline; In response to the third response message, the first management subnode sends a fourth request message to the second management subnode, where the fourth request message is used to instruct to write a single second data into the target cacheline; The second management subnode obtains the single second data in response to the fourth request message, and writes the single second data into the first storage space after the first data is written into the first storage space.
4. The method according to claim 1, characterized in that: The method further comprises: If the first management unit does not receive other requests for writing data to the target cacheline before receiving the first response message fed back by the second management unit, the first management unit requests the second management unit to write the third data to the target cacheline.
5. The method according to claim 4, characterized in that The first management unit requests the second management unit to write the third data into the target cacheline, including: The first management unit sends a fifth request message to the second management unit, where the fifth request message is used to request to write the first data into the target cacheline; In response to the fifth response message sent by the second management unit, the first management unit sends a data sending indication message to the data sending module, wherein the data sending indication message is used to instruct the data sending module to send the first data to the second management unit; the fifth response message is used to indicate that writing of the first data is allowed.
6. A data processing device, characterized in that: comprising a first management unit and a second management unit; The first management unit is used to receive a first write request message, where the first write request message is used to request to write the first data into a target cache line; The first management unit is further configured to send a first request message to the second management unit in response to the first write request message, wherein the first request message is used to request permission for the target cacheline; The first management unit is further configured to, if before receiving the first response message fed back by the second management unit, the first management unit receives at least one second write request, wherein the at least one second write request is used to request to write at least one second data into the target cacheline, then after receiving the first response message, the first management unit caches the first data and the at least one second data into a first storage space corresponding to the first management unit; wherein the first response message is used to indicate the permission of the target cacheline; The first management unit is further configured to write target data in the first storage space into the second management unit, where the target data includes the first data and the at least one second data.
7. The device according to claim 6, characterized in that The first management unit includes a first management sub-node and a second management sub-node, The first management subnode is used to send a second request message to the second management subnode in response to the first response message, where the second request message is used to indicate that the permission of the target cacheline has been obtained and to request to write the first data into the target cacheline; The first management subnode is further used to receive a second response message fed back by the second management subnode, where the second response message is used to indicate that writing of the first data is allowed; The first management subnode is further configured to, in response to the second response message, request the second management subnode to write the at least one second data, and in the process of the first management subnode requesting the second management subnode to write the at least one second data, the second management subnode obtains the first data and writes the first data into the first storage space; The second management subnode is used to obtain the second data and write the second data into the second storage space.
8. The device according to claim 7, characterized in that The first management subnode is further used to send a third request message to the second management subnode, where the third request message is used to request permission for the target cacheline; The first management subnode is further configured to receive a third response message sent by the second management subnode, where the third response message is used to indicate the permission of the target cacheline; The first management subnode is further configured to send a fourth request message to the second management subnode in response to the third response message, wherein the fourth request message is used to instruct to write a single second data into the target cacheline; The second management subnode is further configured to obtain the single second data in response to the fourth request message, and write the single second data into the first storage space after the first data is written into the first storage space.
9. The device according to claim 6, characterized in that The first management unit is further configured to request the second management unit to write the third data into the target cacheline if no other request for writing data into the target cacheline is received before the first response message fed back by the second management unit is received.
10. The device according to claim 9, characterized in that The first management unit is used to send a fifth request message to the second management unit, where the fifth request message is used to request to write the first data into the target cacheline; The first management unit is also used to send a data sending indication message to the data sending module in response to a fifth response message sent by the second management unit, wherein the data sending indication message is used to instruct the data sending module to send the first data to the second management unit; the fifth response message is used to indicate that writing of the first data is allowed.
11. A chip, characterized in that: It comprises one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, wherein the signal includes a computer instruction stored in the memory; when the processor executes the computer instruction, the electronic device executes the method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for realizing storebuffer merge
CN114217855A
Method and device for verifying cache consistency of multi-core processor system
CN116049034A
High-performance streaming of ordered write stashes to enable optimized data sharing between I / O masters and CPUs
US10452593B1
Data access method, interconnected system, and apparatus
WO2022241718A1
Data access method and apparatus
WO2022246769A1