Resynchronization Method, System, Storage Medium and Electronic Device of Control Block

By introducing a resynchronization execution signal buffer unit into the resynchronization device of the control block, the resynchronization problem of concurrent execution signals is solved, and the problem of low resynchronization efficiency in the UAA architecture is solved, and efficient control block synchronization is achieved.

CN119621637BActive Publication Date: 2025-05-27SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510149787.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-05-27
Estimated Expiration
2045-02-11

AI Technical Summary

Technical Problem

In the UAA architecture, the resynchronization efficiency of the control block is low, resulting in the concurrently executed control blocks that cannot be completed simultaneously, and additional resynchronization devices are required for processing. Frequent memory access operations affect the read and write performance of the host.

Method used

By introducing a resynchronization execution signal buffer unit into the resynchronization device of the control block, the target execution signal sent by the host is received and its resynchronization identification is detected. If resynchronization processing is required, the target execution signal is written into the buffer unit, and the multiple execution signals are resynchronized until all control blocks in the same control page have completed synchronization.

Benefits of technology

This method reduces frequent access to host memory, improves the resynchronization efficiency of control blocks, and ensures that concurrently executed control blocks can efficiently complete synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621637B_ABST
    Figure CN119621637B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a method, system, storage medium, and electronic device for resynchronizing a control block, which relates to the technical field of servers. The method for resynchronizing the control block is applied to a resynchronization device of the control block. The resynchronization device of the control block includes a resynchronization execution signal buffer unit. The method includes: receiving a target execution signal sent by a host based on a control request; detecting a resynchronization identifier of the target execution signal, and when it is detected that the resynchronization identifier indicates that the target execution signal needs to be resynchronized, writing the target execution signal into the resynchronization execution signal buffer unit of the resynchronization device of the control block; performing resynchronization processing on multiple execution signals in the resynchronization execution signal buffer unit to obtain synchronization completion results of multiple control blocks, where the multiple control blocks belong to the same control page. It solves the problem of low resynchronization efficiency of control blocks in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of servers, and in particular, to a resynchronization method, system, storage medium, and electronic device for control blocks. Background Art

[0002] Currently, in the UAA (Universal Acceleration Architecture), a control page (CP, Control Page) and a control block (CB, Control Command Block) are defined. A CP usually corresponds to a control request from the host. In a CP, there are several CBs, and these CBs respectively complete a series of operation steps required for the control request. In the UAA architecture, multiple CBs are supported to be triggered in parallel. However, due to external conditions, the concurrently executed CBs cannot be guaranteed to complete simultaneously, which requires an additional resynchronization device to resynchronize multiple concurrently executed CBs. After all CBs are confirmed to be completed, subsequent operations can be executed.

[0003] In the traditional solution, after the resynchronization device receives each DONE signal (execution signal), if the resynchronization flag in the DONE signal is valid, it is necessary to read the resyncCurrentCnt (current count) field and the resyncTargetCnt (target count) field in the corresponding CP from the host memory to determine whether all CBs are completed. For each DONE, the processes of reading data from the host memory and updating data to the host memory are required, and frequent memory access operations affect the read and write performance of the host, resulting in low resynchronization efficiency of the control block.

[0004] Therefore, in the related art, there is a problem of low resynchronization efficiency of the control block.

[0005] In view of the problem of low resynchronization efficiency of the control block in the related art, no effective solution has been proposed yet. Summary of the Invention

[0006] The embodiments of the present application provide a resynchronization method, system, storage medium, and electronic device for control blocks, so as to at least solve the problem of low resynchronization efficiency of control blocks in the related art.

[0007] According to an embodiment of the present application, a method for resynchronizing a control block is applied to a resynchronization device of a control block. The resynchronization device of the control block includes a resynchronization execution signal buffer unit. The method includes: receiving a target execution signal sent by a host based on a control request, where the control request corresponds to a target control page, the target control page includes a plurality of control blocks, each control block corresponds to a control command, and the target execution signal is a signal generated after the target control block in the target control page completes the control command; detecting a resynchronization identifier of the target execution signal, and in the case where it is detected that the resynchronization identifier indicates that the target execution signal needs to be resynchronized, writing the target execution signal into the resynchronization execution signal buffer unit of the resynchronization device of the control block; performing resynchronization processing on a plurality of execution signals in the resynchronization execution signal buffer unit to obtain synchronization completion results of a plurality of control blocks, where the plurality of control blocks belong to the same control page.

[0008] In an exemplary embodiment, the resynchronization device of the control block further includes a first query unit, a first update unit, an internal cache unit, a first offset address buffer unit, a writing unit, and a control page identifier buffer unit; performing resynchronization processing on a plurality of execution signals in the resynchronization execution signal buffer unit to obtain synchronization completion results of a plurality of control blocks, including: querying, by the first query unit, a target quantity and a current quantity of the target control page from the internal cache unit, where the target quantity represents the quantity of execution signals that need to be resynchronized in the target control page, and the current quantity represents the quantity of execution signals that have been resynchronized in the target control page; in the case where it is determined that the first query unit has queried the target quantity and the current quantity from the internal cache unit, updating, by the first update unit, the target quantity and the current quantity in the internal cache unit; caching, by the first update unit, a first offset address into the first offset address buffer unit, where the first offset address represents a storage address of the target quantity and the current quantity in the memory space of the host; updating, by the writing unit, the target quantity and the current quantity in the memory space of the host according to the first offset address; in the case where it is determined that the writing unit has completed the update, sending an update completion notification to the control page identifier buffer unit; in the case where it is determined that the control page identifier buffer unit has cached an identifier of the target control page, sending the identifier of the target control page to a control command scheduling engine of the host to obtain the synchronization completion results of the plurality of control blocks.

[0009] In an exemplary embodiment, the target execution signal includes the address information of the target control block. Querying the target quantity and the current quantity of the target control page from the internal cache unit by the one-time query unit includes: obtaining the address information of the target control block from the target execution signal, where the address information is composed of multiple bits; reading the bit information at a preset position from the address information according to the size of the control page preset by the host to obtain the index of the target control page; querying the target quantity and the current quantity from the internal cache unit according to the index of the target control page.

[0010] In an exemplary embodiment, when it is determined that the one-time query unit has queried the target quantity and the current quantity from the internal cache unit, updating the target quantity and the current quantity in the internal cache unit by the one-time update unit includes: determining whether the difference between the target quantity and the current quantity is equal to a first preset value; when it is determined that the difference between the target quantity and the current quantity is not equal to the first preset value, updating the value of the current quantity in the internal cache unit to the sum value of the value of the current quantity and the first preset value; when it is determined that the difference between the target quantity and the current quantity is equal to the first preset value, updating the values of both the target quantity and the current quantity in the internal cache unit to a second preset value.

[0011] In an exemplary embodiment, before the first offset address is cached to the first offset address buffer unit by the one-time update unit, the method further includes: determining whether the difference between the target quantity and the current quantity is equal to a second preset value; when it is determined that the difference between the target quantity and the current quantity is equal to the second preset value, caching the first offset address to the first offset address buffer unit by the one-time update unit.

[0012] In an exemplary embodiment, the resynchronization device of the control block further includes a second offset address buffer unit and a control page identifier acquisition unit. When it is determined that the one-time query unit has queried the target quantity and the current quantity from the internal cache unit, the method further includes: caching the second offset address to the second offset address buffer unit by the one-time update unit, where the second offset address represents the storage address of the identifier of the target control page in the memory space of the host; obtaining the second offset address from the second offset address buffer unit by the control page identifier acquisition unit, reading the identifier of the target control page from the memory space of the host according to the second offset address, and caching the identifier of the target control page to the control page identifier buffer unit.

[0013] In an exemplary embodiment, the resynchronization device of the control block further includes a missing signal buffer unit, a primary missing processing unit, a control page header information buffer unit, a secondary query unit, and a secondary update unit. The method further includes: when it is determined that the primary query unit fails to query the target quantity and the current quantity from the internal cache unit, caching the target execution signal to the missing signal buffer unit; when it is determined that the target execution signal exists in the missing signal buffer unit, reading the header information of the target control page from the memory space of the host by the primary missing processing unit, where the header information of the target control page includes the target quantity and the identifier of the target control page; caching the header information of the target control page to the control page header information buffer unit; obtaining the target quantity and the current quantity by the secondary query unit; updating the target quantity and the current quantity in the internal cache unit according to the target quantity and the current quantity obtained by the secondary query unit by the secondary update unit; caching the first offset address to the first offset address buffer unit by the secondary update unit; updating the target quantity and the current quantity in the memory space of the host according to the first offset address by the writing unit; sending an update completion notification to the control page identifier buffer unit when it is determined that the writing unit has completed the update; and sending the identifier of the target control page to the control command scheduling engine when it is determined that the identifier of the target control page has been cached in the control page identifier buffer unit to obtain the synchronization completion result of the multiple control blocks.

[0014] In an exemplary embodiment, obtaining the target quantity and the current quantity by the secondary query unit includes: querying the target quantity and the current quantity from the internal cache unit by the secondary query unit.

[0015] In an exemplary embodiment, the method further includes: when it is determined that the secondary query unit fails to query the target quantity and the current quantity from the internal cache unit, determining whether the target control page is a header control page, where the header control page represents the first control page in a chain of control pages, and the chain of control pages represents multiple interrelated control pages; when it is determined that the target control page is a header control page, obtaining the target quantity from the control page header information buffer unit and determining the third preset value as the value of the current quantity.

[0016] In an exemplary embodiment, the resynchronization device of the control block further includes a secondary missing processing unit. After determining whether the target control page is the head control page, the method further includes: when it is determined that the target control page is not the head control page, obtaining the target quantity and the current quantity through the secondary missing processing unit.

[0017] In an exemplary embodiment, obtaining the target quantity and the current quantity through the secondary missing processing unit includes: searching for the target head control page corresponding to the target control page in the memory space of the host, where the target head control page represents the first control page in the chained control pages where the target control page is located; obtaining the target quantity from the control page header information of the target head control page, and determining the third preset value as the value of the current quantity.

[0018] In an exemplary embodiment, after obtaining the target quantity and the current quantity through the secondary missing processing unit when it is determined that the target control page is not the head control page, the method further includes: reading the identifier of the target control page from the memory space of the host through the control page identifier obtaining unit, and caching the identifier of the target control page into the control page identifier buffer unit.

[0019] In an exemplary embodiment, updating the target quantity and the current quantity in the internal cache unit by the secondary update unit according to the target quantity and the current quantity obtained by the secondary query unit includes: when it is determined that the secondary query unit queries the target quantity and the current quantity from the internal cache unit, determining whether the difference between the target quantity and the current quantity is the fourth preset value; when it is determined that the difference between the target quantity and the current quantity is not equal to the fourth preset value, updating the value of the current quantity in the internal cache unit to the sum value of the current quantity value and the fourth preset value; when it is determined that the difference between the target quantity and the current quantity is equal to the fourth preset value, updating the values of both the target quantity and the current quantity in the internal cache unit to the fifth preset value.

[0020] In an exemplary embodiment, the method further includes: when it is determined that the secondary query unit does not query the target quantity and the current quantity from the internal cache unit, updating the target quantity in the internal cache unit to the target quantity obtained by the secondary query unit, and updating the current quantity in the internal cache unit to the current quantity obtained by the secondary query unit.

[0021] In an exemplary embodiment, after caching the header information of the target control page into the control page header information buffer unit, the method further includes: obtaining, by the control page identifier obtaining unit, the identifier of the target control page from the header information of the target control page in the control page header information buffer unit, and caching the identifier of the target control page into the control page identifier buffer unit.

[0022] In an exemplary embodiment, the method further includes: when it is determined that there are multiple requests accessing the memory space of the host simultaneously, determining an access order of the multiple requests according to a preset rule, where the preset rule is used to indicate access priorities of different types of requests.

[0023] According to another embodiment of the present application, a resynchronization device for a control block is provided, and the resynchronization device for the control block is configured to execute the steps in any one of the above method embodiments.

[0024] According to still another embodiment of the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program is configured to execute the steps in any one of the above method embodiments when running.

[0025] According to still another embodiment of the present application, an electronic device is further provided, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0026] According to still another embodiment of the present application, a computer program product is further provided, including a computer program, and the computer program implements the steps in the above method embodiments when executed by a processor.

[0027] Through the present application, after receiving a target execution signal sent by a host, a resynchronization identifier of the target execution signal can be detected. If it is detected that the resynchronization identifier indicates that the target execution signal needs to be resynchronized, the target execution signal is written into a resynchronization execution signal buffer unit of a resynchronization device of a control block. By performing resynchronization processing on multiple execution signals in the resynchronization execution signal buffer unit, resynchronization of multiple control blocks in the same control page can be achieved. Therefore, the problem of low resynchronization efficiency of control blocks in the related art can be solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 is a hardware structural block diagram of a server device for a resynchronization method of a control block according to an embodiment of the present application;

[0029] Figure 2It is a flowchart of a resynchronization method for a control block according to an embodiment of the present application;

[0030] Figure 3 It is a structural block diagram of a resynchronization device for a control block according to an embodiment of the present application;

[0031] Figure 4 It is a schematic diagram of a data structure according to an embodiment of the present application;

[0032] Figure 5 It is a schematic diagram of request arbitration according to an embodiment of the present application;

[0033] Figure 6 It is a schematic flowchart of a resynchronization method for a control block according to an embodiment of the present application;

[0034] Figure 7 It is a schematic diagram of state transition according to an embodiment of the present application. Detailed implementation manners

[0035] In the following, embodiments of the present application will be described in detail with reference to the accompanying drawings and in conjunction with the embodiments.

[0036] It should be noted that the terms "first", "second", etc. in the description and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence.

[0037] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 It is a hardware structural block diagram of a server device for a resynchronization method of a control block according to an embodiment of the present application. As Figure 1 shown, the server device may include one or more ( Figure 1 only one is shown in Figure 1 the figure) processors 102 (the processors 102 may include, but are not limited to, processing devices such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Among them, the above-mentioned server device may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown in Figure 1 the figure is only schematic and does not limit the structure of the above-mentioned server device. For example, the server device may further include more or fewer components than

[0038] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the resynchronization method of the control block in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the method for resynchronizing the above control block. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the server device through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0039] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the server device. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (Radio Frequency, abbreviated as RF) module, which is used to communicate with the Internet wirelessly.

[0040] In this embodiment, a method for resynchronizing a control block is provided, which is applied to a control block resynchronization device. The control block resynchronization device includes a resynchronization execution signal buffer unit. Figure 2 is a flowchart of the method for resynchronizing a control block according to an embodiment of the present application, as Figure 2 shown, and this process includes the following steps:

[0041] Step S202, receiving a target execution signal sent by the host based on a control request, where the control request corresponds to a target control page, the target control page includes a plurality of control blocks, each control block corresponds to a control command, and the target execution signal is a signal generated after the target control block in the target control page completes the control command;

[0042] It should be noted that in the above step S202, a series of control commands need to be executed for one control request to be completed. Therefore, one control request corresponds to one control page, the control page includes a plurality of control blocks, and the plurality of control blocks correspond to the above series of control commands one by one.

[0043] Step S204: Detect the resynchronization flag of the target execution signal. When it is detected that the resynchronization flag indicates that the target execution signal needs to be resynchronized, write the target execution signal into the resynchronization execution signal buffer unit of the resynchronization device in the control block.

[0044] Optionally, in the above step S204, there are two indications for the resynchronization flag of the target execution signal. One is an indication to synchronize, and the other is not to synchronize. In the same control page, it is necessary to synchronize the concurrently executed control blocks.

[0045] Step S206: Perform resynchronization processing on multiple execution signals in the resynchronization execution signal buffer unit to obtain the synchronization completion results of multiple control blocks, where the multiple control blocks belong to the same control page.

[0046] Through the above steps, after receiving the target execution signal sent by the host, the resynchronization flag of the target execution signal can be detected. If it is detected that the resynchronization flag indicates that the target execution signal needs to be resynchronized, the target execution signal is written into the resynchronization execution signal buffer unit of the resynchronization device in the control block. By performing resynchronization processing on multiple execution signals in the resynchronization execution signal buffer unit, resynchronization of multiple control blocks in the same control page can be achieved. Therefore, the problem of low resynchronization efficiency of control blocks in the related art can be solved.

[0047] In an optional embodiment, Figure 3 is the structural block diagram of the resynchronization device of the control block according to the embodiment of the present application. As Figure 3 shown, after the control command scheduling engine of the host completes the execution of the control command corresponding to the target control block, it will send a DONE signal (equivalent to the target execution signal) to the resynchronization device. After receiving the DONE signal, the resynchronization device will check the resynchronization flag bit and write the DONE signal that needs to be synchronized into the resynchronization DONE buffer unit (equivalent to the resynchronization execution signal buffer unit).

[0048] In an exemplary embodiment, the resynchronization device of the control block further includes a primary query unit, a primary update unit, an internal cache unit, a first offset address buffer unit, a write unit, and a control page identifier buffer unit; performing resynchronization processing on multiple execution signals in the resynchronization execution signal buffer unit to obtain synchronization completion results of multiple control blocks, including: querying, by the primary query unit, a target quantity and a current quantity of the target control page from the internal cache unit, where the target quantity represents the quantity of execution signals that need to be resynchronized in the target control page, and the current quantity represents the quantity of execution signals that have been resynchronized in the target control page; in a case where it is determined that the primary query unit has queried the target quantity and the current quantity from the internal cache unit, updating, by the primary update unit, the target quantity and the current quantity in the internal cache unit; caching, by the primary update unit, a first offset address to the first offset address buffer unit, where the first offset address represents a storage address of the target quantity and the current quantity in the memory space of the host; updating, by the write unit, the target quantity and the current quantity in the memory space of the host according to the first offset address; sending an update completion notification to the control page identifier buffer unit in a case where it is determined that the write unit has completed the update; and sending an identifier of the target control page to a control command scheduling engine of the host to obtain the synchronization completion results of the multiple control blocks in a case where it is determined that the control page identifier buffer unit has cached the identifier of the target control page.

[0049] In an alternative embodiment, as Figure 3 shown, Figure 3 the primary query unit in will query the DONE signals to be synchronized from the resynchronization DONE buffer unit. For the DONE signals, it will query the resyncCurrentCnt (equivalent to the current quantity) field and the resyncTargetCnt (equivalent to the target quantity) field of the CP to which the CB corresponding to the DONE signal belongs from the internal cache unit. The target quantity represents the total quantity of CBs that need to be resynchronized in the CP, and the current quantity represents the quantity of CBs that have been resynchronized in the CP.

[0050] After querying the above resyncCurrentCnt field and resyncTargetCnt field, the one-time update unit will determine whether resyncCurrentcnt + 1 is equal to resycTargetCnt. If not, it means that after the CB corresponding to the current DONE signal completes synchronization, there are still other CBs in this CP that need to be synchronized. At this time, the one-time update unit increments the value of resyncCurrentcnt in the internal buffer unit by 1, indicating that another CB that needs to be synchronized has been completed. If they are equal, it means that the CB corresponding to the current DONE signal is the last CB in this CP that needs to be synchronized. After completing the current CB, the entire CP is completely completed. At this time, the one-time update unit updates both resyncCurrentcnt and resyncTargetCnt in the internal buffer unit to 0.

[0051] After the one-time update unit finishes the update, it will also cache the storage addresses of the resyncCurrentCnt field and resyncTargetCnt field in the host memory into the write CP offset address buffer unit (equivalent to the first offset address buffer unit). Because after determining that the CB corresponding to the current DONE signal is the last CB in this CP that needs to be synchronized, the resyncCurrentCnt field and resyncTargetCnt field in the host memory need to be updated. The specific process is that the write CP unit (equivalent to the write unit) reads the corresponding storage address from the write CP offset address buffer unit to update the resyncCurrentCnt field and resyncTargetCnt field in the host memory space.

[0052] After the write CP unit updates the resyncCurrentCnt field and resyncTargetCnt field in the host memory, it means that all the CBs of this CP have been synchronously executed. Then, the identifier of this CP (equivalent to the identifier of the target control page) is sent to the control command scheduling engine of the host through the ENQ buffer unit (equivalent to the control page identifier buffer unit) to notify the control command scheduling engine to perform subsequent processing.

[0053] Through the above embodiments, the synchronized control blocks can be recorded inside the resynchronization device of the control block, and after all the control blocks that need to be synchronized are completed, the synchronization process with the host is carried out, reducing the frequency of accessing the host memory and improving the synchronization efficiency of the control block.

[0054] In an exemplary embodiment, the target execution signal includes the address information of the target control block. Querying the target quantity and the current quantity of the target control page from the internal cache unit by the one-time query unit includes: obtaining the address information of the target control block from the target execution signal, where the address information is composed of multiple bits; reading the bit information at a preset position from the address information according to the size of the control page preset by the host to obtain the index of the target control page; querying the target quantity and the current quantity from the internal cache unit according to the index of the target control page.

[0055] In an alternative embodiment, the one-time query unit needs to query the target quantity and the current quantity of the target control page from the internal cache unit according to the index of the target control page, and the index of the target control page can be obtained from the address information of the target control block carried by the target execution signal, as Figure 4 shown, the bits of the CB address in the DONE signal are in the 23-4th positions. Among them, the index CP_IDX of the control page is related to the size of the CP. The specific rules are as follows: when the CP size is 512b, CP_IDX is the 21-9th bits of the CB address; when the CP size is 1Kb, CP_IDX is the 20-10th bits of the CB address; when the CP size is 2Kb, CP_IDX is the 20-11th bits of the CB address.

[0056] In an exemplary embodiment, when it is determined that the one-time query unit has queried the target quantity and the current quantity from the internal cache unit, the one-time update unit updates the target quantity and the current quantity in the internal cache unit, including: judging whether the difference between the target quantity and the current quantity is equal to a first preset value; when it is determined that the difference between the target quantity and the current quantity is not equal to the first preset value, updating the value of the current quantity in the internal cache unit to the sum value of the value of the current quantity and the first preset value; when it is determined that the difference between the target quantity and the current quantity is equal to the first preset value, updating the values of both the target quantity and the current quantity in the internal cache unit to a second preset value.

[0057] In an alternative embodiment, as Figure 3As shown, after the first query unit queries the resyncCurrentCnt field and the resyncTargetCnt field from the internal cache unit, the first update unit determines whether resyncCurrentcnt + 1 is equal to resycTargetCnt. If not, it indicates that after the CB corresponding to the current DONE signal completes synchronization, there are other CBs in this CP that need to be synchronized. At this time, the first update unit increments the value of resyncCurrentcnt in the internal buffer unit by 1 (equivalent to the first preset value), indicating that another CB that needs to be synchronized has been completed. If equal, it indicates that the CB corresponding to the current DONE signal is the last CB in this CP that needs to be synchronized, and the entire CP is completed after the current CB. At this time, the first update unit updates both resyncCurrentcnt and resyncTargetCnt in the internal buffer unit to 0 (equivalent to the second preset value).

[0058] In an exemplary embodiment, before the first update unit caches the first offset address into the first offset address buffer unit, the method further includes: determining whether the difference between the target quantity and the current quantity is equal to a second preset value; in the case where it is determined that the difference between the target quantity and the current quantity is equal to the second preset value, caching the first offset address into the first offset address buffer unit by the first update unit.

[0059] In an alternative embodiment, after the first update unit determines that resyncCurrentcnt + 1 is equal to resycTargetCnt, it also caches the storage addresses of the resyncCurrentCnt field and the resyncTargetCnt field in the host memory into the write CP offset address buffer unit (equivalent to the first offset address buffer unit).

[0060] In an exemplary embodiment, the resynchronization device of the control block further includes a second offset address buffer unit and a control page identifier acquisition unit. In the case where it is determined that the first query unit has queried the target quantity and the current quantity from the internal cache unit, the method further includes: caching the second offset address into the second offset address buffer unit by the first update unit, where the second offset address represents the storage address of the identifier of the target control page in the memory space of the host; acquiring the second offset address from the second offset address buffer unit by the control page identifier acquisition unit, reading the identifier of the target control page from the memory space of the host according to the second offset address, and caching the identifier of the target control page into the control page identifier buffer unit.

[0061] In an alternative embodiment, as Figure 3 shown, before the ENQ buffer unit sends the ENQ (equivalent to the identifier of the control page) to the control command scheduling engine of the host, it needs to obtain the ENQ first. The specific process of obtaining the ENQ is as follows: the one-time update unit caches the storage address of the ENQ in the host memory (equivalent to the second offset address) to the hit DONE offset address buffer unit (equivalent to the second offset address buffer unit), and then the ENQ acquisition unit (equivalent to the control page identifier acquisition unit) reads the ENQ from the host memory according to the storage address of the ENQ in the host memory, and then caches the ENQ to the ENQ buffer unit.

[0062] In an exemplary embodiment, the resynchronization device of the control block further includes a missing signal buffer unit, a one-time missing processing unit, a control page header information buffer unit, a secondary query unit, and a secondary update unit. The method further includes: when it is determined that the one-time query unit does not query the target quantity and the current quantity from the internal cache unit, caching the target execution signal to the missing signal buffer unit; when it is determined that the target execution signal exists in the missing signal buffer unit, reading the header information of the target control page from the memory space of the host through the one-time missing processing unit, where the header information of the target control page includes the target quantity and the identifier of the target control page; caching the header information of the target control page to the control page header information buffer unit; obtaining the target quantity and the current quantity through the secondary query unit; updating the target quantity and the current quantity in the internal cache unit according to the target quantity and the current quantity obtained by the secondary query unit through the secondary update unit; caching the first offset address to the first offset address buffer unit through the secondary update unit; updating the target quantity and the current quantity in the memory space of the host according to the first offset address through the writing unit; sending an update completion notification to the control page identifier buffer unit when it is determined that the writing unit has completed the update; and when it is determined that the target control page identifier has been cached in the control page identifier buffer unit, sending the target control page identifier to the control command scheduling engine to obtain the synchronization completion result of the multiple control blocks.

[0063] In an alternative embodiment, as Figure 3As shown, if the first query unit fails to query the resyncCurrentCnt field and resyncTargetCnt field of the CP to which the CB corresponding to the DONE signal belongs in the internal cache unit, it indicates that this is the first CB processed in this CP. At this time, the DONE signal is saved to the missing DONE buffer unit (equivalent to the missing signal buffer unit). The first missing processing unit will obtain the CP header information of the CP to which the CB corresponding to the DONE signal belongs from the host memory. The CP header information contains the resyncTargetCnt field and ENQ of this CP, and then the CP header information is saved to the CP header information buffer unit (equivalent to the control page header information buffer unit). Next, the second query unit needs to obtain the resyncCurrentCnt field and resyncTargetCnt field of this CP, and then the second update unit updates the internal cache unit according to the resyncCurrentCnt field and resyncTargetCnt field, and at the same time caches the first offset address to the write CP offset address buffer unit. The write CP unit updates the resyncCurrentCnt field and resyncTargetCnt field in the host memory according to the first offset address.

[0064] After the write CP unit updates the resyncCurrentCnt field and resyncTargetCnt field in the host memory, it means that all the CBs of this CP have been synchronously executed. Then, the identifier of this CP is sent to the control command scheduling engine of the host through the ENQ buffer unit to notify the control command scheduling engine to perform subsequent processing.

[0065] In an exemplary embodiment, obtaining the target quantity and the current quantity by the second query unit includes: querying the target quantity and the current quantity from the internal cache unit by the second query unit.

[0066] In an exemplary embodiment, the method further includes: when it is determined that the second query unit fails to query the target quantity and the current quantity from the internal cache unit, determining whether the target control page is the header control page, where the header control page represents the first control page in the chained control pages, and the chained control pages represent multiple interrelated control pages; when it is determined that the target control page is the header control page, obtaining the target quantity from the control page header information buffer unit, and determining the third preset value as the value of the current quantity.

[0067] In an exemplary embodiment, the resynchronization device of the control block further includes a secondary missing processing unit. After determining whether the target control page is a header control page, the method further includes: when it is determined that the target control page is not a header control page, obtaining the target quantity and the current quantity through the secondary missing processing unit.

[0068] In an exemplary embodiment, obtaining the target quantity and the current quantity through the secondary missing processing unit includes: searching for a target header control page corresponding to the target control page in the memory space of the host, where the target header control page represents the first control page in the chained control page where the target control page is located; obtaining the target quantity from the control page header information of the target header control page, and determining the third preset value as the value of the current quantity.

[0069] The secondary query unit obtains the target quantity and the current quantity of the CP and caches them in the internal cache unit. The specific process is as follows: Considering a special case where the resynchronization device continuously receives two DONE signals belonging to the same CP, and the first DONE signal fails to query the resyncCurrentCnt field and the resyncTargetCnt field from the internal cache unit, so it is queried through the secondary query unit. When the second DONE signal is received before the secondary query unit notifies the secondary update unit to update the internal cache unit after querying the data, the second DONE signal also fails to query the resyncCurrentCnt field and the resyncTargetCnt field from the internal cache unit. However, when the second DONE signal is queried through the secondary query unit, the update of the internal cache unit has been completed in the process of the first DONE signal. Therefore, when the secondary query unit obtains the resyncCurrentCnt field and the resyncTargetCnt field of this CP, it first selects to query from the internal cache unit. If the resyncCurrentCnt field and the resyncTargetCnt field are not queried from the internal cache unit, it is determined whether the current CP is the head CP. The head CP refers to the first CP in the chained CP. In the chained CP, the resyncTargetCnt field and the ENQ of the CP are stored in the CP header information of the head CP. If the current CP is the head CP, the resyncTargetCnt field of this CP is directly obtained from the CP header buffer unit. Since the current CB is the first CB, the resyncCurrentCnt field of this CP can be directly set to 1 (equivalent to the third preset value, with the initial value regarded as 0 and becoming 1 after the current CB is completed), and then the resyncTargetCnt field and the resyncCurrentCnt field of this CP are written into the internal cache unit through the secondary update unit. When processing the next CB, the resyncTargetCnt field and the resyncCurrentCnt field can be directly queried from the internal cache unit through the primary query unit. If the current CP is not the head CP, the resyncTargetCnt field cached in the CP header information buffer unit in the above embodiment is inaccurate. At this time, the secondary missing processing unit needs to query the CP header information of the head CP corresponding to this CP from the host memory, then obtain the resyncTargetCnt field from the CP header information, directly set the resyncCurrentCnt field to 1, and then write the resyncTargetCnt field and the resyncCurrentCnt field of this CP into the internal cache unit through the secondary update unit.

[0070] In an exemplary embodiment, after the secondary missing processing unit obtains the target quantity and the current quantity and determines that the target control page is not the head control page, the method further includes: the control page identifier acquisition unit reads the identifier of the target control page from the memory space of the host and caches the identifier of the target control page into the control page identifier buffer unit.

[0071] In an exemplary embodiment, the secondary update unit updates the target quantity and the current quantity in the internal cache unit according to the target quantity and the current quantity obtained by the secondary query unit, including: when it is determined that the secondary query unit queries the target quantity and the current quantity from the internal cache unit, determining whether the difference between the target quantity and the current quantity is a fourth preset value; when it is determined that the difference between the target quantity and the current quantity is not equal to the fourth preset value, updating the value of the current quantity in the internal cache unit to the sum of the value of the current quantity and the fourth preset value; when it is determined that the difference between the target quantity and the current quantity is equal to the fourth preset value, updating the values of both the target quantity and the current quantity in the internal cache unit to a fifth preset value.

[0072] Optionally, in the above embodiment, when the secondary update unit updates the resyncTargetCnt field and the resyncCurrentCnt field in the internal cache unit, it also needs to determine whether resyncCurrentcnt + 1 is equal to resycTargetCnt. If not, increment the value of resyncCurrentcnt in the internal buffer unit by 1 (equivalent to the fourth preset value), and if equal, update both resyncCurrentcnt and resyncTargetCnt to 0 (equivalent to the fifth preset value).

[0073] In an exemplary embodiment, the method further includes: when it is determined that the secondary query unit does not query the target quantity and the current quantity from the internal cache unit, updating the target quantity in the internal cache unit to the target quantity obtained by the secondary query unit and updating the current quantity in the internal cache unit to the current quantity obtained by the secondary query unit.

[0074] In an exemplary embodiment, after caching the header information of the target control page in the control page header information buffer unit, the method further includes: obtaining, by the control page identifier obtaining unit, the identifier of the target control page in the header information of the target control page from the control page header information buffer unit, and caching the identifier of the target control page in the control page identifier buffer unit.

[0075] In an alternative embodiment, if the current CP is not the header CP, the control page identifier obtaining unit directly reads the identifier of the current CP from the host memory.

[0076] In an exemplary embodiment, the method further includes: when it is determined that there are multiple requests accessing the memory space of the host simultaneously, determining the access order of the multiple requests according to a preset rule, where the preset rule is used to indicate the access priorities of different types of requests.

[0077] In an alternative embodiment, as Figure 5 shown, the absence of the DONE cache unit will initiate a request to obtain the CP header information, the CP header information buffer unit will initiate a request to obtain the resyncCurrentcnt information, and hitting the DONE offset address buffer will initiate a request to obtain the ENQ information. All the above requests need to read from the host memory through the AXI bus. Therefore, an arbitration unit is required to perform arbitration according to the preset rule to determine the access priorities of the requests.

[0078] Through the above embodiments, in the case of high concurrency, the access requests to the host memory can be executed in an orderly manner, reducing the problem of incorrect data version read due to simultaneous access to the host memory, and ensuring the accuracy of the control block resynchronization process.

[0079] Obviously, the above-described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. To better understand the verification method of the above test cases, the following will describe the above process in conjunction with embodiments, but it is not used to limit the technical solutions of the embodiments of the present application. Specifically:

[0080] In an alternative embodiment, Figure 6 is a schematic flowchart of the resynchronization method of the control block according to the embodiment of the present application. The above method is applied to a resynchronization device of the control block as shown in Figure 3 shown. As shown in Figure 6 shown, the above method includes the following steps:

[0081] Step 1, detect the status of the resync DONE buffer unit. Step 2, determine whether there is a DONE signal to be synchronized in the resync DONE buffer unit. If yes, execute Step 3; otherwise, enter the idle state. Step 3, determine the index CP_IDX of the corresponding current CP according to the current DONE signal, and query the resyncTargetCnt field and resyncCurrentCnt field of the current CP from the internal cache unit according to the index CP_IDX. Step 4, determine whether the resyncTargetCnt field and resyncCurrentCnt field of the current CP exist in the internal cache unit. If a hit occurs, execute Step 5; if not, execute Step 12. Step 5, determine whether resyncCurrentCnt + 1 is equal to resyncTargetCnt. If yes, execute Step 7 and Step 8; otherwise, execute Step 6. Step 6, increment the resyncCurrentCnt value in the internal cache unit by 1. Step 7, update both the resyncTargetCnt field and resyncCurrentCnt field in the internal cache unit to 0. Step 8, write the storage address of the ENQ of the current CP in the host memory to the hit DONE offset address buffer unit. Step 9, detect the status of the hit DONE offset address buffer unit. Step 10, determine whether the hit DONE offset address buffer unit is empty. If yes, repeat Steps 9 - 10; otherwise, execute Step 11 and Step 26. Step 11, read the ENQ from the host memory and execute Step 17. Step 12, cache the current DONE signal to the missing DONE buffer unit. Step 13, detect the status of the missing DONE buffer unit. Step 14, determine whether the missing DONE buffer unit is empty. If yes, repeat Steps 13 - 14; otherwise, execute Step 15. Step 15, read the CP header information corresponding to the current DONE signal. Step 16, cache the CP header information to the CP header information buffer unit, where the CP header information includes ENQ and resyncTargetCnt, and execute Steps 17 and 18. Step 17, cache the obtained ENQ to the ENQ buffer unit. Step 18, detect the status of the CP header information buffer unit. Step 19, determine whether the CP header information buffer unit is empty. If yes, jump to Step 1; otherwise, execute Step 20 and Step 26. Step 20, determine the index CP_IDX of the corresponding current CP according to the current DONE signal, and query the resyncTargetCnt field and resyncCurrentCnt field of the current CP from the internal cache unit according to the index CP_IDX. Step 21, determine whether the resyncTargetCnt field and resyncCurrentCnt field of the current CP exist in the internal cache unit. If a hit occurs, execute Step 22; if not, execute Step 23.Step 22: Determine whether resyncCurrentCnt + 1 is equal to resyncTargetCnt. If yes, execute Step 7; otherwise, execute Step 6. Step 23: Determine whether the current CP is the head CP. If yes, execute Step 25; otherwise, execute Step 24. Step 24: Read resyncTargetCnt and resyncCurrentCnt from the host memory. Step 25: When the current CP is the head CP, write resyncTargetCnt and resyncCurrentCnt = 1 in the CP header information buffer unit into the internal cache space. When the current CP is not the head CP, write the resyncTargetCnt and resyncCurrentCnt = 1 read from the host in Step 24 into the internal cache space. Step 26: Write the addresses of the resyncTargetCnt field and resyncCurrentCnt field of the current CP in the host memory into the write CP offset address buffer unit. Step 27: Detect the status of the write CP offset address buffer unit. Step 28: Determine whether the write CP offset address buffer unit is empty. If yes, repeat Steps 27 - 28; otherwise, execute Step 29. Step 29: Write the resyncTargetCnt field and resyncCurrentCnt field of the current CP in the host memory as 0 according to the addresses of the resyncTargetCnt field and resyncCurrentCnt field of the current CP in the host memory. Step 30: Detect the status of the AXI bus. Step 31: Determine whether the writing is completed. If yes, execute Step 32; otherwise, repeat Steps 30 - 31. Step 32: Send the ENQ buffered in the ENQ buffer unit in Step 17 to the control command scheduling engine of the host, indicating that all CBs in the current CP have been fully synchronized.

[0082] Optionally, in the above steps, the data format definitions of various data involved are as Figure 4 shown, including: 1) DONE buffer unit: The DONE buffer includes a resync DONE buffer unit and a missing DONE buffer unit. The DONE buffer unit is implemented using a 512x32b FIFO (First-In, First-Out), that is, a buffer that can store 512 32-bit wide data, which can meet the maximum burst DONE quantity of the system. The missing DONE buffer unit is implemented using a 16x32b FIFO, that is, a buffer that can store 16 32-bit wide data. Figure 4 shows a 32-bit wide data format, and the definitions related to the solution of this application include a resync identifier and a CB address. The index of the control page can be obtained from the CB address information carried by the DONE signal, as Figure 4As shown, the bit positions of the CB address in the DONE signal are from bit 23 to bit 4. Among them, the index CP_IDX of the control page is related to the size of CP. When the size of CP is 512b, CP_IDX is from bit 21 to bit 9 of the CB address; when the size of CP is 1Kb, CP_IDX is from bit 20 to bit 10 of the CB address; when the size of CP is 2Kb, CP_IDX is from bit 20 to bit 11 of the CB address. 2) Internal cache unit: The internal cache unit is implemented using a 4096x17b RAM (Random Access Memory). In the UAA architecture, the maximum memory pool is 2M, and there are at most 4096 CPs. Using a 4096 RAM can fully match all CPs. Figure 4 shows a 17-bit wide data format. Among them, the current quantity represents the number of synchronized CBs received in the current CP, the target quantity represents the total number of concurrent CBs that need to be received in the current CP, and the valid flag indicates that at least one CB has been received in the current CP, that is, the target quantity and the current quantity are in a valid state. 3) CP header information buffer unit: The CP header information buffer unit is implemented using a 32x64b FIFO. Figure 4 shows a 64-bit wide data format, which includes the target quantity, CB address, ENQ, header CP flag. The header CP flag is used to identify whether the CP where the current CB is located is the header CP. It should be noted that under the header CP, the content of ENQ is the content that actually needs to be dispatched. Under non-header CPs, the content of ENQ under the header CP needs to be read. 4) ENQ buffer unit: The ENQ buffer unit is implemented using a 32x32b FIFO and stores the control page identifiers that need to be dispatched. 5) Offset address buffer unit: The offset address buffer unit includes a hit DONE offset address buffer unit and a write CP offset address buffer unit, which are implemented using a 32x15b FIFO and store bits 23 - 9 of the address where the current CB is located.

[0083] Optionally, in the above steps, both the query and update operations need to access the internal cache unit. To prevent access conflicts, a mutual exclusion access state machine can be used for control to avoid access conflicts. The mutual exclusion access state machine consists of 9 states, and the switching process between each state is as Figure 7As shown below, the definitions and switching conditions of each state machine are as follows: 1) IDLE: Idle state. In this state, first check whether the CP header information buffer unit is empty. If it is not empty, enter the LOOKUP_CACHE state. If it is empty, check whether the resync DONE buffer unit is empty. If it is not empty, enter the LOOKUP_CACHE state. If it is empty, return to the idle state. In this state, if entering the LOOKUP_CACHE state due to the non-empty resync DONE buffer unit, generate a cb_check_hit_cycle signal to indicate that this access to the CACHE (equivalent to the internal cache unit) is caused by the secondary query process. 2) LOOKUP_CACHE: Query CACHE state. In this state, query the CACHE according to the CP_IDX. If a hit occurs, enter the CNT_CHECK state. If a miss occurs, check whether cb_check_hit_cycle is valid. If it is valid, enter the END state. If it is not valid, check whether the current CP is the head CP. If it is the head CP, enter the CACHE_FIRST state. If it is not the head CP, enter the RD_TARGET_REQ state. 3) CNT_CHECK: Comparison state. In this state, compare whether resyncCurrentCnt + 1 is equal to resyncTargetCnt. If they are not equal, enter the CACHE_OTHERS state. If they are equal, enter the CACHE_CLEAR state. 4) RD_TARGET_REQ: Send AXI read request state. In this state, send a read request through AXI to read the resyncCurrentCnt and resyncTargetCnt fields of this CP in the memory, and enter the RD_TARGET_ING state. 5) RD_TARGET_ING: Read AXI state. In this state, wait for the AXI read operation to complete and return the data. If a bus error occurs, directly return to the IDLE state. If the bus access is completed correctly, enter the CACHE_FIRST state. Otherwise, wait in the RD_TARGET_ING state. 6) CACHE_FIRST: First cache refresh state. In this state, write data to the CACHE address corresponding to this CP_IDX, where the valid flag VLD has a value of 1, resyncCurrentCnt = 1, and resyncTargetCnt is the corresponding value in the CP, and then enter the END state. 7) CACHE_OTHERS: Intermediate cache refresh state. In this state, write data to the CACHE address corresponding to this CP_IDX, where the values of VLD and resyncTargetCnt remain unchanged, and resyncCurrentCnt is incremented by 1, and then enter the END state.8) CACHE_CLEAR; Clear the CACHE status. In this state, write all zeros to the CACHE address corresponding to this CP_IDX, and then enter the END state. 9) END: End state.

[0084] Optionally, in the above embodiments, the resynchronization detection device based on the control block and a series of steps achieve efficient resynchronization detection and processing of concurrently executed control blocks. It effectively reduces the performance bottleneck caused by frequent memory access in the traditional solution.

[0085] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.

[0086] In this embodiment, a resynchronization device for control blocks is also provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0087] Figure 3 is a structural block diagram of the resynchronization device for control blocks according to an embodiment of the present application. As Figure 3 shown, the device includes a resynchronization execution signal buffer unit. The device is used to: receive a target execution signal sent by the host based on a control request, where the control request corresponds to a target control page, the target control page includes multiple control blocks, each control block corresponds to a control command, and the target execution signal is a signal generated after the target control block in the target control page completes the control command; detect the resynchronization identifier of the target execution signal, and in the case where it is detected that the resynchronization identifier indicates that the target execution signal needs to be resynchronized, write the target execution signal into the resynchronization execution signal buffer unit of the control block resynchronization device; perform resynchronization processing on multiple execution signals in the resynchronization execution signal buffer unit to obtain synchronization completion results of multiple control blocks, where the multiple control blocks belong to the same control page.

[0088] Through the above device, after receiving the target execution signal sent by the host, the resynchronization identifier of the target execution signal can be detected. If it is detected that the resynchronization identifier indicates that the target execution signal needs to be resynchronized, the target execution signal is written into the resynchronization execution signal buffer unit of the resynchronization device of the control block. By performing resynchronization processing on multiple execution signals in the resynchronization execution signal buffer unit, resynchronization of multiple control blocks in the same control page can be achieved. Therefore, the problem of low resynchronization efficiency of the control block in the related art can be solved.

[0089] In an exemplary embodiment, the resynchronization device of the control block further includes a primary query unit, a primary update unit, an internal cache unit, a first offset address buffer unit, a writing unit, and a control page identifier buffer unit; the device is further configured to: query the target quantity and the current quantity of the target control page from the internal cache unit through the primary query unit, where the target quantity represents the quantity of execution signals that need to be resynchronized in the target control page, and the current quantity represents the quantity of execution signals that have been resynchronized in the target control page; in the case where it is determined that the primary query unit has queried the target quantity and the current quantity from the internal cache unit, update the target quantity and the current quantity in the internal cache unit through the primary update unit; cache the first offset address into the first offset address buffer unit through the primary update unit, where the first offset address represents the storage address of the target quantity and the current quantity in the memory space of the host; update the target quantity and the current quantity in the memory space of the host according to the first offset address through the writing unit; send an update completion notification to the control page identifier buffer unit in the case where it is determined that the writing unit has completed the update; and send the identifier of the target control page to the control command scheduling engine of the host to obtain the synchronization completion result of the multiple control blocks in the case where it is determined that the identifier of the target control page has been cached in the control page identifier buffer unit.

[0090] In an exemplary embodiment, the device is further configured to: obtain the address information of the target control block from the target execution signal, where the address information is composed of multiple bits; read the bit information at a preset position from the address information according to the size of the control page preset by the host to obtain the index of the target control page; and query the target quantity and the current quantity from the internal cache unit according to the index of the target control page.

[0091] In an exemplary embodiment, the device is further configured to: determine whether a difference between the target quantity and the current quantity is equal to a first preset value; in a case where it is determined that the difference between the target quantity and the current quantity is not equal to the first preset value, update a value of the current quantity in the internal cache unit to a sum value of the value of the current quantity and the first preset value; in a case where it is determined that the difference between the target quantity and the current quantity is equal to the first preset value, update both the target quantity and the value of the current quantity in the internal cache unit to a second preset value.

[0092] In an exemplary embodiment, the device is further configured to: determine whether a difference between the target quantity and the current quantity is equal to a second preset value; in a case where it is determined that the difference between the target quantity and the current quantity is equal to the second preset value, cache the first offset address to the first offset address buffer unit through the one-time update unit.

[0093] In an exemplary embodiment, the resynchronization device of the control block further includes a second offset address buffer unit and a control page identifier acquisition unit. The device is further configured to: cache a second offset address to the second offset address buffer unit through the one-time update unit, where the second offset address represents a storage address of an identifier of the target control page in a memory space of the host; acquire the second offset address from the second offset address buffer unit through the control page identifier acquisition unit, read the identifier of the target control page from the memory space of the host according to the second offset address, and cache the identifier of the target control page to the control page identifier buffer unit.

[0094] In an exemplary embodiment, the resynchronization device of the control block further includes a missing signal buffer unit, a primary missing processing unit, a control page header information buffer unit, a secondary query unit, and a secondary update unit. The device is further configured to: when it is determined that the primary query unit fails to query the target quantity and the current quantity from the internal cache unit, cache the target execution signal into the missing signal buffer unit; when it is determined that the target execution signal exists in the missing signal buffer unit, read the header information of the target control page from the memory space of the host through the primary missing processing unit, where the header information of the target control page includes the target quantity and the identifier of the target control page; cache the header information of the target control page into the control page header information buffer unit; obtain the target quantity and the current quantity through the secondary query unit; update the target quantity and the current quantity in the internal cache unit according to the target quantity and the current quantity obtained by the secondary query unit through the secondary update unit; cache the first offset address into the first offset address buffer unit through the secondary update unit; update the target quantity and the current quantity in the memory space of the host according to the first offset address through the writing unit; when it is determined that the writing unit has completed the update, send an update completion notification to the control page identifier buffer unit; when it is determined that the identifier of the target control page has been cached in the control page identifier buffer unit, send the identifier of the target control page to the control command scheduling engine to obtain the synchronization completion result of the multiple control blocks.

[0095] In an exemplary embodiment, the device is further configured to: query the target quantity and the current quantity from the internal cache unit through the secondary query unit.

[0096] In an exemplary embodiment, the device is further configured to: when it is determined that the secondary query unit fails to query the target quantity and the current quantity from the internal cache unit, determine whether the target control page is a header control page, where the header control page represents the first control page in a chained control page, and the chained control page represents multiple interrelated control pages; when it is determined that the target control page is a header control page, obtain the target quantity from the control page header information buffer unit and determine the third preset value as the value of the current quantity.

[0097] In an exemplary embodiment, the resynchronization device of the control block further includes a secondary missing processing unit. The device is further configured to: when it is determined that the target control page is not a header control page, obtain the target quantity and the current quantity through the secondary missing processing unit.

[0098] In an exemplary embodiment, the device is further configured to: find a target header control page corresponding to the target control page from the memory space of the host, where the target header control page represents the first control page in a chained control page where the target control page is located; obtain the target quantity from the control page header information of the target header control page, and determine the third preset value as the value of the current quantity.

[0099] In an exemplary embodiment, the device is further configured to: read, by the control page identifier acquisition unit, an identifier of the target control page from the memory space of the host, and cache the identifier of the target control page to the control page identifier buffer unit.

[0100] In an exemplary embodiment, the device is further configured to: when it is determined that the secondary query unit queries the target quantity and the current quantity from the internal cache unit, determine whether a difference between the target quantity and the current quantity is a fourth preset value; when it is determined that the difference between the target quantity and the current quantity is not equal to the fourth preset value, update the value of the current quantity in the internal cache unit to a sum value of the value of the current quantity and the fourth preset value; when it is determined that the difference between the target quantity and the current quantity is equal to the fourth preset value, update both the value of the target quantity and the value of the current quantity in the internal cache unit to a fifth preset value.

[0101] In an exemplary embodiment, the device is further configured to: when it is determined that the secondary query unit does not query the target quantity and the current quantity from the internal cache unit, update the target quantity in the internal cache unit to the target quantity obtained by the secondary query unit, and update the current quantity in the internal cache unit to the current quantity obtained by the secondary query unit.

[0102] In an exemplary embodiment, the device is further configured to: read, by the control page identifier acquisition unit, the identifier of the target control page from the header information of the target control page in the control page header information buffer unit, and cache the identifier of the target control page to the control page identifier buffer unit.

[0103] In an exemplary embodiment, the device is further configured to: when it is determined that there are multiple requests accessing the memory space of the host simultaneously, determine an access order of the multiple requests according to a preset rule, where the preset rule is used to indicate access priorities of different types of requests.

[0104] It should be noted that the above-mentioned modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules are respectively located in different processors in any combination form.

[0105] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. Wherein, the computer program is set to execute the steps in any one of the above method embodiments when running.

[0106] Optionally, in this embodiment, the above storage medium can be set to store program codes for executing the following steps:

[0107] S1. Receive a target execution signal sent by a host based on a control request, where the control request corresponds to a target control page, the target control page includes a plurality of control blocks, each control block corresponds to a control command, and the target execution signal is a signal generated after the target control block in the target control page completes the control command;

[0108] S2. Detect a resynchronization flag of the target execution signal. When it is detected that the resynchronization flag indicates that the target execution signal needs to be resynchronized, write the target execution signal into a resynchronization execution signal buffer unit of a resynchronization device of the control block.

[0109] S3. Perform resynchronization processing on a plurality of execution signals in the resynchronization execution signal buffer unit to obtain synchronization completion results of a plurality of control blocks, where the plurality of control blocks belong to the same control page.

[0110] In an exemplary embodiment, the above computer-readable storage medium may include but is not limited to: various media such as USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs that can store computer programs.

[0111] An embodiment of the present application also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is set to run the computer program to execute the steps in any one of the above method embodiments.

[0112] Optionally, in this embodiment, the above processor can be set to execute the following steps through a computer program:

[0113] S1. The receiving host receives a target execution signal sent based on a control request, where the control request corresponds to a target control page, the target control page includes a plurality of control blocks, each control block corresponds to a control command, and the target execution signal is a signal generated after the target control block in the target control page completes the control command;

[0114] S2. Detect the resynchronization flag of the target execution signal. When it is detected that the resynchronization flag indicates that the target execution signal needs to be resynchronized, write the target execution signal into the resynchronization execution signal buffer unit of the resynchronization device of the control block;

[0115] S3. Perform resynchronization processing on multiple execution signals in the resynchronization execution signal buffer unit to obtain synchronization completion results of multiple control blocks, where the multiple control blocks belong to the same control page.

[0116] An embodiment of the present application also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0117] Optionally, in this embodiment, the above computer program may be set to execute the following steps through a computer program:

[0118] S1. The receiving host receives a target execution signal sent based on a control request, where the control request corresponds to a target control page, the target control page includes a plurality of control blocks, each control block corresponds to a control command, and the target execution signal is a signal generated after the target control block in the target control page completes the control command;

[0119] S2. Detect the resynchronization flag of the target execution signal. When it is detected that the resynchronization flag indicates that the target execution signal needs to be resynchronized, write the target execution signal into the resynchronization execution signal buffer unit of the resynchronization device of the control block;

[0120] S3. Perform resynchronization processing on multiple execution signals in the resynchronization execution signal buffer unit to obtain synchronization completion results of multiple control blocks, where the multiple control blocks belong to the same control page.

[0121] Specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary embodiments, and will not be elaborated herein.

[0122] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order from here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module for implementation. In this way, the present application is not limited to any specific combination of hardware and software.

[0123] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application shall be included within the protection scope of the present application.

Claims

1. A control block resynchronization method, characterized in that: A resynchronization device applied to a control block, the resynchronization device of the control block comprises a resynchronization execution signal buffer unit, a primary query unit, a primary update unit, an internal cache unit, a first offset address buffer unit, a write unit, and a control page identifier buffer unit, and the method comprises: Receiving a target execution signal sent by a host based on a control request, wherein the control request corresponds to a target control page, the target control page includes a plurality of control blocks, each control block corresponds to a control command, and the target execution signal is a signal generated after the target control block in the target control page completes the control command; detecting a resynchronization flag of the target execution signal, and writing the target execution signal into a resynchronization execution signal buffer unit of a resynchronization device of the control block when detecting that the resynchronization flag indicates that the target execution signal needs to be resynchronized; resynchronizing the plurality of execution signals in the resynchronization execution signal buffer unit to obtain synchronization completion results of a plurality of control blocks, wherein the plurality of control blocks belong to the same control page; The resynchronization process is performed on the multiple execution signals in the resynchronization execution signal buffer unit to obtain synchronization completion results of the multiple control blocks, including: querying the target number and the current number of the target control page from the internal cache unit through the primary query unit, wherein the target number indicates the number of execution signals that need to be resynchronized in the target control page, and the current number indicates the number of execution signals that have been resynchronized in the target control page; When it is determined that the primary query unit has queried the target quantity and the current quantity from the internal cache unit, updating the target quantity and the current quantity in the internal cache unit through the primary update unit; caching the first offset address to the first offset address buffer unit through the primary update unit, wherein the first offset address represents the storage addresses of the target quantity and the current quantity in the memory space of the host; updating the target quantity and the current quantity in the memory space of the host according to the first offset address by the writing unit; When it is determined that the writing unit has completed updating, sending an update completion notification to the control page identifier buffer unit; When it is determined that the identifier of the target control page has been cached in the control page identifier buffer unit, the identifier of the target control page is sent to the control command scheduling engine of the host to obtain synchronization completion results of the multiple control blocks.

2. The method according to claim 1, characterized in that The target execution signal includes address information of the target control block, and querying the target number and current number of the target control page from the internal cache unit through the primary query unit includes: Acquire address information of the target control block from the target execution signal, wherein the address information is composed of a plurality of bits; Reading bit information of a preset position from the address information according to a size of the control page preset by the host to obtain an index of the target control page; The target quantity and the current quantity are queried from the internal cache unit according to the index of the target control page.

3. The method according to claim 1, characterized in that When it is determined that the primary query unit has queried the target quantity and the current quantity from the internal cache unit, updating the target quantity and the current quantity in the internal cache unit by the primary update unit includes: Determining whether a difference between the target quantity and the current quantity is equal to a first preset value; When it is determined that the difference between the target quantity and the current quantity is not equal to the first preset value, updating the value of the current quantity in the internal cache unit to the sum of the value of the current quantity and the first preset value; When it is determined that the difference between the target quantity and the current quantity is equal to the first preset value, the values ​​of the target quantity and the current quantity in the internal cache unit are both updated to a second preset value.

4. The method according to claim 1, characterized in that: The method further includes: caching the first offset address to the first offset address buffer unit by the primary update unit; Determining whether a difference between the target quantity and the current quantity is equal to a second preset value; When it is determined that the difference between the target quantity and the current quantity is equal to the second preset value, the first offset address is cached in the first offset address buffer unit through the primary update unit.

5. The method according to claim 1, characterized in that The control block resynchronization device further comprises a second offset address buffer unit, a control page identifier acquisition unit, In the case where it is determined that the primary query unit has queried the target quantity and the current quantity from the internal cache unit, the method further includes: caching the second offset address to the second offset address buffer unit through the primary update unit, wherein the second offset address represents a storage address of the identifier of the target control page in the memory space of the host; The second offset address is obtained from the second offset address buffer unit through the control page identifier acquisition unit, the identifier of the target control page is read from the memory space of the host according to the second offset address, and the identifier of the target control page is cached to the control page identifier buffer unit.

6. The method according to claim 1, characterized in that The resynchronization device of the control block further includes a missing signal buffer unit, a primary missing processing unit, a control page header information buffer unit, a secondary query unit, and a secondary update unit. The method further includes: When it is determined that the primary query unit has not queried the target quantity and the current quantity from the internal cache unit, cache the target execution signal to the missing signal buffer unit; In the case of determining that the target execution signal exists in the missing signal buffer unit, reading the header information of the target control page from the memory space of the host through the one-miss processing unit, wherein the header information of the target control page includes the target quantity and the identifier of the target control page; Cache the header information of the target control page into the control page header information buffer unit; Acquire the target quantity and the current quantity through the secondary query unit; updating the target quantity and the current quantity in the internal cache unit according to the target quantity and the current quantity acquired by the secondary query unit through the secondary update unit; caching the first offset address to the first offset address buffer unit through the secondary updating unit; updating the target quantity and the current quantity in the memory space of the host according to the first offset address by the writing unit; When it is determined that the writing unit has completed updating, sending an update completion notification to the control page identifier buffer unit; After determining that the identifier of the target control page has been cached in the control page identifier buffer unit, the identifier of the target control page is sent to the control command scheduling engine to obtain synchronization completion results of the multiple control blocks.

7. The method according to claim 6, characterized in that Acquiring the target quantity and the current quantity through the secondary query unit includes: The target quantity and the current quantity are queried from the internal cache unit through the secondary query unit.

8. The method according to claim 7, characterized in that The method further comprises: In the case that it is determined that the secondary query unit has not queried the target quantity and the current quantity from the internal cache unit, determining whether the target control page is a head control page, wherein the head control page represents a first control page in a chain of control pages, and the chain of control pages represents a plurality of mutually related control pages; In the case where it is determined that the target control page is a header control page, the target quantity is acquired from the control page header information buffer unit, and a third preset value is determined as the value of the current quantity.

9. The method according to claim 8, characterized in that The resynchronization device of the control block further comprises a secondary loss processing unit, After determining whether the target control page is a header control page, the method further includes: In the case where it is determined that the target control page is not a head control page, the target number and the current number are acquired by the secondary miss processing unit.

10. The method according to claim 9, characterized in that Acquiring the target quantity and the current quantity by the secondary missing processing unit includes: Searching for a target header control page corresponding to the target control page from the memory space of the host, wherein the target header control page represents the first control page in the chain of control pages where the target control page is located; The target quantity is obtained from the control page header information of the target header control page, and the third preset value is determined as the value of the current quantity.

11. The method according to claim 9, characterized in that In the case where it is determined that the target control page is not a header control page, after obtaining the target quantity and the current quantity through the secondary miss processing unit, the method further includes: The control page identifier acquisition unit reads the identifier of the target control page from the memory space of the host, and caches the identifier of the target control page in the control page identifier buffer unit.

12. The method according to claim 6, characterized in that Updating the target quantity and the current quantity in the internal cache unit according to the target quantity and the current quantity acquired by the secondary query unit by the secondary update unit includes: In the case where it is determined that the secondary query unit queries the target quantity and the current quantity from the internal cache unit, determining whether a difference between the target quantity and the current quantity is a fourth preset value; When it is determined that the difference between the target quantity and the current quantity is not equal to the fourth preset value, updating the value of the current quantity in the internal cache unit to the sum of the value of the current quantity and the fourth preset value; When it is determined that the difference between the target quantity and the current quantity is equal to the fourth preset value, the values ​​of the target quantity and the current quantity in the internal cache unit are both updated to a fifth preset value.

13. The method according to claim 12, characterized in that The method further comprises: When it is determined that the secondary query unit does not query the target quantity and the current quantity from the internal cache unit, the target quantity in the internal cache unit is updated to the target quantity obtained by the secondary query unit, and the current quantity in the internal cache unit is updated to the current quantity obtained by the secondary query unit.

14. The method according to claim 6, characterized in that After caching the header information of the target control page in the control page header information buffer unit, the method further includes: The control page identifier acquisition unit acquires the identifier of the target control page in the header information of the target control page from the control page header information buffer unit, and caches the identifier of the target control page in the control page identifier buffer unit.

15. The method according to claim 11, characterized in that The method further comprises: In the case where it is determined that there are multiple requests to access the memory space of the host at the same time, the access order of the multiple requests is determined according to a preset rule, wherein the preset rule is used to indicate the access priority of different types of requests.

16. A control block resynchronization device, characterized in that: The resynchronization device of the control block is used to execute the steps of the method described in any one of claims 1 to 15.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 15 when executed by a processor.

18. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 15 are implemented.

19. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 15 are implemented.

Citation Information

Patent Citations

  • Method and system for writing data cache, equipment and storage medium

    CN113918101A

  • Instruction control method and device and related equipment

    CN116107634A