Data reading request processing method and device, electronic equipment and storage medium

By generating a memory information table and an arbitration right allocation mechanism, the problem of wasting RAID memory bandwidth resources is solved and the performance of the RAID chip is improved.

CN118567904APending Publication Date: 2024-08-30SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 7 Cited by

Patent Information

Application Number
CN202410763823.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The serious waste of RAID memory bandwidth resources and the reduction of the overall performance of the RAID chip are mainly due to the fact that when the RIAD engine reads data and performs verification calculations, the data cache can only receive data transmission from one memory at the same time, resulting in other functional modules being unable to access other memories. , resulting in a waste of bandwidth resources.

Method used

By obtaining the data read request to be sent to any memory, the memory's request response record, and the data cache status of the data cache area, a memory information table is generated to determine whether the data read request is eligible for arbitration, and allocate arbitration rights according to the preset arbitration standards. , selectively sends data read requests to the memory to be accessed, reducing request blocking and improving bandwidth utilization.

Benefits of technology

The arbitration mechanism selectively sends data read requests to the memory to be accessed, reducing request blocking and improving the utilization of memory bandwidth resources, thereby improving the overall performance of the RAID chip.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567904A
    Figure CN118567904A
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a data read request processing method and device, electronic equipment and a storage medium, and the method comprises the following steps: obtaining a data read request to be sent to any memory, a request response record of each memory and a data cache condition of a data cache region; generating a memory information table according to the request response record of each memory; judging whether the data read request has arbitration qualification or not according to the memory information table and the data cache condition of the data cache region; and when it is determined that the data read request has the arbitration qualification, allocating an arbitration right to the data read request according to a preset arbitration standard, so as to send the data read request to the memory to be accessed. The data reading request is selectively sent to the to-be-accessed memory by combining the request response record of each memory and the data cache condition of the data cache region, so that the occurrence of the request blocking condition is reduced, the utilization rate of the bandwidth resource of the memory is improved, and the overall performance of the RAID chip is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for processing a data read request. Background Art

[0002] At present, redundant arrays of independent disks (RAID) have complete data verification and correction measures. In the RAID chip, the RIAD engine is responsible for data reading and verification calculation. When there is a new data write request, the RIAD engine reads the new data to be written, the old data and the old verification data from the RAID memory of the RAID chip, determines the new verification data based on the read data, and then writes the new data and the new verification data to the disk to overwrite the old data and the old verification data.

[0003] In the related art, a RAID engine usually continuously initiates multiple read requests to a request queue of a RAID storage device, and stores the read data in a data cache for calculation and verification.

[0004] However, since the data buffer of the RIAD engine can only receive data transmission from one RAID storage at a time, other RAID storages are in a waiting state, and other functional modules of the RIAD engine cannot access these RAID storages during this process. When the RAID engine initiates a large number of read requests, data may accumulate in the data buffer of the RIAD engine, and the data currently transmitted by the RAID storage cannot be received, resulting in a serious waste of RAID storage bandwidth resources and reducing the overall performance of the RAID chip. Summary of the invention

[0005] The present application provides a data read request processing method, device, electronic device and storage medium to solve the defects of related technologies such as serious waste of RAID memory bandwidth resources and reduced overall performance of RAID chips.

[0006] The first aspect of the present application provides a data read request processing method, comprising:

[0007] Obtaining a data read request to be sent to any memory, a request response record of each memory, and a data cache status of a data cache area;

[0008] Generate a storage information table according to the request response records of each storage;

[0009] Determining whether the data read request is eligible for arbitration according to the memory information table and the data cache status of the data cache area;

[0010] When it is determined that the data read request is eligible for arbitration, an arbitration right is allocated to the data read request according to a preset arbitration standard, so as to send the data read request to the memory to be accessed.

[0011] In an optional implementation manner, obtaining a data read request to be sent to any memory includes:

[0012] Get an original read request to be sent to any memory;

[0013] The original read request is split into multiple data read requests according to the request amount of the original read request and the preset data bus width.

[0014] In an optional implementation, generating a storage information table according to the request response records of each storage includes:

[0015] For any of the memories, determining an information characteristic value of the memory according to a request count represented by a request response record of the memory;

[0016] Generate a memory information table according to the information characteristic value of each memory;

[0017] Wherein, each time the memory receives a request, the request count is increased by 1, and each time a response to a request is completed, the request count is decreased by 1.

[0018] In an optional implementation manner, judging whether the data read request is eligible for arbitration according to the memory information table and the data cache status of the data cache area includes:

[0019] According to the memory information table, determining whether the information characteristic value of the memory to be accessed corresponding to the data read request indicates that the memory to be accessed is being accessed;

[0020] According to the memory information table, determining whether the number of memories currently being accessed reaches a preset access number threshold;

[0021] In a case where it is determined that the information characteristic value of the memory to be accessed indicates that the memory to be accessed is being accessed, or in a case where the number of memories currently being accessed does not reach a preset access number threshold, determining that the memory to be accessed corresponding to the data read request satisfies a preset access constraint condition;

[0022] For any of the data read requests, when it is determined that the to-be-accessed memory corresponding to the data read request satisfies a preset access constraint condition, determining a target request category corresponding to the data read request according to a type of read data corresponding to the data read request;

[0023] Locating a corresponding target sub-cache area in the data cache area according to a target request category corresponding to the data read request;

[0024] According to the full flag of the target sub-cache area, determining whether the remaining cache amount of the data cache area meets the data write amount of the data read request;

[0025] The data cache area includes multiple sub-cache areas, and the sub-cache areas correspond one-to-one to request categories of data read requests. The request categories of data read requests are divided into three types: new data read requests, old data read requests, and old verification read requests.

[0026] In an optional embodiment, the method further includes:

[0027] When the response data returned by the memory in response to any of the data read requests is obtained, the response data is cached in a corresponding target sub-cache area according to the target request category corresponding to the response data.

[0028] In an optional implementation, the caching the response data to a corresponding target sub-cache area according to the target request category corresponding to the response data includes:

[0029] caching the arbitration right allocation result of the data read request into an arbitration result cache queue, so as to indicate the response order and request category of the multiple data read requests initiated continuously based on the arbitration result cache queue;

[0030] When the response data is received, the request category corresponding to the first arbitration right allocation result pointed to by the head pointer of the arbitration result cache queue is used as the target request category corresponding to the response data;

[0031] The response data is cached in the corresponding target sub-cache area.

[0032] In an optional embodiment, the method further includes:

[0033] Determining a request initiation limit value according to the amount of the memory;

[0034] When the continuously initiated data read requests reach the request initiation limit value, waiting for response data returned by the memory in response to any of the data read requests;

[0035] After obtaining the response data, continue to initiate the next data read request.

[0036] A second aspect of the present application provides a data read request processing device, comprising:

[0037] An acquisition module, used for acquiring a data read request to be sent to any memory, a request response record of each memory and a data cache status of a data cache area;

[0038] A generating module, used for generating a storage information table according to the request response record of each storage;

[0039] A judgment module, used for judging whether the data read request is eligible for arbitration according to the memory information table and the data cache status of the data cache area;

[0040] The processing module is used to allocate arbitration rights to the data read request according to a preset arbitration standard when it is determined that the data read request has arbitration qualifications, so as to send the data read request to the memory to be accessed.

[0041] A third aspect of the present application provides an electronic device, comprising: at least one processor and a memory;

[0042] The memory stores computer-executable instructions;

[0043] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method described in the first aspect and various possible designs of the first aspect.

[0044] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method described in the first aspect and various possible designs of the first aspect are implemented.

[0045] The technical solution of this application has the following advantages:

[0046] The present application provides a data read request processing method, device, electronic device and storage medium, the method comprising: obtaining a data read request to be sent to any memory, a request response record of each memory and a data cache status of a data cache area; generating a memory information table according to the request response record of each memory; judging whether the data read request is eligible for arbitration according to the memory information table and the data cache status of the data cache area; in the case of determining that the data read request is eligible for arbitration, allocating arbitration rights to the data read request according to a preset arbitration standard, so as to send the data read request to the memory to be accessed. The method provided by the above scheme, by combining the request response records of each memory and the data cache status of the data cache area, adopts arbitration to selectively send data read requests to the memory to be accessed, so as to reduce the occurrence of request blocking, improve the utilization rate of memory bandwidth resources, and thus improve the overall performance of the RAID chip. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technical descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.

[0048] Figure 1 The architecture diagram of the traditional data read request processing system;

[0049] Figure 2 A schematic diagram of the structure of a data read request processing system based on an embodiment of the present application;

[0050] Figure 3 A flowchart of a method for processing a data read request provided in an embodiment of the present application;

[0051] Figure 4 An exemplary original read request splitting schematic diagram provided for an embodiment of the present application;

[0052] Figure 5 A comparison chart of memory occupancy time before and after the RAID engine pointer splitting provided in the embodiment of the present application;

[0053] Figure 6 A schematic diagram of the ID binding logic provided for an embodiment of the present application;

[0054] Figure 7 A schematic diagram of the record logic of the memory information table provided in the embodiment of the present application;

[0055] Figure 8 An architectural diagram of a data read request processing system provided in an embodiment of the present application;

[0056] Fig. 9 An architectural diagram of a data pointer request arbitration module provided in an embodiment of the present application;

[0057] Fig.10 An architectural diagram of an arbitration result cache queue provided in an embodiment of the present application;

[0058] Fig.11 This is a schematic diagram of the RAM bandwidth waste scenario;

[0059] Fig.12 An effect diagram of limiting the number of consecutively initiated data read requests provided in an embodiment of the present application;

[0060] Fig.13 A schematic diagram of the structure of a data read request processing device provided in an embodiment of the present application;

[0061] Fig.14A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0062] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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.

[0064] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following embodiments, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.

[0065] In the related art, taking RAID5 as an example, its implementation algorithm is as follows:

[0066] N data disks D1, D2, ..., Dn and a parity disk form a stripe. The data in the entire stripe satisfies the following calculation relationship:

[0067] p=X1*D1⊕X2*D2⊕X3*D3⊕…⊕Xn*Dn;

[0068] Among them, * represents the multiplication operation in the Galois Field, ⊕ is the XOR operation, and X1, X2, X3…Xn are the multiplication coefficients.

[0069] According to the principle of linear equations, when the data on any disk is lost or damaged, it can be solved using the data on other disks.

[0070] Each time data is written to the disk, the checksum needs to be recalculated and the checksum value updated. The minimum data block for disk data and checksum is 4KB.

[0071] Updating disk data is usually done randomly, that is, the location and number of updated disks are uncertain. Calculation verification usually uses the read-modify-write method. For example, if only Disk5 and Disk6 are updated, the new verification calculation method is as follows:

[0072] P′=P⊕X5*(D5⊕D5′)⊕K6(D6⊕D6′)

[0073] Among them, P' is the checksum that needs to be newly calculated, P is the old checksum data in the disk, D5 and D6 are the old data in Disk5 and Disk6, and D5' and D6' are the new data to be written to Disk5 and Disk6. After the checksum calculation is completed, P', D5', and D6' will be written to the disk, overwriting the corresponding P, D5, and D6.

[0074] During the verification calculation process, the new data, old data, and old verification used are randomly distributed in the RAID memory. The RIAD memory is a public storage space in the RAID chip, which consists of multiple RAM blocks. All functional modules compete for use. The amount of data read by the RIAD engine for verification calculation is large, and it has high requirements for the bandwidth occupancy rate of RAM. For the entire chip, the reasonable allocation of RAM bandwidth usage by each functional module can achieve the best system performance.

[0075] In the RAID chip, the RIAD engine module is responsible for data reading and verification calculation. This article focuses on the data reading function. In the traditional method, the RIAD engine reads data from RAM as follows: Figure 1 As shown, Figure 1 The architecture diagram of the traditional data read request processing system. In the traditional method, there is a data pointer cache and a data cache. During the data read process, a pointer is taken out from the data pointer cache in sequence, and then an AXI 4KB read request is initiated. The read data is stored in the data cache for calculation of the checksum.

[0076] In the above method, how many AXI read requests the RIAD engine issues depends on the outstanding capability of the AXI_MASTER. When multiple AXI read requests are issued consecutively, the following problems may occur.

[0077] (1) All pointers are in the same cache. When the read request of the first data pointer in the pointer cache is blocked, other data pointers in the pointer cache cannot issue read requests either. This situation will seriously affect the performance of the RIAD engine.

[0078] (2) There are multiple consecutive read requests from RIAD engines in the request queue of a RAM; the data block size of a read request is 4KB. If the data bus width is 512bit, it takes 64 clock cycles to transfer 4KB of data. If other functional modules want to access the current RAM, they need to wait for the RIAD engine's 4KB data transfer to complete. If there are multiple consecutive read requests from RIAD engines in the request queue, other functional modules will have to wait longer. Long-term occupation of RAM will cause performance degradation of other functional modules.

[0079] (3) The RIAD engine continuously initiates multiple read requests. There are one or more read requests from the RIAD engine in the request queue of all RAMs. The RIAD engine can only receive data transmission from one RAM at a time. When one RAM is transmitting data to the RIAD engine, the other RAMs are in a waiting state. During this process, other functional modules cannot access other RAMs. This situation will cause a serious waste of RAM bandwidth.

[0080] In response to the above problems, the embodiments of the present application provide a data read request processing method, device, electronic device and storage medium, the method comprising: obtaining a data read request to be sent to any memory, a request response record of each memory and a data cache status of a data cache area; generating a memory information table according to the request response record of each memory; judging whether the data read request is eligible for arbitration according to the memory information table and the data cache status of the data cache area; in the case of determining that the data read request is eligible for arbitration, allocating arbitration rights to the data read request according to a preset arbitration standard, so as to send the data read request to the memory to be accessed. The method provided by the above scheme selectively sends a data read request to the memory to be accessed by arbitration in combination with the request response record of each memory and the data cache status of the data cache area, so as to reduce the occurrence of request blocking, improve the utilization rate of memory bandwidth resources, and thus improve the overall performance of the RAID chip.

[0081] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0082] First, the structure of the data read request processing system on which this application is based is described:

[0083] The data read request processing method, device, electronic device and storage medium provided in the embodiments of the present application are applicable to a RAID engine. Figure 2 , which is a schematic diagram of the structure of the data read request processing system based on the embodiment of the present application, mainly includes a RAID engine and multiple memories. The RAID engine sends a data read request to the memory based on the method provided in the embodiment of the present application.

[0084] The embodiment of the present application provides a data read request processing method for limiting a RAID engine from sending data read requests to a memory to avoid causing a serious waste of memory bandwidth resources. The execution subject of the embodiment of the present application is an electronic device, such as a server, a desktop computer, a laptop computer, a tablet computer, and other electronic devices that can be used for data read request processing.

[0085] like Figure 3FIG. 1 is a flow chart of a method for processing a data read request provided in an embodiment of the present application, the method comprising:

[0086] Step 301 , obtaining a data read request to be sent to any memory, a request response record of each memory, and a data cache status of a data cache area.

[0087] It should be noted that the method provided in the embodiment of the present application is applied to the RAID engine, and the data read request is a data read request to be sent to any memory. The request response record of the memory represents whether each memory is currently in a request response state, and the data cache status of the data cache area represents the space occupancy of the data cache area, that is, the data cache amount of the data cache area.

[0088] The RAID engine includes a data cache area. The RAID engine caches the data read from the memory based on the data cache area, and finally obtains new verification data by performing verification calculation on the data in the data cache area.

[0089] Step 302: Generate a storage information table according to the request response records of each storage.

[0090] Specifically, since the RAID chip includes multiple memories, in order to facilitate the management of request response records of each memory, a memory information table of the RAID chip can be generated according to the request response records of each memory to uniformly represent the request response records of each memory.

[0091] Step 303: Determine whether the data read request is eligible for arbitration based on the memory information table and the data cache status of the data cache area.

[0092] Specifically, first, it can be determined based on the memory information table whether the memory to be accessed specified by the data read request is allowed to be accessed. If the access is allowed, it is further determined based on the data cache status of the data cache area whether the data cache area can normally cache the response data of the data read request. If so, it is determined that the data read request has arbitration qualifications. On the contrary, if the memory to be accessed is not allowed to be accessed, and / or the data cache area cannot normally cache the response data of the data read request, it is determined that the data read request does not have arbitration qualifications.

[0093] Step 304 : when it is determined that the data read request is eligible for arbitration, an arbitration right is allocated to the data read request according to a preset arbitration standard, so as to send the data read request to the memory to be accessed.

[0094] Specifically, when it is determined that a data read request is eligible for arbitration, arbitration rights can be allocated to multiple data read requests that are eligible for arbitration in a round-robin arbitration manner according to preset arbitration standards, so that the data read request that obtains the arbitration right is sent to the corresponding memory to be accessed.

[0095] On the basis of the above embodiments, in order to further reduce the time a single data read operation occupies the memory, so as to further improve the bandwidth utilization of the memory, as an implementable manner, in one embodiment, obtaining a data read request to be sent to any memory includes:

[0096] Step 3011, obtaining an original read request to be sent to any memory;

[0097] Step 3012: split the original read request into multiple data read requests according to the request amount of the original read request and the preset data bus width.

[0098] It should be noted that the RAID engine and the memory communicate using the AXI (Advanced eXtensible Interface) bus protocol, and the bit width of the AXI bus is the preset data bus bit width.

[0099] For example, taking an original read request of 4KB and a preset data bus width of 512bit as an example, it takes 64 clock cycles to transfer 4KB of data between the RAID engine and the memory. In order to reduce the time a single data read operation occupies the memory, this application splits the original read request into 8 data read requests.

[0100] Specifically, Figure 4 As shown, it is an exemplary schematic diagram of splitting the original read request provided by the embodiment of the present application. When a data read request is made, the RAID engine uses the data read pointer to specify the location of the data to be read in the RAID memory. Therefore, splitting the original read request actually splits the original read pointer ptr of the original read request to obtain data read pointers ptr0 to ptr7 of multiple data read requests. Figure 4 Where addr indicates the address of the data to be read in the RAID memory. By splitting the read pointer, the granularity of a single read data is reduced, and the time a single request occupies RAM (memory) is reduced. A pointer pointing to 4KB data is split into 8 512B data pointers, and 4KB data is read in 8 times, 512B each time.

[0101] It should be further explained that splitting the data pointer granularity can balance the allocation of RAM bandwidth to each functional module. Figure 5 As shown, Figure 5A comparison chart of memory occupancy time before and after the RAID engine pointer split is provided for an embodiment of the present application. The RAID engine request is a data read request. Before the pointer split, the RAID engine requests the RAM with a granularity of 4KB, and the other functional modules request the RAM with a granularity of 512B, where B is Byte. This situation leads to a huge gap in the allocation of RAM occupancy time. If the RAID engine occupies RAM for too long, it will seriously affect the performance of other modules. After the RAID engine pointer is split, the RAID engine and other modules occupy the same RAM. In this way, the RAM bandwidth is more evenly allocated, which helps to improve the performance of the entire system.

[0102] Furthermore, in one example, before the original read request is split into several data read requests, the original read request can be ID bound. ID binding is to pre-fetch a data pointer from the data pointer cache, perform address decoding, and bind the ID pointing to the RAM. Each data pointer points to 4KB of storage space in the RAM. The RAM pointed to by the pointer is random. First, an ID is assigned to each block of RAM. For example, the ID of RAM0 is 0, the ID of RAM1 is 1, and so on. The ID of RAMn is n. A data pointer is pre-fetched from the data pointer cache, and the ID of the RAM is bound to the current data pointer according to the RAM pointed to by the pointer. The RAM number corresponding to the data pointer can be determined based on the minimum address (A1+1) and maximum address (A2) in the data pointer based on the minimum address and maximum address corresponding to each RAM number, and then the corresponding ID is determined. Figure 6 As shown, it is a logical diagram of ID binding provided in an embodiment of the present application. The value of the data pointer Ptr of the original read request is in the address range of RAM2. The ID of RAM2 is bound to Ptr, that is, the ID of RAM2 is bound to the original read request, and then the ID of RAM2 can be bound to multiple data read requests split from the original read request.

[0103] Based on the above embodiment, as an implementable manner, in one embodiment, a storage information table is generated according to the request response record of each storage, including:

[0104] Step 3021, for any storage, determine the information characteristic value of the storage according to the request count represented by the request response record of the storage;

[0105] Step 3022: Generate a memory information table according to the information characteristic value of each memory.

[0106] The memory increases the request count by 1 each time it receives a request, and decreases the response request count by 1 each time it completes a request.

[0107] It should be noted that the memory information table can be recorded as ID_List, which is a set of tags, each ID corresponding to a bit tag. The ID tag of the RAM being requested is written as 1, and the ID tag of the RAM not being requested is 0. In the initial state, the ID tags of all RAMs are 0.

[0108] Specifically, the memory information table ID_List control is divided into writing and clearing. Figure 7 As shown, it is a logical diagram of the records of the memory information table provided in the embodiment of the present application. The RAID engine initiates 4 AXI requests (data read requests) in succession, and the pointer IDs are 3, 1, 4, and 1 respectively. The ID tags (information characteristic values) corresponding to the IDs 3, 1, and 4 of the first three read requests are written as 1. The ID of the fourth request is 1. Since the tag of ID 1 has been written as 1, the tag of ID 1 is no longer written in the fourth request. Each ID has a request counter. When an ID initiates a read request, the corresponding request counter value (request count) is increased by 1. When a complete AXI response (response data) of an ID is received, the corresponding request counter value is decreased by 1. When the request counter value of an ID is 0, the corresponding ID tag in ID_List is cleared to 0. Figure 7 After receiving the complete response from ID3, ID1, and ID4, the counter values ​​corresponding to ID3 and ID4 are 0. At this time, the marks of ID3 and ID4 in ID_List are cleared to 0. ID1 initiated two read requests and received only one read response. The ID request counter value is 1. At this time, the mark of ID1 in ID_List cannot be cleared.

[0109] Based on the above embodiment, as an implementable manner, in one embodiment, judging whether a data read request is eligible for arbitration according to the memory information table and the data cache status of the data cache area includes:

[0110] Step 3031, judging, according to the memory information table, whether the information characteristic value of the memory to be accessed corresponding to the data read request indicates that the memory to be accessed is being accessed;

[0111] Step 3032, judging whether the number of memories currently being accessed reaches a preset access number threshold according to the memory information table;

[0112] Step 3033, when it is determined that the information characteristic value of the memory to be accessed indicates that the memory to be accessed is being accessed, or when the number of memories currently being accessed does not reach a preset access number threshold, determining that the memory to be accessed corresponding to the data read request satisfies a preset access constraint condition;

[0113] Step 3034, for any data read request, when it is determined that the to-be-accessed memory corresponding to the data read request satisfies the preset access constraint condition, determine the target request category corresponding to the data read request according to the read data type corresponding to the data read request;

[0114] Step 3035, locating a corresponding target sub-buffer in the data buffer according to the target request category corresponding to the data read request;

[0115] Step 3036, judging whether the remaining cache amount of the data cache area satisfies the data write amount of the data read request according to the full flag of the target sub-cache area.

[0116] The data cache area includes multiple sub-caches, and the sub-caches correspond one-to-one to the request categories of data read requests. The request categories of data read requests are divided into three types: new data read requests, old data read requests, and old verification read requests.

[0117] Specifically, the memory to be accessed corresponding to the data read request can be determined according to the ID bound to the data read request. If the information characteristic value of the memory to be accessed in the memory information table is 1, it indicates that the memory to be accessed is being accessed. For example, the IDs marked as 1 in the memory information table ID_List are 2, 3, and 5 respectively, and the current pointer ID is 3, then the RAM (memory to be accessed) corresponding to the current ID is allowed to be accessed, that is, the preset access constraint condition is met. If the information characteristic value of the memory to be accessed in the memory information table is 0, it is further determined whether the number of IDs marked as 1 in ID_List reaches the number of RAMs allowed to be accessed (the preset access number threshold ID_MAX). For example, the ID of the current pointer is 0, and the IDs marked as 1 in ID_List are 2, 3, and 5. At this time, the mark of ID0 is 0. If the value of ID_MAX is 5 (access to 5 RAMs is allowed), then the RAM (memory to be accessed) of ID0 is allowed to be accessed, that is, the preset access constraint condition is met.

[0118] Further, when it is determined that the access memory corresponding to the data read request satisfies the preset access constraint condition, the corresponding target sub-buffer is located in the data cache according to the target request category corresponding to the data read request, and the amount of data in the target sub-buffer in the data cache is less than the almost_full value (cache amount threshold), then the full mark 0 of the target sub-buffer is determined. If the amount of data in the cache is greater than the almost_full value, the full mark 1 of the target sub-buffer is determined. When the full mark of the target sub-buffer is 1, it means that the data of the current request category is accumulated in the data cache and cannot be processed in time. At this time, the data of the current request category can no longer be read, so the inability to receive data normally will back-pressure the AXI bus and RAM, causing blocking.

[0119] Among them, the cache amount threshold almost_full and the preset access quantity threshold ID_MAX are configured by software through registers, and the software can be flexibly modified according to needs.

[0120] Furthermore, in one embodiment, when response data returned by the memory in response to any data read request is obtained, the response data is cached in a corresponding target sub-cache area according to a target request category corresponding to the response data.

[0121] Specifically, Figure 8 As shown, it is an architecture diagram of the data read request processing system provided by the embodiment of the present application, and the data read request processing system includes a RAID engine and multiple memories (RAM0~RAMn), and the RAID engine and the multiple memories communicate with the on-chip interconnect network (NOC) through the AXI_MASTER interface. The RAID engine is composed of a data pointer cache management module, a data cache management module, a data pointer splitting module, a data pointer request arbitration module and a data flow control module. The data pointer splitting module is used to split the original read request of 4KB into 8 512B data read requests, and the data pointer arbitration module is used to determine whether the data read request is eligible for arbitration and allocate arbitration rights. The data flow control module is used to control the number of RAM requests and the number of AXI requests. The control of the number of RAM requests is realized by controlling the access ID list (ID_List), and the control of the number of AXI requests is used to limit the number of consecutive read requests.

[0122] Among them, the data pointer cache management module mainly has two functions: pointer classification and ID binding. Pointer classification is to classify the data pointer (data read request) according to the request category of new data, old data and old verification, and write the classified pointers into the new data pointer cache, the old data pointer cache and the old verification pointer cache respectively. The data cache management module includes a data cache area, and the data cache is divided into multiple sub-caches, namely the new data cache area, the old data cache area and the old verification cache area. The main function of the data cache management module is to write the read-back data (response data) into the corresponding cache area according to the data type (target request category). Each cache area can write data in parallel, which further reduces the occurrence of RAM blocking and improves RAM bandwidth utilization.

[0123] Specifically, in one embodiment, the arbitration right allocation result of the data read request can be cached in the arbitration result cache queue to represent the response order and request category of multiple data read requests initiated continuously based on the arbitration result cache queue; when the response data is received, the request category corresponding to the first arbitration right allocation result pointed to by the head pointer of the arbitration result cache queue is used as the target request category corresponding to the response data; and the response data is cached in the corresponding target sub-cache area.

[0124] Specifically, Fig. 9 As shown, it is an architecture diagram of the data pointer request arbitration module provided in the embodiment of the present application. The data pointer request arbitration module includes multiple arbitration qualification check modules, which respectively perform arbitration qualification checks on the data read requests corresponding to the new data pointer, the old data pointer and the old check pointer. When it is determined that the arbitration qualification is met, further round-robin arbitration is performed, and the data pointer with the arbitration right is sent to the subsequent data flow control module. At the same time, the data pointer request arbitration module also caches the arbitration result (arbitration right allocation result) in the arbitration result cache queue.

[0125] Specifically, Fig.10 As shown, it is an architectural diagram of the arbitration result cache queue provided by the embodiment of the present application. The data types of the initiated requests are recorded in order in the arbitration result cache queue, and the order of the data (response data) read back by the AXI bus is consistent with the order of the initiated requests. Each data type is assigned a unique code, for example, the new data is A, the old data is B, and the old check is C. The data pointer arbitration module continuously outputs three types of data pointers: old check (C), new data (A), and old data (B). C, A, and B are written to the arbitration result cache queue in order. When the response 1 returns, the first value C in the arbitration result cache queue is read out, that is, the response 1 is the old check data, and the response 1 data is written to the old check cache area. When the response 2 returns, the second value A in the arbitration result cache is read out, that is, the response 2 is the new data, and the response 2 data is written to the new data cache area. Similarly, the response 3 is written to the old data cache area. The read data is written to the corresponding cache area according to the type, and the cache hardware can process three types of data in parallel, which speeds up the processing speed of the RIAD engine.

[0126] Based on the above embodiment, as an implementable manner, in one embodiment, the method further includes:

[0127] Step 401, determining a request initiation limit value according to the amount of memory;

[0128] Step 402, when the number of continuously initiated data read requests reaches the request initiation limit value, waiting for response data returned by the memory in response to any data read request;

[0129] Step 403: After receiving the response data, continue to initiate the next data read request.

[0130] It should be noted that by limiting the number of consecutive data read requests according to the request initiation limit value, the waste of RAM bandwidth can be effectively reduced. Fig.11 The situation shown, Fig.11 Schematic diagram of RAM bandwidth waste scenario. Fig.11There are RAID engine requests (data read requests) in the queues of all RAMs in the RAID chip. The RAID engine can only accept the response data of one RAM at a time. When receiving RAM0 data, all other RAMs are waiting for the RAID engine to receive data, resulting in other functional modules of the RAID chip being unable to access these RAMs. This will cause a great waste of RAM bandwidth. Another situation is that the RAID engine request fills up the entire RAM request queue, such as the RAM0 request queue. In this case, other modules cannot access RAM0, or need to wait until all RAID engine requests in RAM0 are processed before they can access it. Limiting the total number of RAID engine requests initiated continuously can avoid this situation.

[0131] Specifically, the AXI request number control function in the data flow control module is used to limit the number of consecutive data read requests. The software configures MXA_REQ_VALUE (request initiation limit value) through the register, that is, the number of consecutive data read requests cannot exceed the value of MXA_REQ_VALUE. For example, when the MXA_REQ_VALUE value is 10, after 10 consecutive read requests, the 11th read request can only be initiated after the response data of the first read request is returned. By limiting the number of AXI requests, the RAM occupation of the RIAD engine can be effectively reduced.

[0132] For example, if the number of RAMs accessed by the RAID engine is limited to 2 (the request initiation limit value), Fig.12 As shown, it is an effect diagram of limiting the number of continuously initiated data read requests provided by an embodiment of the present application. It can be seen that there are RAID engine requests in the request queues of at most two RAMs, and the other RAMs can respond to requests from other functional modules, balancing the occupancy of each RAM bandwidth by different functional modules, reducing the waste of RAM bandwidth, and improving the utilization rate of RAM bandwidth resources.

[0133] Specifically, in one embodiment, the change in the amount of memory on the RAID chip can be monitored in real time, and when the memory data changes, the request initiation limit value is modified to keep the request initiation limit value matching the hardware configuration of the RAID chip.

[0134] The data read request processing method provided in the embodiment of the present application obtains the data read request to be sent to any memory, the request response record of each memory and the data cache status of the data cache area; generates a memory information table according to the request response record of each memory; judges whether the data read request is eligible for arbitration according to the memory information table and the data cache status of the data cache area; when it is determined that the data read request is eligible for arbitration, allocates arbitration rights to the data read request according to the preset arbitration standard to send the data read request to the memory to be accessed. The method provided by the above scheme selectively sends data read requests to the memory to be accessed by arbitration in combination with the request response records of each memory and the data cache status of the data cache area, so as to reduce the occurrence of request blocking, improve the utilization rate of memory bandwidth resources, and thus improve the overall performance of the RAID chip. In addition, by classifying the RAM data pointers, checking the RAM access qualifications of the data pointers, and selecting the appropriate data pointer type through arbitration, blocking is reduced and the AXI bus utilization rate is improved; the time for a single RAM access is reduced by splitting the data pointers; the number of RAM accesses and the number of read requests are controlled to reduce the waste of RAM bandwidth and improve system performance; by classifying the read data, the RIAD engine can process the data in parallel, thereby improving the processing speed of the RIAD engine.

[0135] An embodiment of the present application provides a data read request processing device, which is used to execute the data read request processing method provided by the above embodiment.

[0136] like Fig.13 , which is a schematic diagram of the structure of a data read request processing device provided in an embodiment of the present application. The data read request processing device 130 comprises: an acquisition module 1301 , a generation module 1302 , a determination module 1303 and a processing module 1304 .

[0137] Among them, the acquisition module is used to obtain the data read request to be sent to any memory, the request response record of each memory and the data cache status of the data cache area; the generation module is used to generate a memory information table according to the request response record of each memory; the judgment module is used to judge whether the data read request is eligible for arbitration according to the memory information table and the data cache status of the data cache area; the processing module is used to allocate arbitration rights to the data read request according to the preset arbitration standard when it is determined that the data read request is eligible for arbitration, so as to send the data read request to the memory to be accessed.

[0138] Regarding the data read request processing device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0139] The data read request processing device provided in the embodiment of the present application is used to execute the data read request processing method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.

[0140] An embodiment of the present application provides an electronic device for executing the data read request processing method provided in the above embodiment.

[0141] like Fig.14 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 140 includes: at least one processor 1401 and a memory 1402.

[0142] The memory stores computer-executable instructions; at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the data read request processing method provided in the above embodiment.

[0143] The electronic device provided in the embodiment of the present application is used to execute the data read request processing method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.

[0144] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, a data read request processing method provided in any of the above embodiments is implemented.

[0145] The storage medium containing computer executable instructions provided in the embodiments of the present application can be used to store computer executable instructions of the data read request processing method provided in the aforementioned embodiments. The implementation method and principle are the same and will not be repeated here.

[0146] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0147] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0148] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0149] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0150] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0151] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for processing a data read request, characterized in that: include: Obtaining a data read request to be sent to any memory, a request response record of each memory, and a data cache status of a data cache area; Generate a storage information table according to the request response records of each storage; Determining whether the data read request is eligible for arbitration according to the memory information table and the data cache status of the data cache area; When it is determined that the data read request is eligible for arbitration, an arbitration right is allocated to the data read request according to a preset arbitration standard, so as to send the data read request to the memory to be accessed.

2. The method according to claim 1, characterized in that The obtaining of a data read request to be sent to any memory includes: Get an original read request to be sent to any memory; The original read request is split into multiple data read requests according to the request amount of the original read request and the preset data bus width.

3. The method according to claim 1, characterized in that: The step of generating a storage information table according to the request response records of each storage includes: For any of the memories, determining an information characteristic value of the memory according to a request count represented by a request response record of the memory; Generate a memory information table according to the information characteristic value of each memory; Wherein, each time the memory receives a request, the request count is increased by 1, and each time a response to a request is completed, the request count is decreased by 1.

4. The method according to claim 1, characterized in that: The determining, based on the memory information table and the data cache status of the data cache area, whether the data read request is eligible for arbitration includes: According to the memory information table, determining whether the information characteristic value of the memory to be accessed corresponding to the data read request indicates that the memory to be accessed is being accessed; According to the memory information table, determining whether the number of memories currently being accessed reaches a preset access number threshold; In a case where it is determined that the information characteristic value of the memory to be accessed indicates that the memory to be accessed is being accessed, or in a case where the number of memories currently being accessed does not reach a preset access number threshold, determining that the memory to be accessed corresponding to the data read request satisfies a preset access constraint condition; For any of the data read requests, when it is determined that the to-be-accessed memory corresponding to the data read request satisfies a preset access constraint condition, determining a target request category corresponding to the data read request according to a type of read data corresponding to the data read request; Locating a corresponding target sub-cache area in the data cache area according to a target request category corresponding to the data read request; According to the full flag of the target sub-cache area, determining whether the remaining cache amount of the data cache area meets the data write amount of the data read request; The data cache area includes multiple sub-cache areas, and the sub-cache areas correspond one-to-one to request categories of data read requests. The request categories of data read requests are divided into three types: new data read requests, old data read requests, and old verification read requests.

5. The method according to claim 4, characterized in that The method further comprises: When the response data returned by the memory in response to any of the data read requests is obtained, the response data is cached in a corresponding target sub-cache area according to the target request category corresponding to the response data.

6. The method according to claim 5, characterized in that The step of caching the response data into a corresponding target sub-cache area according to the target request category corresponding to the response data comprises: caching the arbitration right allocation result of the data read request into an arbitration result cache queue, so as to indicate the response order and request category of the multiple data read requests initiated continuously based on the arbitration result cache queue; When the response data is received, the request category corresponding to the first arbitration right allocation result pointed to by the head pointer of the arbitration result cache queue is used as the target request category corresponding to the response data; The response data is cached in the corresponding target sub-cache area.

7. The method according to claim 1, characterized in that The method further comprises: Determining a request initiation limit value according to the amount of the memory; When the continuously initiated data read requests reach the request initiation limit value, waiting for response data returned by the memory in response to any of the data read requests; After obtaining the response data, continue to initiate the next data read request.

8. A data read request processing device, characterized in that: include: An acquisition module, used for acquiring a data read request to be sent to any memory, a request response record of each memory and a data cache status of a data cache area; A generating module, used for generating a storage information table according to the request response record of each storage; A judgment module, used for judging whether the data read request is eligible for arbitration according to the memory information table and the data cache status of the data cache area; The processing module is used to allocate arbitration rights to the data read request according to a preset arbitration standard when it is determined that the data read request has arbitration qualifications, so as to send the data read request to the memory to be accessed.

9. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • RAID engine and RAID bridge chip

    CN118820146A

  • RAID engine and RAID bridge chip

    CN118820146B

  • Mode control method, device, processing chip, system, medium and product

    CN119225253A

  • Engine multiplexing and parallel computing device and method for RAID5 and RAID6 in SSD master control

    CN119718209A

  • Data processing method, electronic equipment and medium

    CN120371594A