Control page linked list construction method, device and equipment based on control page linked list template
By receiving the build command during the control page linked list construction process and correcting the target template block in the control page linked list template, the IO performance degradation caused by the large amount of data of the control page linked list template is solved, and a more efficient control page linked list construction is achieved.
Patent Information
- Application Number
- CN202411203587.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-08-29
AI Technical Summary
During the construction of the control page linked list, the read and write performance of IO is affected by the large amount of data of the control page linked list template, resulting in a degradation of performance.
By receiving the build command issued by the host, specifying the correction information block of the target template block that needs to be corrected in the control page linked list template, thereby obtaining the target template block from the control page linked list template and correcting it to build the control page linked list.
The problem of copying the entire control page linked list template to the local control page linked list construction device is avoided, and the data transmission volume is reduced and the impact on IO read and write performance is reduced.
Smart Images

Figure CN119396330A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a method, device and equipment for constructing a control page linked list based on a control page linked list template. Background Art
[0002] A control page linked list refers to a linked list composed of multiple control pages arranged in sequence. Each control page may include several commands that need to be executed in sequence. In order to reduce the difficulty of building a control page linked list, one or more control page linked list templates may be created in advance, and then the control page linked list may be built based on the control chain template. However, the control chain template has a large amount of data, and the IO read and write performance will be greatly affected during the construction of the control page linked list. Summary of the invention
[0003] In view of this, the implementation method of the present invention provides a control page list construction method based on a control page list template, a control page list construction device, an electronic device and a computer-readable storage medium, which have little impact on the read and write performance of IO.
[0004] On one hand, the present invention provides a method for constructing a control page linked list based on a control page linked list template, the method comprising:
[0005] Receive a build command sent by a host, wherein the build command is used to specify a correction information block of a target template block to be corrected in the control page linked list template, wherein the correction information block includes a template block starting position, a template block size, a correction position of the target template block, and correction values corresponding to each correction position;
[0006] Starting from the template start position, according to the template block size, the target template block is obtained from the control page linked list template, and the content at each correction position in the target template block is corrected to the correction value corresponding to the correction position;
[0007] A control page linked list is constructed based on the modified target template block.
[0008] Another aspect of the present invention provides a control page chain list construction device based on a control page chain list template, wherein the control page chain list template is divided into a plurality of template blocks; the device comprises:
[0009] A host configuration unit, configured to receive a build command issued by the host, wherein the build command is used to specify a correction information block of a target template block to be corrected in the control page linked list template, wherein the correction information block includes a template block starting position, a template block size, a correction position of the target template block, and correction values corresponding to each correction position;
[0010] A template reading unit, used for obtaining the target template block from the control page linked list template starting from the template start position and according to the template block size;
[0011] A template correction unit, used for correcting the content at each correction position in the target template block to a correction value corresponding to the correction position;
[0012] The construction unit is used to construct a control page linked list according to the modified target template block.
[0013] Another aspect of the present invention provides an electronic device, which includes a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the method described above is implemented.
[0014] Another aspect of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method as described above is implemented.
[0015] In the technical solutions of some embodiments of the present application, a correction information block of a target template block to be corrected in a control page linked list template is specified by constructing a command, so that the target template block can be obtained from the control page linked list template according to the template starting position and the template block size in the correction information block, and the target template block can be corrected according to the correction position and correction value in the correction information block, and then the control page linked list can be constructed according to the corrected target template block. In this way, the problem of copying the entire control page linked list template to the local control page linked list construction device is avoided, thereby greatly reducing the amount of data transmission and reducing the impact on IO read and write performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present invention in any way. In the accompanying drawings:
[0017] Figure 1 A schematic diagram of a flow chart of a method for constructing a control page linked list provided by an embodiment of the present application is shown;
[0018] Figure 2 A schematic diagram of a control page linked list template provided by an embodiment of the present application is shown;
[0019] Figure 3 A schematic diagram showing the relationship between a start command, a descriptor and a correction information block provided by an embodiment of the present application is shown;
[0020] Figure 4 A schematic diagram showing the relationship between a start command, a descriptor and a correction information block provided by another embodiment of the present application is shown;
[0021] Figure 5 A schematic diagram showing the relationship between a start command, a descriptor and a correction information block provided by another embodiment of the present application is shown;
[0022] Figure 6 A schematic diagram of a control page linked list construction device provided by an embodiment of the present application is shown;
[0023] Figure 7 A schematic diagram of the overall process of constructing a control page linked list provided by an embodiment of the present application is shown;
[0024] Figure 8 A schematic diagram of an electronic device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical scheme and advantages of the implementation method of the present invention clearer, the technical scheme in the implementation method of the present invention will be clearly and completely described below in conjunction with the drawings in the implementation method of the present invention. Obviously, the implementation method described is a part of the implementation method of the present invention, not all the implementation methods. Based on the implementation method of the present invention, all other implementation methods obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0026] Some commands in the control page linked list template may be incomplete. When constructing a control page linked list based on the control page linked list template, you only need to correct the incomplete commands in the control page linked list template according to the actual situation to construct the control page linked list.
[0027] At present, in the technology of constructing a control page linked list based on a control page linked list template, the entire construction process of the control page linked list is usually completed by the host, which has too high a CPU occupancy rate. In order to solve this problem, some technologies have proposed a control page linked list construction device, which can construct a control page linked list based on a construction command issued by the host, so that the host can exit the control page linked list construction process after issuing the construction command, thereby greatly reducing the CPU occupancy rate. However, these devices generally copy the entire control page linked list template to the local, and then perform command correction in the copied control page linked list template to construct the control page linked list. Since the data volume of the control page linked list template is large, the read and write performance of IO is greatly affected in the process of copying the control page linked list template to the local.
[0028] In view of this, the present application first provides a control page list construction method based on a control page list template. During the construction of the control page list, the read and write performance of IO is less affected. The control page list construction method can be applied to a control page list construction device. Specifically, in the present application, the control page list template is allowed to be divided into multiple template blocks, and the sizes of different template blocks can be different, for example, the size of template block A is 512KB, and the size of template block B is 204KB. Figure 1 , which is a flow chart of a control page linked list construction method provided in one embodiment of the present application. Figure 1 In the control page linked list construction method, the following steps are included:
[0029] Step S101, receiving a build command sent by the host, the build command is used to specify the correction information block of the target template block to be corrected in the control page list template, the correction information block includes the template block starting position, template block size, correction position and correction values corresponding to each correction position of the target template block.
[0030] Specifically, the correction information block can be understood as a data set, including correction-related information of the target template block. The build start command can be used to specify the correction information block of the target template block. Figure 2 As an example, assume that template block 2 is the target template block to be corrected, then the build start command sent by the host can specify the template block starting position D1, template block size, correction positions AA and BB, correction value abcd at correction position AA, and correction value abcd1 at correction position BB of template block 2.
[0031] In this embodiment, the sizes of different target template blocks can be set according to actual needs, that is, the template block sizes of different target template blocks specified by the construction command can be different.
[0032] In this embodiment, the template block starting position of the target template block can be the starting storage address of the target template block. Based on the template block starting position and the template block size of the target template block, the target template block can be read from the storage. The correction position of the target template block can be the starting storage address of the area to be corrected of the target template block. The storage address in this application can be represented by an offset address, an index address, etc., and this application is not limited to this.
[0033] Normally, before executing the construction of the control page linked list, the host can determine the target template block to be corrected in the control page linked list template, the template block starting position of the target template block, the template block size, the correction position and the correction value corresponding to each correction position, and the host can send the above information to the control page linked list construction device by constructing a startup command, and the control page linked list construction device constructs the control page linked list based on the correction information block specified by the construction startup command. After the host issues the construction startup command, it can exit the construction process of the control page linked list, and the control page linked list construction device continues to construct the control page linked list based on the following steps S102 and S103.
[0034] Step S102, starting from the template start position, according to the template block size, obtain the target template block from the control page linked list template, and correct the content at each correction position in the target template block to the correction value corresponding to the correction position.
[0035] Specifically, the control page list template can be stored outside the control page list construction device. Based on the correction information block specified by the construction command, the target template block in the control page list template can be copied to the local computer, and the content at each correction position of the target template block can be replaced with the correction value corresponding to the correction position. Figure 2 The content at the correction position AA in is replaced with abcd.
[0036] Step S103, constructing a control page linked list according to the modified target template block.
[0037] In this embodiment, before the host issues a build command, the host can copy the control page linked list template located at the first storage location to the specified location to obtain the initial control page linked list located at the specified location. After the control page linked list building device corrects the target template block, the corrected target template block can be used to replace the uncorrected target template block in the initial control page linked list to obtain the required target control page linked list from the initial control page linked list.
[0038] Specifically, the control page list template can be stored in permanent storage, so that the control page list template is permanently stored. The initial control page list can be stored in memory, so that after the target control page list is constructed based on the initial control page list, the initial control page list can be executed.
[0039] It should be noted that, in the embodiment shown in the present application, although there is also a step of copying the control page chain list template, it is different from the principle of copying the control page chain list template in some technologies. In some technologies, the control page chain list template is copied to the local of the control page chain list construction device, and then the command in the control page chain list template is corrected locally, and after the target control page chain list constructed is obtained, the target control page chain list is copied to a specified location (such as memory). In the technical scheme of the present application, the target template block in the control page chain list template is copied to the local, and the control page chain list template is copied to the specified location to obtain the initial control page chain list, and then after the target template is quickly corrected locally, the corrected target template block is used to replace the uncorrected target template block in the initial control page chain list. In this way, the process of copying the control page chain list template to the local is reduced, the amount of data transmission is reduced, thereby reducing the impact on IO read and write performance.
[0040] In summary, in the technical solutions of some embodiments of the present application, a correction information block of a target template block to be corrected in a control page linked list template is specified by constructing a command, so that the target template block can be obtained from the control page linked list template according to the template starting position and the template block size in the correction information block, and the target template block can be corrected according to the correction position and correction value in the correction information block, and then the control page linked list can be constructed according to the corrected target template block. In this way, the problem of copying the entire control page linked list template to the local control page linked list construction device is avoided, thereby greatly reducing the amount of data transmission and reducing the impact on IO read and write performance.
[0041] In some embodiments, when the control page linked list template includes multiple target template blocks that need to be corrected, each target template block can have a corresponding correction information block. Before the host sends a build command to the control page linked list construction device, it can save the correction information blocks corresponding to each target template block in a designated second storage area in advance, so that each correction information block has a corresponding second storage address. When the host sends a build command, it can send the second storage address of the correction information block to the control page linked list construction device. The control page linked list construction device can read the content in the correction information block in the second storage area corresponding to the second storage address based on the second storage address. In this way, the amount of data transmission between the host and the control page linked list construction device can be greatly reduced.
[0042] Furthermore, in order to send the storage address of each correction information block to the control page linked list construction device, the present application proposes the concept of a descriptor. The descriptor is used to specify the storage address of the correction information block. Before the host sends the construction command, the descriptor can be saved in the first storage area. In this way, the descriptor has a corresponding first storage address. The construction command sent by the host can directly specify the first storage address of the descriptor, thereby further reducing the amount of data transmission.
[0043] Based on the above description, after receiving the build command, the method of the present application may further include:
[0044] The descriptor is read from the first storage area according to the storage address specified by the build command, and the correction information block is read from the second storage area according to the storage address specified by the descriptor.
[0045] Specifically, the descriptor and the correction information block may have their own corresponding data structures. The so-called data structure is to divide the data in the descriptor and the correction information block into multiple parts (also called fields), and agree on the meaning, format and length of each field. Figure 3 , is a schematic diagram of the relationship between the startup command, descriptor and correction information block provided for an embodiment of the present application. Figure 3 In the example, the descriptor can be divided into n fields, each field is used to specify the storage address of a correction information block, and the length of each field can be 30 bits. Similarly, the correction information block can be divided into reserved, template block size, template start position and correction position, correction value and other fields, and the meaning of each field is as follows:
[0046] Reserved: Indicates that the field has no meaning for the time being;
[0047] Template block size: indicates the template block size of the target template block;
[0048] Template starting position and correction position: indicates the starting storage address of the target template block and the correction position in the target template block;
[0049] Correction value: corresponds to the correction position one by one, indicating the correction value at the correction position. In this application, the correction value field can directly store the correction value corresponding to the correction position, or can store the storage address of the correction value. The correction value can be read from the storage address of the correction value.
[0050] Compared with directly setting the correction information block of each target template block in the construction command and sending it to the control page list construction device, Figure 3 In the illustrated embodiment, the amount of data for constructing commands can be greatly reduced through such a hierarchical data structure design.
[0051] However, in Figure 3 In the embodiment shown, when there are many correction positions of the target template block and the length of the template start position and correction position field is limited, more correction positions may not be transmitted. Figure 4 , is a schematic diagram of the relationship between the startup command, descriptor and correction information block provided in another embodiment of the present application. Figure 4 In the embodiment, the correction information block includes a total information block and a correction position block. The correction position block is used to specify the correction position of the target template block. Specifically, the data structure of the correction position block includes multiple position fields, each of which is used to specify one of the correction positions of the target template block. Specifically, the target template block can be divided into words, each word is a preset length (for example, 50B), and each position field can represent a correction position through three subfields: word offset, bit offset, and bit width. Among them:
[0052] The word offset is used to locate the target word that needs to be corrected in the target template block, that is, the number of words in the target template block that needs to be corrected;
[0053] The bit offset is used to locate the correction start position in the target word, that is, from which data bit in the target word the correction starts;
[0054] The bit width indicates the number of data bits to be corrected in the target word starting from the bit offset.
[0055] For example, assuming the word offset is 3, the bit offset is 4, and the bit width is 5, it means that the correction starts from the 4th data bit of the 3rd word in the target template block, and the number of corrected data bits is 5, that is, the 4th data bit to the 8th data bit of the 3rd word in the target template block need to be corrected.
[0056] Before the host sends the build start command, the correction position block can be saved in the third storage area, so that the correction position block has a corresponding storage address. The total information block can be used to specify the storage address of the correction position block. Based on this, the above reading the correction information block from the second storage area according to the storage address specified by the descriptor can include:
[0057] The total information block is read from the second storage area according to the storage address specified by the descriptor, and the revised position block is read from the third storage area according to the storage address of the revised position block specified by the total information block.
[0058] In this way, by storing the correction positions separately in the correction position block, the problem of being unable to specify too many correction positions when the field length in the information block is limited is effectively avoided.
[0059] Continue reading Figure 4. In some embodiments, in the data structure design of the correction position block, the size of each correction position block can be a fixed size (for example, 512B), and the number of position fields in the correction position block can be fixed, such as 10. However, in practice, there may not be 10 correction positions in the target template block, that is, only a few position fields in the correction position block may be used to specify the correction position. In order to distinguish these position fields actually used to specify the correction position, the multiple position fields in the correction position block can have a sequence, for example, the various position fields can be sorted in the order of DW1>DW2>DW3... The total information block can also be used to specify the number of position fields in the correction position block that are actually used to specify the correction position. Specifically, Figure 4 In the total information block, the field "effective correction word size" can be used to specify the number of position fields actually used to specify the correction position in the correction position block. For example, when the effective correction word size is 3, it means that there are 3 position fields in the correction position block used to specify the correction position.
[0060] Based on the above description, after reading the correction position block, the correction position specified by the correction position block can be obtained by the following method:
[0061] According to the order of the position fields in the correction position block, traverse the correction positions specified by each position field in turn;
[0062] After the number of traversed position fields reaches the number of position fields specified by the correction information block, the traversal stops.
[0063] In this way, the position field actually used to specify the correction position in the correction position block is effectively identified, thereby ensuring the correction accuracy.
[0064] In some embodiments, the field "effective correction word size" in the above-mentioned total information block can also be located in the correction address block. In this way, the amount of data in the correction block can be reduced, so that other data related to constructing the control page linked list template can be placed in the correction block.
[0065] Continue reading Figure 4 In some embodiments, the third storage area for storing the correction position block can be located in the control page linked list construction device, so that the data reading speed can be improved. Of course, the third storage area can also be located outside the control page linked list construction device, so as to reduce the storage consumption in the control page linked list construction device. The location of the third storage area can be selected according to actual conditions.
[0066] Based on the above description, the total information block can also be used to specify the location of the third storage area. Specifically, the field "mode" in the total information block can be used to specify the location of the third storage area. When the value of the mode field is the first value, it indicates that the third storage area is located in the control page linked list construction device; when the value of the mode field is the second value, it indicates that the third storage area is located outside the control page linked list construction device.
[0067] Further, in Figure 3 to Figure 4 In the illustrated embodiment, the descriptor specifies the storage location of each correction information block, and the corresponding amount of data may be large. In order to reduce the amount of data transmission between the host and the control page linked list construction device, the present application proposes the concept of a correction table. One or more correction information blocks are located in the same correction table, and the correction information blocks located in the same correction table have continuous storage addresses; the descriptor specifies the storage address of each correction information block by specifying the storage address of the correction table and the number of correction information blocks included in the correction table. Specifically, the storage address of the correction table may be an index address. Based on the index address, the offset address of the correction table may be calculated. For example:
[0068] When the size of the correction table is 512B, the offset address of the correction table = the index address shifted left by 9 bits;
[0069] When the size of the correction table is 1024B, the offset address of the correction table = the index address shifted left by 10 bits;
[0070] When the size of the correction table is 2048B, the offset address of the correction table = the index address shifted left by 11 bits.
[0071] After determining the offset address of the correction table, combined with the base address of the correction table (which can be pre-configured), the starting storage address of the correction table can be determined. Based on the data design of the correction information block, it can be known that the correction information blocks of different target template blocks can have the same size (for example, all 512KB). Therefore, starting from the starting storage address of the correction table, the storage address of a correction information block can be located at every interval of the size of a correction information block. Combined with the number of correction information blocks included in the correction table, the ending storage address of the correction table can be determined. In this way, the storage addresses of multiple correction information blocks are specified through one correction table, which greatly reduces the amount of data in the descriptor.
[0072] Combined with reference Figure 5 , is a schematic diagram of the relationship between a startup command, a descriptor, and a correction information block provided by another embodiment of the present application. Figure 5In the descriptor shown, the descriptor includes a specified number of correction table fields (DW11-DW19), which can support the specification of index addresses of 8 correction tables, and each correction table can support the specification of storage addresses of 128 correction information blocks. Of course, in the specific data structure design, it can be designed according to actual conditions, and this application does not limit this.
[0073] Similar to the correction position block, the number of correction table fields in the descriptor used to specify the correction table index address may be fixed, such as 8. However, in practice, the number of correction tables required to specify the index address may not reach 8, that is, only a few of the correction table fields in the descriptor may be used to specify the storage address of the correction information block. In order to distinguish the correction table fields actually used, the data structure of the descriptor may include a correction table quantity field and a first number of correction table fields. The first number of correction table fields have a sequence, and each correction table field is used to specify the storage address of one of the correction tables and the number of correction information blocks included in the correction table. The correction table quantity field is used to specify the number of correction table fields actually used in the descriptor;
[0074] After reading the descriptor, the storage address of each correction information block specified by the descriptor can be obtained by the following method;
[0075] According to the sequence of the correction table fields, starting from the first correction table field, the storage address of the correction table specified by each correction table field and the corresponding number of correction information blocks are traversed in sequence;
[0076] Determine the storage address of each correction information block in each correction table in turn according to the index address of the correction table obtained through traversal and the number of correction information blocks included in the correction table;
[0077] After the number of traversed correction table fields reaches the value of the correction table number field, the traversal operation stops.
[0078] In this way, the correction table fields actually used can be accurately distinguished, thereby improving the correction accuracy.
[0079] In some embodiments, in order to accurately complete the replacement of the target template block in step S103, the correction information block is also used to specify the storage address of the target template block in the initial control page linked list. Figure 5 The field "target template storage address" in the total information block can be used to specify the storage address of the target template block in the initial control page linked list. The above-mentioned target template block constructed based on the modified control page linked list may include:
[0080] According to the storage address of the target template block specified by the correction information block in the initial control page list, the target template block in the initial control page list is replaced with the corrected target template block to construct the required target control page list from the initial control page list.
[0081] In some embodiments, when the target control page linked list includes multiple control pages, the physical storage addresses between the control pages may not be continuous, but the physical storage addresses within the same control page may be continuous. Considering that multiple control pages of the target control page linked list need to be executed continuously, the descriptor can also be used to specify the starting storage address of the target control page linked list, the number of control pages included in the target control page linked list, and the storage address of each control page. In this way, based on the information specified by the descriptor, execution can be started from the starting storage address of the target control page linked list, and then according to the storage addresses of each control page, continuous execution between different control pages can be achieved, and according to the number of control pages, it can be determined when the target control page linked list is executed. Based on the above description, after constructing the target control page linked list, the method of the present application can also include:
[0082] The starting storage address of the target control page linked list specified by the descriptor, the number of control pages included in the target control page linked list, and the storage address of each control page are returned to the object (such as the engine) that needs to execute the target control page linked list.
[0083] In this way, it is ensured that the object executing the target control page linked list can continuously execute each linked list in the target control page linked list, and determine the time point when the execution of the target control page linked list ends.
[0084] In some embodiments, replacing the target template block in the initial control page linked list with the modified target template block may include:
[0085] After the first target template block is corrected, suspending the replacement operation of the target template block, and continuing to wait for one or more second target template blocks that are corrected after the first target template;
[0086] If the first target template block and the second target template block are continuous target template blocks in the initial control page linked list, the modified first target template block and the second target template block are aggregated into an aggregated target template, and the target template block replacement operation is performed based on the aggregated target template.
[0087] This aggregation method can reduce the number of times data is written to the storage and reduce the impact on storage performance.
[0088] Specifically, after the first target template block is modified, the "target template storage address" and "template block size" in the total information block corresponding to the first target template block can be recorded. After receiving the modified second target template block A, if any of the following conditions is met, the first target template block and the second target template block A can be considered to be continuous:
[0089] Condition 1: Add the "target template storage address" and "template block size" corresponding to the first target template block, and the result is the "target template storage address" in the total information block corresponding to the second target template block A;
[0090] Condition 2: Add the "target template storage address" and "template block size" corresponding to the second target template block A, and the result is the "target template storage address" in the total information block corresponding to the first target template block.
[0091] When it is determined that the first target template block and the second target template block A are continuous target template blocks, the target template block replacement operation can be suspended and the second target template block B can be continued to be waited for. After receiving the corrected second target template block B, if one of the first target template and the second target template block A is continuous with the second target template block B, the second target template block C can be continued to be waited for until the newly received corrected second target template block is not continuous with the previous target template block, and then the target template block replacement operation is triggered.
[0092] In some embodiments, Figure 5 The "target template storage address" in is the logical storage address of the target template block. On the one hand, when the logical storage address is continuous, the corresponding physical storage address is not necessarily continuous; on the other hand, as mentioned above, the physical storage addresses between control pages may not be continuous, but the physical storage addresses within the same control page may be continuous. Therefore, when determining whether two target template blocks are continuous target template blocks based on the above-mentioned scheme of adding the "target template storage address" and the "template block size", if the sum of the "target template storage address" and the "template block size" of the previous target template block is equal to the "target template storage address" of the next target template block, it is necessary to determine whether the physical storage addresses corresponding to the "target template storage addresses" of the two target template blocks are located in the same control page. If so, it is determined that the two target template blocks are continuous. If not, it is determined that the two target template blocks are not continuous.
[0093] In some embodiments, when the target template block has multiple correction positions, correcting the target template block may include:
[0094] Based on the correction information block specified by the build command, multiple correction locations are corrected in parallel.
[0095] In this way, the correction efficiency can be improved. Regarding how to perform parallel correction, please refer to the description of the device, which will not be repeated here.
[0096] Corresponding to the control page link list construction method, the present application also provides a control page link list construction device based on the control page link list template. Figure 6 , which is a schematic diagram of a control page linked list construction device 600 provided in one embodiment of the present application. Figure 6 In the control page linked list construction device 600, a host configuration unit 611, a template reading unit 625 and a template correction unit 618 are included.
[0097] The host configuration unit 611 is used to receive a build command issued by the host. The build command is used to specify the correction information block of the target template block to be corrected in the control page list template, and the correction information block includes the template block starting position, template block size, correction position and correction value corresponding to each correction position of the target template block.
[0098] Specifically, the host configuration unit 611 can receive a preset number of construction commands at the same time. The control page linked list construction device 600 can also include a construction buffer 612. The construction buffer 612 is used to store the construction commands received by the host configuration unit 611.
[0099] In some embodiments, build buffer 612 may be implemented based on an 8x32b FIFO.
[0100] Based on the correction information block specified by the construction command, the template reading unit 625 is used to obtain the target template block from the control page list template according to the template block size starting from the template starting position. Specifically, based on the mode setting (see the description of the mode in the above method), the template reading unit 625 can choose to read the target template block from the template internal buffer 626 of the control page list construction device 600, or can choose to read the target template block from the external storage of the control page list construction device 600.
[0101] The template correction unit 618 is used to correct the content at each correction position in the target template block to the correction value corresponding to the correction position. The construction unit 622 is used to construct a control page chain list according to the corrected target template block.
[0102] In some embodiments, the construction command is specifically used to specify the storage address of the descriptor, and the descriptor is used to specify the storage address of the correction information block; the control page linked list construction device 600 also includes a read descriptor unit 613 and a read correction information unit 620, wherein the read descriptor unit 613 is used to read the descriptor from the first storage area according to the storage address specified by the construction command. The read correction information unit 620 is used to read the correction information block from the second storage area according to the storage address specified by the descriptor.
[0103] In some embodiments, the correction information block includes a total information block and a correction position block, the correction position block is used to specify the correction position of the target template block, the total information block is used to specify the template starting position of the target template block, the template block size, the correction value and the storage address of the correction position block; the correction information reading unit 620 specifically includes a total information block reading unit 615, a correction position block reading unit 617, a correction value buffer 620, a first word buffer 616 and a correction position buffer 619, wherein:
[0104] The total information block reading unit 615 is used to read the total information block from the second storage area according to the storage address specified by the descriptor, and save the storage address of the template starting position, template block size and correction position block specified by the total information block to the first word buffer 616, and save the correction value specified by the total information block to the correction value buffer 620.
[0105] The correction position block reading unit 617 is used to read the correction position block from the third storage area based on the storage address of the correction position block in the first word buffer, and save the correction position specified by the correction position block to the correction position buffer 619. Specifically, the control page linked list construction device 600 may include a correction position internal buffer 614. The correction position internal buffer 614 is used to save the correction position block in the control page linked list construction device 600. If the value of the field "mode" in the first word buffer 616 is a first value, the correction position block reading unit 617 can read the correction position block from the correction position internal buffer 614; if the value of the field "mode" in the first word buffer 616 is a second value, the correction position block reading unit 617 can read the correction position block from the third storage area outside the control page linked list construction device 600.
[0106] In some embodiments, the template correction unit 618 is specifically configured to correct the target template block based on information in the correction value buffer 620 , the first word buffer 616 , and the correction position buffer 619 .
[0107] In some embodiments, the control page linked list template is copied to a specified location to obtain an initial control page linked list located at the specified location, and the correction information block is further used to specify a storage address of the target template block in the initial control page linked list;
[0108] The construction unit 622 is specifically used to replace the target template block in the initial control page list with the corrected target template block according to the storage address of the target template block specified by the correction information block in the initial control page list, so as to construct the required target control page list from the initial control page list.
[0109] In some embodiments, the control page linked list construction device 600 also includes an aggregate information buffer 621, the template correction unit 618 is specifically used to save the corrected target template block to the aggregate information buffer 621, and the construction unit 622 is specifically used to determine whether the first target template block and the second target template block in the aggregate information buffer 621 are continuous target template blocks in the initial control page linked list. If so, the corrected first target template block and the second target template block are aggregated into an aggregate target template, and the target template block replacement operation is performed based on the aggregate target template.
[0110] In some embodiments, the host configuration unit 611 may also be used to configure information related to constructing a control page linked list template, such as configuring a construction buffer 612 , configuring a correction value buffer 620 , configuring a correction position buffer 619 , and the like.
[0111] For the beneficial effects of the control page linked list construction device 600, reference may be made to the description of the control page linked list construction method, which will not be elaborated here.
[0112] Combined with reference Figure 7 , is a schematic diagram of the overall process of constructing a control page linked list provided by an embodiment of the present application. Figure 6 , Figure 7 The overall process diagram in the figure can be divided into the following major steps:
[0113] 1) The read descriptor unit 613 periodically detects whether there is a build command in the build buffer 612. If there is no build command in the build buffer 612, step 1) is repeated; if there is a build command in the build buffer 612, step 2) is executed;
[0114] 2) the read descriptor unit 613 reads the descriptor from the first storage area according to the storage address specified by the build command;
[0115] 3) The total information block reading unit 615 reads the total information block from the second storage area according to the storage address specified by the descriptor, and converts the first word (i.e. Figure 5 The first row of the total information block in the total information block) is written into the first word buffer, and the correction value in the total information block is written into the correction value buffer 620;
[0116] 4) The correction position block reading unit 617 and the template reading unit 625 periodically detect whether the first word buffer is empty. If it is not empty, step 5) is executed. If it is empty, step 3) is continued.
[0117] 5) If the mode field in the first word buffer is the first value, the template reading unit 625 reads the target template block from the internal storage of the control page linked list device 600 based on the template block starting position of the target template block in the first word buffer; if the mode field in the first word buffer is the second value, the template reading unit 625 reads the target template block from the external storage of the control page linked list device 600 based on the template block starting position of the target template block in the first word buffer;
[0118] 6) Writing the read target template block into the template buffer 623;
[0119] 7) When the target template block is read, the correction position block reading unit 617 reads the correction position block according to the storage address of the correction position specified by the first word buffer 616. Specifically, if the mode field in the first word buffer is a first value, the correction position block reading unit 617 reads the target template block from the internal storage of the control page linked list device 600 based on the template block starting position of the target template block in the first word buffer; if the mode field in the first word buffer is a second value, the correction position block reading unit 617 reads the target template block from the external storage of the control page linked list device 600 based on the template block starting position of the target template block in the first word buffer;
[0120] 8) The correction position block reading unit 617 saves the read correction position block to the correction position buffer 619, and determines whether the correction position has been read. If the correction position has been read, it returns to execute the above step 4); if the correction position has not been read, it returns to execute 7);
[0121] 9) The template correction unit 618 periodically detects whether there is data in the correction value buffer 620 and the correction position buffer 619. If there is data in the correction value buffer 620 and the correction position buffer 619, the template correction is triggered; if there is no data in the correction value buffer 620 and the correction position buffer 619, the correction value buffer 620 and the correction position buffer 619 continue to detect whether there is data;
[0122] 10) When the target template block is modified, the template modification unit 618 performs aggregation check on the multiple target template blocks, and if the multiple target template blocks are continuous template blocks, writes the multiple target template blocks into the aggregation buffer;
[0123] 11) The construction unit 622 performs a replacement operation of the target template block on the initial control page list copied from the control page list template according to the target template block in the aggregation buffer, so as to construct a target control page list.
[0124] This completes the description of the entire plan.
[0125] See also Figure 8 , is a schematic diagram of an electronic device provided by an embodiment of the present application. The electronic device includes a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the above method is implemented.
[0126] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0127] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the method in the embodiment of the present invention. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, that is, implementing the method in the above method embodiment.
[0128] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0129] One embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the above method is implemented.
[0130] Although the implementation method of the present invention has been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A control page linked list construction method based on a control page linked list template, characterized in that: The control page linked list template is allowed to be divided into a plurality of template blocks; the method comprises: Receive a build command sent by a host, wherein the build command is used to specify a correction information block of a target template block to be corrected in the control page linked list template, wherein the correction information block includes a template block starting position, a template block size, a correction position of the target template block, and correction values corresponding to each correction position; Starting from the template start position, according to the template block size, the target template block is obtained from the control page linked list template, and the content at each correction position in the target template block is corrected to the correction value corresponding to the correction position; A control page linked list is constructed based on the modified target template block.
2. The method according to claim 1, characterized in that The construction command is specifically used to specify the storage address of the descriptor, and the descriptor is used to specify the storage address of the correction information block; After receiving the build command, the method further includes: The descriptor is read from the first storage area according to the storage address specified by the build command, and the correction information block is read from the second storage area according to the storage address specified by the descriptor.
3. The method according to claim 2, characterized in that One or more of the correction information blocks are located in the same correction table, and the correction information blocks located in the same correction table have continuous storage addresses; the descriptor specifies the storage address of each of the correction information blocks by specifically specifying the storage address of the correction table and the number of correction information blocks included in the correction table.
4. The method according to claim 3, characterized in that The data structure of the descriptor includes a correction table quantity field and a first number of correction table fields, the first number of correction table fields have a sequence, each of the correction table fields is used to specify a storage address of one of the correction tables and the number of correction information blocks included in the correction table, and the correction table quantity field is used to specify the number of correction table fields actually used in the descriptor; After reading the descriptor, the storage address of each correction information block specified by the descriptor is obtained by the following method; According to the sequence of the correction table fields, starting from the first correction table field, sequentially traverse the storage address of the correction table specified by each correction table field and the corresponding number of correction information blocks; Determining the storage address of each correction information block in each correction table in turn according to the index address of the correction table obtained through traversal and the number of correction information blocks included in the correction table; After the number of traversed correction table fields reaches the value of the correction table number field, the traversal operation is stopped.
5. The method according to claim 2, characterized in that The correction information block includes a total information block and a correction position block, wherein the correction position block is used to specify the correction position of the target template block, and the total information block is used to specify the template starting position of the target template block, the template block size, the correction value and the storage address of the correction position block; The step of reading the correction information block from the second storage area according to the storage address specified by the descriptor comprises: The total information block is read from the second storage area according to the storage address specified by the descriptor, and the corrected position block is read from the third storage area according to the storage address of the corrected position block specified by the total information block.
6. The method according to claim 5, characterized in that The data structure of the correction position block includes a plurality of position fields in a sequential order, each of the position fields is used to specify one of the correction positions of the target template block, and the total information block is also used to specify the number of position fields actually used to specify the correction positions in the correction position block; After reading the correction position block, the correction position specified by the correction information block is obtained by the following method: According to the sequence of the position fields in the correction position block, traverse the correction positions specified by the position fields in sequence; After the number of traversed position fields reaches the number of position fields specified by the correction information block, the traversal is stopped.
7. The method according to claim 1, characterized in that The control page linked list template is copied to a specified location to obtain an initial control page linked list located at the specified location, and the correction information block is also used to specify the storage address of the target template block in the initial control page linked list; The step of constructing a control page linked list based on the modified target template block includes: According to the storage address of the target template block in the initial control page list specified by the correction information block, the target template block in the initial control page list is replaced with the corrected target template block to construct the required target control page list from the initial control page list.
8. The method according to claim 7, characterized in that In the case where the target control page linked list includes multiple control pages, the descriptor is further used to specify the starting storage address of the target control page linked list, the number of control pages included in the target control page linked list, and the storage address of each of the control pages; After constructing the target control page linked list, the method further includes: The starting storage address of the target control page linked list specified by the descriptor, the number of control pages included in the target control page linked list, and the storage address of each control page are returned to the object that needs to execute the target control page linked list.
9. The method according to claim 7, characterized in that The step of replacing the target template block in the initial control page linked list with the modified target template block includes: After the first target template block is corrected, suspending the replacement operation of the target template block, and continuing to wait for one or more second target template blocks that are corrected after the first target template; If the first target template block and the second target template block are continuous target template blocks in the initial control page linked list, the corrected first target template block and the second target template block are aggregated into an aggregated target template, and a target template block replacement operation is performed based on the aggregated target template.
10. The method according to claim 1, characterized in that When the target template block has multiple correction positions, correcting the target template block includes: Based on the correction information block specified by the build command, the plurality of correction positions are corrected in parallel.
11. A control page link list construction device based on a control page link list template, characterized in that: The control page linked list template is divided into a plurality of template blocks; the device comprises: A host configuration unit, configured to receive a build command issued by the host, wherein the build command is used to specify a correction information block of a target template block to be corrected in the control page linked list template, wherein the correction information block includes a template block starting position, a template block size, a correction position of the target template block, and correction values corresponding to each correction position; A template reading unit, used for obtaining the target template block from the control page linked list template starting from the template start position and according to the template block size; A template correction unit, used for correcting the content at each correction position in the target template block to a correction value corresponding to the correction position; The construction unit is used to construct a control page linked list according to the modified target template block.
12. The device according to claim 11, characterized in that The construction command is specifically used to specify the storage address of the descriptor, and the descriptor is used to specify the storage address of the correction information block; The apparatus further comprises a read descriptor unit and a read correction information unit, wherein: The read descriptor unit is used to read the descriptor from the first storage area according to the storage address specified by the build command; The read correction information unit is used to read the correction information block from the second storage area according to the storage address specified by the descriptor.
13. The device according to claim 12, characterized in that The correction information block includes a total information block and a correction position block, wherein the correction position block is used to specify the correction position of the target template block, and the total information block is used to specify the template starting position of the target template block, the template block size, the correction value and the storage address of the correction position block; The read correction information unit specifically includes a total information block reading unit, a correction position block reading unit, a correction value buffer, a first word buffer and a correction position buffer, wherein: The total information block reading unit is used to read the total information block from the second storage area according to the storage address specified by the descriptor, and save the template start position, the template block size and the storage address of the correction position block specified by the total information block to the first word buffer, and save the correction value specified by the total information block to the correction value buffer; The correction position block reading unit is used to read the correction position block from the third storage area based on the storage address of the correction position block in the first word buffer, and save the correction position specified by the correction position block to the correction position buffer.
14. The device according to claim 13, characterized in that The template correction unit is specifically used to correct the target template block based on the information in the correction value buffer, the first word buffer and the correction position buffer.
15. The device according to claim 11, characterized in that The control page linked list template is copied to a specified location to obtain an initial control page linked list located at the specified location, and the correction information block is also used to specify the storage address of the target template block in the initial control page linked list; The construction unit is specifically used to replace the target template block in the initial control page list with the corrected target template block according to the storage address of the target template block in the initial control page list specified by the correction information block, so as to construct the required target control page list from the initial control page list.
16. The device according to claim 15, characterized in that The device also includes an aggregation information buffer, the template correction unit is specifically used to save the target template block that has been corrected to the aggregation information buffer, and the construction unit is specifically used to determine whether the first target template block and the second target template block in the aggregation information buffer are continuous target template blocks in the initial control page linked list. If so, the first target template block and the second target template block that have been corrected are aggregated into an aggregate target template, and a target template block replacement operation is performed based on the aggregate target template.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
18. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
File management method of embedded equipment and system
CN101582089A
Method and system for associated output of WEB class user behavior and user information
CN102664935A
Decision-making method and system for fault mode and influence analysis and storage medium
CN111338876A
Method and system for constructing control page chain table, storage medium and equipment
CN114048149A
Control page linked list construction device and electronic equipment
CN117008843A