Storage control method applied to storage device and storage device

By adopting heterogeneous controllers in storage devices and implementing dynamic negotiation and adjustment of memory windows, the business interruption problem caused by simultaneous exceptions of multiple controllers is solved, ensuring business continuity and improving performance.

CN119759261AActive Publication Date: 2025-04-04MACROSAN TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411765969.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-04-04
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

Multiple controllers in the storage device have abnormalities at the same time resulting in service interruption.

Method used

At least two heterogeneous controllers are adopted to realize dynamic negotiation and adjustment of memory windows through differentiated design of the controller to avoid exceptions at the same time.

Benefits of technology

It effectively avoids abnormalities in each controller in the storage device at the same time, ensures business continuity, and maximizes the performance of each controller in the storage device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759261A_ABST
    Figure CN119759261A_ABST
Patent Text Reader

Abstract

The invention provides a storage control method applied to a storage device and the storage device. In the embodiment of the invention, at least two heterogeneous controllers are adopted in the storage equipment, and through differential design of the controllers, each controller in the storage equipment is prevented from being abnormal at the same time, so that the service continuity is guaranteed; furthermore, in the embodiment, the current memory window negotiation value of each inserted controller is determined on the basis of the actually inserted controller, and the performance of each controller in the storage device is exerted under the condition that the maximum memory window size is allocated to each controller in the storage device to the maximum extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of storage, and in particular to a storage control method and a storage device applied to a storage device. Background Art

[0002] In storage applications, in order to ensure the reliability of storage devices, usually multiple controllers are set up in a storage device. When any controller fails, other controllers take over the business of the failed controller to ensure business continuity. The controller in the storage device is mainly responsible for data transmission and reception, data storage and data protection.

[0003] In specific implementation, each controller in the storage device usually adopts the same design scheme, which may cause each controller to fail at the same time, causing service interruption. Summary of the invention

[0004] The embodiments of the present application provide a storage control method and a storage device applied to a storage device, so as to avoid service interruption caused by abnormalities of various controllers in the storage device at the same time.

[0005] The technical solutions provided in the embodiments of the present application include:

[0006] A storage control method applied to a storage device, wherein the storage device includes N controllers, N is greater than 1, and at least two of the N controllers are heterogeneous controllers; the method includes:

[0007] During the startup process, the first controller determines the maximum value of the memory window supported by the first controller according to the memory size of the physical memory actually installed in the first controller and the hardware requirements configured for the first controller; the hardware requirements at least include the requirements for the physical memory to be accessed by other controllers other than the present controller; the maximum value of the memory window is less than or equal to the size of the memory window in the physical memory accessed by other controllers other than the present controller; the first controller is any controller in the storage device; the current local memory window negotiation identifier of the first controller is a first value, and the first value indicates that the memory window negotiation is not completed;

[0008] After determining the maximum value of the memory window supported by the controller, the first controller detects whether there is at least one second controller in the storage device, where the second controller is a powered-on controller in the storage device;

[0009] If not, the memory window maximum value is determined as the current memory window negotiation value of the first controller, and the local memory window negotiation identifier is updated from the first value to the second value; if yes, a target memory window negotiation value is determined based on the memory window maximum value and the current memory window negotiation value of each second controller, at least one second controller is controlled to adjust the memory window based on the target memory window negotiation value so that the adjusted memory window size is the target memory window negotiation value, and the target memory window negotiation value is determined as the current memory window negotiation value of the first controller, and the local memory window negotiation identifier is updated from the first value to the second value; wherein the second value is used to indicate that the memory window negotiation is completed;

[0010] After completing the startup, the first controller synchronizes data with at least one second controller based on the current memory window negotiation value and the current memory window negotiation value of at least one second controller to complete the service recovery of the first controller.

[0011] A storage device, comprising N controllers, N being greater than 1, and at least two of the N controllers being heterogeneous controllers;

[0012] Any controller includes: a determination unit, a processing unit, and a synchronization unit;

[0013] The determination unit is used to determine the maximum value of the memory window supported by the first controller during the startup process of the first controller, according to the memory size of the physical memory actually installed in the first controller and the hardware requirements configured for the first controller; the hardware requirements at least include the requirements for the physical memory to be accessed by other controllers other than the current controller; the maximum value of the memory window is less than or equal to the size of the memory window in the physical memory accessed by other controllers other than the current controller; the first controller is any controller in the storage device; the current local memory window negotiation identifier of the first controller is a first value, and the first value indicates that the memory window negotiation is not completed;

[0014] a processing unit, configured to detect whether the storage device has at least one second controller after determining the maximum value of the memory window supported by the first controller, where the second controller is a powered-on controller in the storage device;

[0015] If not, determining the memory window maximum value as the current memory window negotiation value of the first controller, and updating the local memory window negotiation identifier from the first value to the second value;

[0016] If yes, determine a target memory window negotiation value according to the memory window maximum value and the current memory window negotiation value of each second controller, control at least one second controller to adjust the memory window based on the target memory window negotiation value so that the adjusted memory window size is the target memory window negotiation value, determine the target memory window negotiation value as the current memory window negotiation value of the first controller, and update the local memory window negotiation identifier from a first value to a second value, the first value indicating that the memory window negotiation is not completed, and the second value is used to indicate that the memory window negotiation is completed;

[0017] The synchronization unit is used to synchronize data with at least one second controller based on the current memory window negotiation value and the current memory window negotiation value of at least one second controller after the first controller completes startup, so as to complete the service recovery of the first controller.

[0018] It can be seen from the above technical solutions that in this embodiment, by using at least two heterogeneous controllers in the storage device and by using differentiated designs of the controllers, it is avoided that each controller in the storage device is abnormal at the same time, thereby ensuring business continuity;

[0019] Furthermore, in this embodiment, during the startup process, any controller will first determine the maximum memory window value supported by the first controller based on the memory size of the physical memory actually installed in the controller and the hardware requirements configured for the controller, and then dynamically negotiate to determine the latest current memory window negotiation values ​​of the controller and the second controller based on the maximum memory window value supported by the controller and the powered-on second controller in the storage device. This realizes the determination of the current memory window negotiation value of each inserted controller based on the actually inserted controller, thereby ensuring to the greatest extent that the maximum memory window is allocated to each controller in the storage device, thereby maximizing the performance of each controller in the storage device. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a schematic diagram of the structure of a storage device shown in an embodiment of the present application;

[0021] Figure 2 is a method flow chart shown in an embodiment of the present application;

[0022] Figure 3 is a flowchart of dynamically determining a memory window shown in an embodiment of the present application;

[0023] Figure 4 is a structural diagram of a storage device shown in an embodiment of the present application;

[0024] Figure 5 It is a hardware structure diagram of the storage device shown in the embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention and to make the above-mentioned purposes, features and advantages of the embodiments of the present invention more obvious and easy to understand, the prior art solutions and the technical solutions in the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings.

[0026] In order to avoid the abnormality of each controller in the storage device at the same time, the embodiment of the present application proposes a multi-controller storage device based on heterogeneous controllers. Here, the so-called multi-controller storage device based on heterogeneous controllers means that there are N controllers in the storage device, at least two of which are heterogeneous controllers, and N is greater than 1.

[0027] The so-called heterogeneous controller can be characterized by the differentiated design of the controller. For example, controllers with different design schemes are heterogeneous controllers.

[0028] As an embodiment, if at least two controllers use CPUs of the same architecture from different manufacturers, the at least two controllers may be considered as heterogeneous controllers. Figure 1 An example is given in which two controllers are heterogeneous controllers. For example, when applied to a dual-controller storage device (which includes two controllers: controller 1 and controller 2), controller 1 and controller 2 in the dual-controller storage device respectively use CPUs of the same architecture, such as X86 architecture or ARM architecture, from different manufacturers. In this case, controller 1 and controller 2 in the dual-controller storage device can be considered as heterogeneous controllers. Another example is applied to a quad-controller storage device (which includes four controllers: controller 1 to controller 4), if controller 1 and controller 3 in the quad-controller storage device use CPUs of X86 architecture from manufacturer A, and controller 3 and controller 4 use CPUs of X86 architecture from manufacturer B, then controller 1 and controller 3, or controller 1 and controller 4, or controller 2 and controller 3, or controller 2 and controller 4 are considered as heterogeneous controllers; if controller 1 to controller 4 in the quad-controller storage device use CPUs of X86 architecture or ARM structure from different manufacturers, then controller 1 to controller 4 are heterogeneous controllers. And so on.

[0029] As another embodiment, if at least two controllers use CPUs of different architectures, the at least two controllers can be considered as heterogeneous controllers. Taking the above-mentioned dual-controller storage device as an example, controller 1 uses a CPU of X86 architecture, and controller 2 uses a CPU of ARM architecture. In this case, controllers 1 and 2 in the dual-controller storage device can be considered as heterogeneous controllers. Taking the above-mentioned four-controller storage device as an example, controllers 1 and 2 use CPUs of X86 architecture from manufacturer A, and controllers 3 and 4 use CPUs of ARM architecture from manufacturer B. In this case, controllers 1 and 3, or controllers 1 and 4, or controllers 2 and 3, or controllers 2 and 4 are considered as heterogeneous controllers; if controllers 1 to 4 in the four-controller storage device use CPUs of different architectures, controllers 1 to 4 are heterogeneous controllers. And so on.

[0030] The above description of heterogeneous controllers is based on examples, which is not a limitation. In this embodiment, it is sufficient to ensure that heterogeneous controllers with different design solutions are deployed in a multi-controller storage device and that there are differences.

[0031] By setting at least two controllers in the storage device as heterogeneous controllers (for example, through differentiated controller design), the risk of all controllers failing to work due to the same exception can be avoided, thereby ensuring business continuity.

[0032] In conventional applications, a memory configuration table is configured for the storage device. The memory configuration table at least contains the memory window sizes corresponding to the various types of controllers supported by the storage device. Based on the heterogeneous controllers described above, in this embodiment, controllers with different design schemes may support different memory windows. For example, the controller using CPU1 supports a 16GB memory window, and the controller using CPU2 supports a 24GB memory window. Therefore, in this embodiment, the memory configuration table can be set according to the characteristics of each controller in the storage device. Tables 1 to 3 show examples of memory configuration tables.

[0033] For example, as shown in the memory configuration table in Table 1, when the physical memory of the controller is 32GB, the memory window size supported by the controller (the memory window size that allows other controllers to perform specified operations) is 24GB, and when the physical memory of the controller is 64GB, the memory window size supported by the controller is 56GB. The specified operations here, such as read operations and write operations, are not specifically limited in this embodiment. Tables 2 and 3 are similar and will not be described one by one.

[0034]

[0035]

[0036] Table 1

[0037]

[0038] Table 2

[0039]

[0040] Table 3

[0041] In the application, in order to ensure that the same size of user data can be stored in the memory windows of all controllers, the memory window sizes of all controllers need to be the same. In specific implementation, based on the memory window sizes that each controller can support in the above memory configuration table, the minimum value of the memory window sizes that each controller can support can be selected as the target memory window size, and each controller allocates a memory window according to the target memory window size.

[0042] For example, if a storage device can be configured with 4 controllers, the 4 controllers are controller a to controller d, and their models may be AAAA, BBBB or CCCC. The physical memory of the 4 controllers is 32GB. According to Tables 1 to 3, when the physical memory is 32GB, the minimum value of the memory window size supported by each controller is 8GB. No matter which model the controllers a to d are, the target memory window size used by each controller in the storage device will be limited to the minimum value, i.e., 8GB. For example, if the models of controllers a and b currently inserted in the storage device are AAAA, and the models of controllers c and d are BBBB, although the memory window size available for controllers a to d is 24GB, the final target memory window size of controllers a to d in the storage device is still uniformly limited to 8GB. For another example, if only controller a and controller b are currently inserted in the storage device, and the memory window size available for controllers a and b is 24GB, the final target memory window size of controllers a and b in the storage device is still uniformly limited to 8GB.

[0043] It can be seen that determining the target memory window size of each controller based on the above memory configuration table will limit the memory window size that can be used by each controller in the storage device, thereby limiting the performance. In order to maximize the best performance of each controller in the storage device, this embodiment provides a solution for dynamically negotiating memory windows between controllers to achieve the maximum memory window size allocated to each controller as much as possible based on the characteristics of the controller actually inserted in the storage device. The following is an embodiment description.

[0044] See also Figure 2 , Figure 2 Flowchart of the method provided in the embodiment of the present application. The method is applied to the above storage device. Figure 2 As shown, the process may include the following steps:

[0045] Step 201 : During the startup process, the first controller determines the maximum value of the memory window supported by the first controller according to the memory size of the physical memory actually installed in the first controller and the hardware requirements configured for the first controller.

[0046] Here, the first controller is any controller in the storage device, and the first controller is named only for the convenience of description.

[0047] As an embodiment, in this embodiment, before determining the above-mentioned maximum value of the memory window, the first controller may first update the local memory window negotiation flag to a first value. The first value indicates that the memory window negotiation is not completed, such as the first value is 0, etc., which is not specifically limited in this embodiment.

[0048] As an embodiment, in this embodiment, the hardware requirement at least includes the requirement for the physical memory to be accessed by other controllers except the present controller, for example, the size of the memory window in the physical memory accessed by other controllers may be required. Correspondingly, the maximum value of the memory window is less than or equal to the size of the memory window in the physical memory accessed by other controllers except the present controller, which is essentially the maximum value of the memory window actually supported by the first controller.

[0049] For example, the actual memory size of the physical memory installed in the first controller is 64GB, and the hardware requirement limits the size of the memory window in the physical memory accessed by other controllers except the controller to 32GB, then it is finally determined that the maximum value of the memory window supported by the first controller is 32GB.

[0050] It should be noted that the above-mentioned first controller determines the maximum value of the memory window supported by the first controller based on the memory size of the physical memory actually installed in the first controller and the hardware requirements configured by the first controller. This can be implemented based on the code written by the developer or other methods, and the embodiment itself is not limited to this.

[0051] Step 202 , after determining the maximum value of the memory window supported by the first controller, the first controller detects whether there is at least one second controller in the storage device, if yes, executes step 203 , if no, executes step 204 .

[0052] In this embodiment, the second controller is a powered-on controller in the storage device.

[0053] Optionally, in this embodiment, after determining the maximum value of the memory window supported by the controller, the first controller may send a broadcast message in the storage device to obtain response messages returned by other controllers. Here, after any powered-on controller receives the broadcast message, it will return the above-mentioned response message to the above-mentioned first controller. Based on this, in this embodiment, when the first controller receives the above-mentioned response message returned by any controller, it will be considered that the controller returning the above-mentioned response message is a powered-on controller (recorded as the second controller). Conversely, when the first controller does not receive the above-mentioned response message returned by any controller within the specified time, it will be considered that there is no powered-on controller (recorded as the second controller) in the storage device. That is, the first controller is finally able to detect whether there is at least one second controller in the storage device.

[0054] Step 203, determine a target memory window negotiation value based on the maximum memory window value and the current memory window negotiation value of each second controller, control at least one second controller to adjust the memory window based on the target memory window negotiation value so that the adjusted memory window size is the target memory window negotiation value, determine the target memory window negotiation value as the current memory window negotiation value of the first controller, and update the local memory window negotiation identifier from the first value to the second value, the first value indicates that the memory window negotiation is not completed, and the second value is used to indicate that the memory window negotiation is completed. Then execute step 205.

[0055] In this embodiment, the second controller defined above is a powered-on controller in the storage device. Before executing step 203, each second controller has currently determined a memory window negotiation value (recorded as the current memory window negotiation value of the second controller). Here, the current memory window negotiation value of the second controller may be the maximum value of the memory window supported by the second controller. The method for determining the maximum value of the memory window supported by the second controller is similar to the method for determining the maximum value of the memory window by the first controller, and is not limited here.

[0056] In this embodiment, there are many ways for the first controller to determine the target memory window negotiation value based on the local memory window maximum value and the current memory window negotiation value of each second controller, such as selecting the minimum value from the above-mentioned local memory window maximum value and the current memory window negotiation value of each second controller as the target memory window negotiation value. Afterwards, the first controller controls at least one second controller to adjust the memory window based on the target memory window negotiation value so that the adjusted memory window size is the target memory window negotiation value. For example, for each second controller, if it is detected that the current memory window negotiation value of the second controller is different from the target memory window negotiation value, a renegotiation notification is sent to the second controller; the renegotiation notification carries at least the target memory window negotiation value to instruct the second controller to adjust the memory window based on the target memory window negotiation value so that the adjusted memory window size is the target memory window negotiation value. As for how the second controller adjusts the memory window based on the target memory window negotiation value so that the adjusted memory window size is the target memory window negotiation value, it will be described below. Figure 3 The example description is omitted here.

[0057] Furthermore, the first controller can also determine the target memory window negotiation value as the current memory window negotiation value of the first controller, and update the local memory window negotiation identifier from the first value to the second value, where the second value is used to indicate the completion of the memory window negotiation. The second value is, for example, 1, etc., which is not specifically limited in this embodiment.

[0058] Finally, through step 203, the first controller and each second controller negotiate to dynamically determine their respective current memory window negotiation values.

[0059] Step 204: determine the target window maximum value as the current memory window negotiation value of the first controller, and update the local memory window negotiation identifier from the first value to the second value. Then, execute step 205.

[0060] This step 204 is performed under the premise that the storage device does not have a second controller. For example, the memory size of the physical memory actually installed in the first controller is 64GB, and the above hardware requirements limit the size of the memory window in the above physical memory accessed by other controllers except the current controller to 32GB. If it is detected that the storage device does not have a second controller, the current memory window negotiation value of the first controller is finally determined to be 32GB, and the first controller divides the memory window according to the current memory window negotiation value 32GB.

[0061] Step 205 : After the first controller is started up, the first controller synchronizes data with at least one second controller based on the current memory window negotiation value and the current memory window negotiation value of at least one second controller to complete service recovery of the first controller.

[0062] Optionally, in this embodiment, after the first controller completes the startup, it starts to synchronize data from at least one second controller. As an embodiment, the synchronized data here mainly refers to the dirty data in the synchronized write cache. As for how the first controller synchronizes data with at least one second controller based on the current memory window negotiation value and the current memory window negotiation value of at least one second controller, the following description is provided. Figure 3 An example is given in the description, which will not be repeated here.

[0063] In this embodiment, after the first controller completes data synchronization, the first controller can meet the service operation conditions and start to restore the service, such as transmitting data through the data channel and management channel established between the first controller and the second controller.

[0064] So far, it is completed Figure 2 The process description shown.

[0065] pass Figure 2 It can be seen from the process shown that in this embodiment, by using at least two heterogeneous controllers in the storage device and by using differentiated designs of the controllers, it is avoided that each controller in the storage device is abnormal at the same time, thereby ensuring business continuity;

[0066] Furthermore, in this embodiment, during the startup process, any controller will first determine the maximum memory window value supported by the first controller based on the memory size of the physical memory actually installed in the controller and the hardware requirements configured for the controller, and then dynamically negotiate to determine the latest current memory window negotiation values ​​of the controller and the second controller based on the maximum memory window value supported by the controller and the powered-on second controller in the storage device. This realizes the determination of the current memory window negotiation value of each inserted controller based on the actually inserted controller, thereby ensuring to the greatest extent that the maximum memory window size is allocated to each controller in the storage device, thereby maximizing the performance of each controller in the storage device.

[0067] The following is a specific example Figure 1 The process shown is described as follows:

[0068] Take the controller 301 in the storage device as an example. Figure 3As shown, during the startup process, the controller 301 first obtains the maximum value of the memory window supported by the controller 301 (i.e., the maximum value of the memory window actually supported by the controller 301) according to the memory size of the actual installed physical memory and the hardware requirements configured for the controller (at least including the memory window size in the physical memory accessed by other controllers). For example: when the controller 301 is started, the physical memory installed is 64GB, and the hardware requirements configured for the controller 301 require that the memory window size in the physical memory accessed by other controllers is 32GB, then the controller 301 determines that the above-mentioned maximum value of the memory window is 32GB. The controller 301 also sets the value of the local memory window negotiation completion flag to a first value, such as 0.

[0069] As an embodiment, if the controller 301 finds that there is no powered-on controller (recorded as controller 302) in the storage device, the controller 301 determines the above-mentioned memory window maximum value as the current memory window negotiation value of the controller 301, so as to divide the memory window according to the determined memory window negotiation value, such as 32GB. At the same time, the controller 301 updates the local memory window negotiation identifier from the first value to the second value, such as 1.

[0070] As another embodiment, if the controller 301 finds that there is a powered-on controller (referred to as the controller 302 ) in the storage device, the controller 301 interacts with each controller 302 to obtain the current memory window negotiation value of the controller 302 .

[0071] Afterwards, the controller 301 determines the target memory window negotiation value according to the above-mentioned maximum memory window value and the obtained current memory window negotiation values ​​of each second controller. Optionally, the target memory window negotiation value can be identified by the following formula: target memory window negotiation value = min{the maximum memory window value of the controller 301, the current memory window negotiation values ​​of all second controllers}.

[0072] The controller 301 determines the target memory window negotiation value as the current memory window negotiation value of the controller 301, so as to divide the memory window according to the current memory window negotiation value, such as 32GB. For example, if the target memory window negotiation value is 32GB, the controller 301 divides the memory window according to the target memory window negotiation value 32GB. At the same time, the controller 301 updates the local memory window negotiation identifier from the first value to the second value, such as 1.

[0073] Afterwards, the controller 301 detects for each second controller whether the current memory window negotiation value of the second controller is the same as the above-mentioned target memory window negotiation value. If different, a renegotiation notification is sent to the second controller; the renegotiation notification carries at least the target memory window negotiation value to instruct the second controller to adjust the memory window according to the target memory window negotiation value so that the adjusted memory window size is the target memory window negotiation value. Of course, if the controller 301 finds that the current memory window negotiation value of the controller 301 (that is, the above-mentioned target memory window negotiation value) is the same as the current memory window negotiation value of the second controller, no special processing is required, and the next second controller can be continued to execute the step of detecting whether the current memory window negotiation value of the second controller is the same as the above-mentioned target memory window negotiation value.

[0074] Take one of the controllers 302 as an example, and the others are similar, then:

[0075] In this embodiment, if the controller 301 finds that the current memory window negotiation value of the controller 301 (that is, the target memory window negotiation value mentioned above) is the same as the current memory window negotiation value of the controller 302, no special processing is required and the next controller 302 can be judged.

[0076] If controller 301 finds that the current memory window negotiation value of controller 301 (that is, the target memory window negotiation value mentioned above) is different from the current memory window negotiation value of controller 302, it sends a renegotiation notification to controller 302, and the renegotiation notification carries the current memory window negotiation value of controller 301 (that is, the target memory window negotiation value mentioned above).

[0077] When the controller 302 receives the above-mentioned renegotiation notification, it will obtain the current memory window negotiation value of the controller 301 (that is, the above-mentioned target memory window negotiation value) from the renegotiation notification, and compare the current memory window negotiation value of the controller 301 (that is, the above-mentioned target memory window negotiation value) with the current memory window negotiation value of the controller 302.

[0078] As an embodiment, controller 302 will find that the current memory window negotiation value of controller 302 is greater than the current memory window negotiation value of controller 301 (that is, the above-mentioned target memory window negotiation value), and controller 302 will modify the local memory window negotiation completion flag, such as updating the local memory window negotiation flag from the second value, such as 1, to the first value, such as 0, replying a negotiation response to controller 301, and scaling down the local memory window based on the current memory window negotiation value of controller 301 (that is, the above-mentioned target memory window negotiation value), so that the size of the scaled-down memory window is the current memory window negotiation value of controller 301 (that is, the above-mentioned target memory window negotiation value), and at the same time, modify the current memory window negotiation value to the current memory window negotiation value of controller 301 (that is, the above-mentioned target memory window negotiation value). Then, the local memory window negotiation flag is updated from the first value to the second value.

[0079] In this embodiment, the controller 302 may reduce the capacity of the local memory window by: the controller 302 determines the space to be released according to the local current memory window negotiation value and the current memory window negotiation value of the controller 301 (that is, the above-mentioned target memory window negotiation value); the space to be released is the remaining space in the memory space corresponding to the current memory window negotiation value of the controller 302, excluding the memory space corresponding to the above-mentioned target memory window negotiation value. For example, assuming that the current memory window negotiation value of the controller 302 is 48GB, and the current memory window negotiation value of the controller 301 (that is, the above-mentioned target memory window negotiation value) is 32GB, the space to be released is: the remaining space in the 48GB memory space corresponding to the current memory window negotiation value of the controller 302, excluding the 32GB memory space corresponding to the target memory window negotiation value, and the size of the space to be released is the difference between the local current memory window negotiation value and the memory window negotiation value carried by the renegotiation notification, that is, the size of the space to be released is 48GB-32GB=16GB.

[0080] Afterwards, the controller 302 traverses the cache blocks in the space to be released. If the cache block is a read cache, the cache block is directly released. If the cache block is a write cache, the data in the cache block is first written to the physical disk. After the writing is successful, the cache block is released. After all cache blocks in the space to be released are released, the memory window is reduced in size.

[0081] It should be noted that, in this embodiment, the above memory window shrinking process needs to take into account the dirty data stored in the memory window, that is, the dirty data stored in the above space to be released needs to be written to the physical disk before the space can be released.

[0082] It should also be noted that, in this embodiment, the space to be released may be prohibited from subsequent data storage, for example, it may be marked that a cache block cannot be allocated from the space to be released to store new data.

[0083] After receiving the negotiation response from the controller 302 , the controller 301 continues to start up, and after the startup is completed, it sends synchronization requests to each controller 302 one by one.

[0084] After receiving the synchronization request, the controller 302 first checks whether there is dirty data in the memory window corresponding to the current memory window negotiation value of the local controller 302. If not, a synchronization response is sent to the controller 301 (the synchronization response indicates that no synchronization is required). If so, the local memory window negotiation completion flag is checked. If the local memory window negotiation flag is the second value, a synchronization response is sent to the controller 301 (the synchronization response is used to indicate that synchronization is required); if the local memory window negotiation flag is the first value, a synchronization response is sent to the controller 301 (the synchronization response is used to indicate waiting for synchronization), and subsequently determines to start synchronization, such as the local memory window negotiation flag changes from the first value to the second value to determine that synchronization can be started, etc., and a synchronization notification is sent to the controller 301.

[0085] The controller 301 receives the synchronization response returned by the controller 302. If the synchronization response indicates that synchronization is not required, the controller 301 does not perform data synchronization with the controller 302. If the synchronization response indicates that synchronization is required, the controller 301 performs data synchronization with the controller 302 to synchronize data from the controller 302. If the synchronization response indicates waiting for synchronization, the controller 302 is added to the waiting list, and after waiting for the synchronization notification sent by the controller 302, the controller 302 is removed from the waiting list, and data synchronization is performed with the controller 302 to synchronize data from the controller 302.

[0086] As an embodiment, the above-mentioned controller 301 and the controller 302 perform data synchronization to start synchronizing data from the controller 302, for example: obtaining synchronization data, i.e., dirty data, from the memory window corresponding to the current memory window negotiation value of the controller 302, and storing it in the memory window corresponding to the current memory window negotiation value of the controller 301.

[0087] The above describes the interaction between controller 301 and controller 302 by taking one of the controllers 302 as an example. After controller 301 performs the above interaction on each controller 302, the memory window corresponding to the current memory window negotiation value of controller 301 contains all dirty data (valid user data not written to the disk), which means that controller 301 has the conditions to run the service, and controller 301 can start the service operation.

[0088] It can be seen that in this embodiment, the data synchronized by the controller 301 from the controller 302 is the dirty data stored in the memory window corresponding to the current memory window negotiation value of the controller 302. It should be noted that if the storage device implements a cache full mirroring solution, that is, the memory windows corresponding to the current memory window negotiation values ​​of all powered-on controllers store the same dirty data, then the controller 301 can synchronize data from any controller 302, and does not need to synchronize data from each controller 302, thereby avoiding synchronization of duplicate data, improving synchronization efficiency, and accelerating business operations.

[0089] It should be noted that, in this embodiment, multiple controllers in the storage device can provide services at the same time. For example, if the storage device includes two controllers (controller A and controller B), part of the services of the storage device are run in controller A, and the other part of the services are run in controller B. Under this premise, multiple controllers in the storage device monitor each other. Once any controller is detected to be abnormal, such as failure, shutdown, or unplugged, a controller will be selected from the remaining controllers in the storage device according to preset rules to take over the services of the abnormal controller to ensure service continuity.

[0090] Optionally, in this embodiment, for the above exception, the remaining controllers in the storage device may also renegotiate the memory window size. In this embodiment, after the above exception occurs, the memory window size renegotiated by the remaining controllers in the storage device will only be larger than the previously negotiated memory window size, which will maximize the memory window used by the remaining controllers in the storage device and maximize the performance of multiple controllers.

[0091] In specific implementation, the above-mentioned selected controller (used to take over the business of the abnormal controller, also referred to as the takeover end) will update the local memory window negotiation identifier from the second value to the first value after confirming that it is selected to take over the business of the abnormal controller, and return to the step after determining the maximum value of the memory window supported by this controller in the above-mentioned step 202, so that the first controller and the remaining controllers in the storage device renegotiate the memory window size.

[0092] For example, a storage device has four controllers, three of which (referred to as controllers X1, X2, and X3) support a maximum memory window value of 48 GB, and the remaining controller (referred to as controller Y) supports a maximum memory window value of 32 GB. Figure 2 In the process shown in FIG. 1 , the memory window size (i.e., the current memory window negotiation value) finally determined by the four controllers is 32GB. If the above controller Y is removed, the remaining three controllers (controllers X1, X2, and X3) can be replaced according to the above Figure 2In the process shown, the memory window size is renegotiated, and the final negotiated memory window size (that is, the current memory window negotiation value) is adjusted from the original 32 GB to 48 GB. This obviously expands the memory windows of the remaining three controllers (controllers X1, X2, and X3) and improves the physical memory utilization.

[0093] It should be noted that in this embodiment, when the takeover end confirms that it has taken over the services of the abnormal controller (referred to as the taken-over end), it will actively power off the taken-over end, and then power on the taken-over end after the takeover is completed. When the taken-over end is powered on and the state returns to normal, the following is executed: Figure 2 The process shown to eventually resume your own business.

[0094] It can be seen that in the present invention, when the controller is turned on, or when a controller has an abnormality such as being shut down or unplugged, the memory window size will be dynamically negotiated based on the status of the currently powered-on controller, so that the memory window size of all powered-on controllers is the current maximum supported value, that is, the largest memory window is allocated as much as possible, thereby ensuring that the performance of multiple controllers is maximized.

[0095] The method provided in the embodiment of the present application is described above. The device provided in the embodiment of the present application is described below:

[0096] See also Figure 4 , Figure 4 A structural diagram of a storage device provided in an embodiment of the present application. The storage device includes N controllers, N is greater than 1, and at least two of the N controllers are heterogeneous controllers;

[0097] like Figure 4 As shown, any controller includes: a determination unit, a processing unit, and a synchronization unit;

[0098] The determination unit is used to determine the maximum value of the memory window supported by the first controller during the startup process of the first controller, according to the memory size of the physical memory actually installed in the first controller and the hardware requirements configured for the first controller; the hardware requirements at least include the requirements for the physical memory to be accessed by other controllers other than the current controller; the maximum value of the memory window is less than or equal to the size of the memory window in the physical memory accessed by other controllers other than the current controller; the first controller is any controller in the storage device; the current local memory window negotiation identifier of the first controller is a first value, and the first value indicates that the memory window negotiation is not completed;

[0099] a processing unit, configured to detect whether the storage device has at least one second controller after determining the maximum value of the memory window supported by the first controller, where the second controller is a powered-on controller in the storage device;

[0100] If not, determining the memory window maximum value as the current memory window negotiation value of the first controller, and updating the local memory window negotiation identifier from the first value to the second value;

[0101] If yes, determine a target memory window negotiation value according to the memory window maximum value and the current memory window negotiation value of each second controller, control at least one second controller to adjust the memory window based on the target memory window negotiation value so that the adjusted memory window size is the target memory window negotiation value, determine the target memory window negotiation value as the current memory window negotiation value of the first controller, and update the local memory window negotiation identifier from a first value to a second value, the first value indicating that the memory window negotiation is not completed, and the second value is used to indicate that the memory window negotiation is completed;

[0102] The synchronization unit is used to synchronize data with at least one second controller based on the current memory window negotiation value and the current memory window negotiation value of at least one second controller after the first controller completes startup, so as to complete the service recovery of the first controller.

[0103] Optionally, the at least two controllers are heterogeneous controllers, which means that the at least two controllers use CPUs of the same architecture from different manufacturers, or the at least two controllers use CPUs of different architectures.

[0104] Optionally, determining the target memory window negotiation value according to the memory window maximum value and the current memory window negotiation value of each second controller includes:

[0105] From the memory window maximum value and the current memory window negotiation value of each second controller, a minimum value is selected as the target memory window negotiation value.

[0106] Optionally, controlling at least one second controller to adjust the memory window based on the target memory window negotiation value so that the adjusted memory window size is the target memory window negotiation value includes:

[0107] For each second controller, if it is detected that the current memory window negotiation value of the second controller is different from the target memory window negotiation value, a renegotiation notification is sent to the second controller; the renegotiation notification carries at least the target memory window negotiation value to instruct the second controller to adjust the memory window according to the target memory window negotiation value so that the adjusted memory window size is the target memory window negotiation value.

[0108] Optionally, the processing unit further receives a renegotiation notification sent by the third controller at the first controller, updates the local memory window negotiation identifier from the second value to the first value, and when the local current memory window negotiation value is greater than the memory window negotiation value carried by the received renegotiation notification, shrinks the local memory window according to the memory window negotiation value carried by the renegotiation notification, so that the size of the reduced memory window is the memory window negotiation value carried by the renegotiation notification, and then updates the local memory window negotiation identifier from the first value to the second value, and updates the local memory window negotiation value to the memory window negotiation value carried by the renegotiation notification.

[0109] Optionally, the reducing the local memory window according to the memory window negotiation value carried in the renegotiation notification includes:

[0110] Determine the space to be released according to the local current memory window negotiation value and the memory window negotiation value carried in the renegotiation notification, and prohibit the space to be released from subsequent data storage; the size of the space to be released is the difference between the local current memory window negotiation value and the memory window negotiation value carried in the renegotiation notification;

[0111] Traverse the cache blocks in the space to be released. If the cache block is a read cache, release the cache block directly. If the cache block is a write cache, write the data in the cache block to the physical disk first. After the write is successful, release the cache block.

[0112] Optionally, the processing unit further updates the local memory window negotiation identifier from the second value to the first value when the first controller confirms taking over the service running on the abnormal controller, and returns to the operation after determining the maximum value of the memory window supported by the current controller.

[0113] Optionally, the first controller synchronizing data with at least one second controller based on the current memory window negotiation value and the current memory window negotiation value of at least one second controller includes:

[0114] For each second controller, the first controller sends a synchronization request to the second controller;

[0115] The first controller receives a synchronization response returned by the second controller based on the synchronization request;

[0116] If the synchronization response is used to indicate that synchronization is required, the first controller obtains synchronization data from the memory window corresponding to the current memory window negotiation value of the second controller and stores the synchronization data in the local memory window corresponding to the current memory window negotiation value;

[0117] If the synchronization response is used to indicate waiting for synchronization, the first controller waits for the synchronization notification of the second controller, and after subsequently receiving the synchronization notification of the second controller, obtains the synchronization data from the memory window corresponding to the current memory window negotiation value of the second controller and stores it in the memory window corresponding to the local current memory window negotiation value;

[0118] If the synchronization response is used to indicate asynchronization, the process of synchronizing data from the second controller is terminated.

[0119] Optionally, the processing unit further checks whether there is dirty data in the memory window corresponding to the current memory window negotiation value of the local controller when the first controller receives a synchronization request sent by another controller; the other controller is not the second controller detected by the first controller;

[0120] If it does not exist, a synchronization response is sent to the other controller, and the synchronization response is used to indicate a lack of synchronization; if it exists, the local memory window negotiation identifier is checked, and if the local memory window negotiation identifier is a first value, a synchronization response is sent to the other controller, and the synchronization response is used to indicate waiting for synchronization, and when the local memory window negotiation identifier is subsequently updated from the first value to the second value, a synchronization notification is sent to the other controller; if the local memory window negotiation identifier is a second value, a synchronization response is sent to the other controller, and the synchronization response is used to indicate that synchronization is required.

[0121] So far, completed Figure 4 Description of the structure of the storage device shown.

[0122] Correspondingly, the present application also provides Figure 4 The hardware structure diagram of the device shown in the figure. Figure 5 As shown, the electronic device includes: a processor and a machine-readable storage medium;

[0123] The machine-readable storage medium stores machine-executable instructions that can be executed by the processor;

[0124] The processor is used to execute machine executable instructions to implement the above Figure 2 Method steps of the method shown

[0125] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the method disclosed in the above example of the present application can be implemented.

[0126] Exemplarily, the above-mentioned machine-readable storage medium can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.

[0127] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0128] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0129] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0130] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0131] Moreover, these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0132] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0133] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A storage control method applied to a storage device, characterized in that: The storage device includes N controllers, N is greater than 1, and at least two of the N controllers are heterogeneous controllers; the method includes: During the startup process, the first controller determines the maximum value of the memory window supported by the first controller according to the memory size of the physical memory actually installed in the first controller and the hardware requirements configured for the first controller; the hardware requirements at least include the requirements for the physical memory to be accessed by other controllers other than the present controller; the maximum value of the memory window is less than or equal to the size of the memory window in the physical memory accessed by other controllers other than the present controller; the first controller is any controller in the storage device; the current local memory window negotiation identifier of the first controller is a first value, and the first value indicates that the memory window negotiation is not completed; After determining the maximum value of the memory window supported by the controller, the first controller detects whether there is at least one second controller in the storage device, where the second controller is a powered-on controller in the storage device; If not, the memory window maximum value is determined as the current memory window negotiation value of the first controller, and the local memory window negotiation identifier is updated from the first value to the second value; if yes, a target memory window negotiation value is determined based on the memory window maximum value and the current memory window negotiation value of each second controller, at least one second controller is controlled to adjust the memory window based on the target memory window negotiation value so that the adjusted memory window size is the target memory window negotiation value, and the target memory window negotiation value is determined as the current memory window negotiation value of the first controller, and the local memory window negotiation identifier is updated from the first value to the second value; wherein the second value is used to indicate that the memory window negotiation is completed; After completing the startup, the first controller synchronizes data with at least one second controller based on the current memory window negotiation value and the current memory window negotiation value of at least one second controller to complete the service recovery of the first controller.

2. The method according to claim 1, characterized in that The at least two controllers being heterogeneous controllers means that the at least two controllers use CPUs of the same architecture from different manufacturers, or the at least two controllers use CPUs of different architectures.

3. The method according to claim 1, characterized in that The step of determining the target memory window negotiation value according to the memory window maximum value and the current memory window negotiation value of each second controller comprises: From the memory window maximum value and the current memory window negotiation value of each second controller, a minimum value is selected as the target memory window negotiation value.

4. The method according to claim 1, characterized in that: The controlling at least one second controller to adjust the memory window based on the target memory window negotiation value so that the adjusted memory window size is the target memory window negotiation value comprises: For each second controller, if it is detected that the current memory window negotiation value of the second controller is different from the target memory window negotiation value, a renegotiation notification is sent to the second controller; the renegotiation notification carries at least the target memory window negotiation value to instruct the second controller to adjust the memory window according to the target memory window negotiation value so that the adjusted memory window size is the target memory window negotiation value.

5. The method according to claim 1, characterized in that The method further comprises: When the first controller receives the renegotiation notification sent by the third controller, the first controller updates the local memory window negotiation identifier from the second value to the first value; If the local current memory window negotiation value is greater than the memory window negotiation value carried by the received renegotiation notification, the local memory window is reduced in size according to the memory window negotiation value carried by the renegotiation notification so that the size of the reduced memory window is the memory window negotiation value carried by the renegotiation notification. Thereafter, the local memory window negotiation identifier is updated from the first value to the second value, and the local memory window negotiation value is updated to the memory window negotiation value carried by the renegotiation notification.

6. The method according to claim 5, characterized in that The shrinking of the local memory window according to the memory window negotiation value carried in the renegotiation notification includes: Determine the space to be released according to the local current memory window negotiation value and the memory window negotiation value carried in the renegotiation notification, and prohibit the space to be released from subsequent data storage; the size of the space to be released is the difference between the local current memory window negotiation value and the memory window negotiation value carried in the renegotiation notification; Traverse the cache blocks in the space to be released. If the cache block is a read cache, release the cache block directly. If the cache block is a write cache, write the data in the cache block to the physical disk first. After the write is successful, release the cache block.

7. The method according to claim 1, characterized in that The method further comprises: When the first controller confirms taking over the service running on the abnormal controller, it updates the local memory window negotiation identifier from the second value to the first value, and returns the operation after determining the maximum value of the memory window supported by the controller.

8. The method according to claim 1, characterized in that The first controller synchronizes data with at least one second controller based on the current memory window negotiation value and the current memory window negotiation value of at least one second controller, including: For each second controller, the first controller sends a synchronization request to the second controller; The first controller receives a synchronization response returned by the second controller based on the synchronization request; If the synchronization response is used to indicate that synchronization is required, the first controller obtains synchronization data from the memory window corresponding to the current memory window negotiation value of the second controller and stores the synchronization data in the local memory window corresponding to the current memory window negotiation value; If the synchronization response is used to indicate waiting for synchronization, the first controller waits for the synchronization notification of the second controller, and after subsequently receiving the synchronization notification of the second controller, obtains the synchronization data from the memory window corresponding to the current memory window negotiation value of the second controller and stores it in the memory window corresponding to the local current memory window negotiation value; If the synchronization response is used to indicate asynchronization, the process of synchronizing data from the second controller is terminated.

9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: The first controller receives a synchronization request sent by another controller; the other controller is not the second controller detected by the first controller; Check whether there is dirty data in the memory window corresponding to the current memory window negotiation value of the local controller. If not, send a synchronization response to the other controller, and the synchronization response is used to indicate that there is no synchronization; if so, check the local memory window negotiation identifier. If the local memory window negotiation identifier is a first value, send a synchronization response to the other controller, and the synchronization response is used to indicate waiting for synchronization, and when the local memory window negotiation identifier is subsequently updated from the first value to the second value, send a synchronization notification to the other controller; if the local memory window negotiation identifier is a second value, send a synchronization response to the other controller, and the synchronization response is used to indicate that synchronization is required.

10. A storage device, characterized in that: The storage device includes N controllers, N is greater than 1, and at least two controllers of the N controllers are heterogeneous controllers; Any controller includes: a determination unit, a processing unit, and a synchronization unit; The determination unit is used to determine the maximum value of the memory window supported by the first controller during the startup process of the first controller, according to the memory size of the physical memory actually installed in the first controller and the hardware requirements configured for the first controller; the hardware requirements at least include the requirements for the physical memory to be accessed by other controllers other than the current controller; the maximum value of the memory window is less than or equal to the size of the memory window in the physical memory accessed by other controllers other than the current controller; the first controller is any controller in the storage device; the current local memory window negotiation identifier of the first controller is a first value, and the first value indicates that the memory window negotiation is not completed; a processing unit, configured to detect whether the storage device has at least one second controller after determining the maximum value of the memory window supported by the first controller, where the second controller is a powered-on controller in the storage device; If not, determining the memory window maximum value as the current memory window negotiation value of the first controller, and updating the local memory window negotiation identifier from the first value to the second value; If yes, determine a target memory window negotiation value according to the memory window maximum value and the current memory window negotiation value of each second controller, control at least one second controller to adjust the memory window based on the target memory window negotiation value so that the adjusted memory window size is the target memory window negotiation value, determine the target memory window negotiation value as the current memory window negotiation value of the first controller, and update the local memory window negotiation identifier from a first value to a second value, the first value indicating that the memory window negotiation is not completed, and the second value is used to indicate that the memory window negotiation is completed; The synchronization unit is used to perform data synchronization with at least one second controller based on the current memory window negotiation value and the current memory window negotiation value of at least one second controller after the first controller completes startup, so as to complete the service recovery of the first controller.

11. The storage device according to claim 10, characterized in that: The at least two controllers being heterogeneous controllers means that the at least two controllers use CPUs of the same architecture from different manufacturers, or the at least two controllers use CPUs of different architectures.

12. The storage device according to claim 10, characterized in that: The step of determining the target memory window negotiation value according to the memory window maximum value and the current memory window negotiation value of each second controller comprises: From the memory window maximum value and the current memory window negotiation value of each second controller, a minimum value is selected as the target memory window negotiation value.

13. The storage device according to claim 10, characterized in that: The controlling at least one second controller to adjust the memory window based on the target memory window negotiation value so that the adjusted memory window size is the target memory window negotiation value comprises: For each second controller, if it is detected that the current memory window negotiation value of the second controller is different from the target memory window negotiation value, a renegotiation notification is sent to the second controller; the renegotiation notification carries at least the target memory window negotiation value to instruct the second controller to adjust the memory window according to the target memory window negotiation value so that the adjusted memory window size is the target memory window negotiation value.

14. The storage device according to claim 10, characterized in that: The processing unit further updates the local memory window negotiation identifier from the second value to the first value when the first controller receives the renegotiation notification sent by the third controller, and when the local current memory window negotiation value is greater than the memory window negotiation value carried by the received renegotiation notification, shrinks the local memory window according to the memory window negotiation value carried by the renegotiation notification so that the size of the reduced memory window is the memory window negotiation value carried by the renegotiation notification, and then updates the local memory window negotiation identifier from the first value to the second value, and updates the local memory window negotiation value to the memory window negotiation value carried by the renegotiation notification.

15. The storage device according to claim 14, characterized in that: The shrinking of the local memory window according to the memory window negotiation value carried in the renegotiation notification includes: Determine the space to be released according to the local current memory window negotiation value and the memory window negotiation value carried in the renegotiation notification, and prohibit the space to be released from subsequent data storage; the size of the space to be released is the difference between the local current memory window negotiation value and the memory window negotiation value carried in the renegotiation notification; Traverse the cache blocks in the space to be released. If the cache block is a read cache, release the cache block directly. If the cache block is a write cache, write the data in the cache block to the physical disk first. After the write is successful, release the cache block.

16. The storage device according to claim 10, characterized in that: The processing unit is further configured to update the first controller's local memory window negotiation identifier from the second value to the first value when the first controller confirms taking over the services of other controllers with abnormalities, and return to the operation after determining the maximum value of the memory window supported by the controller.

17. The storage device according to claim 10, characterized in that: The step of synchronizing data with at least one second controller based on the current memory window negotiation value and the current memory window negotiation value of at least one second controller includes: For each second controller, the first controller sends a synchronization request to the second controller; The first controller receives a synchronization response returned by the second controller based on the synchronization request; If the synchronization response is used to indicate that synchronization is required, the first controller obtains synchronization data from the memory window corresponding to the current memory window negotiation value of the second controller and stores the synchronization data in the local memory window corresponding to the current memory window negotiation value; If the synchronization response is used to indicate waiting for synchronization, the first controller waits for the synchronization notification of the second controller, and after subsequently receiving the synchronization notification of the second controller, obtains the synchronization data from the memory window corresponding to the current memory window negotiation value of the second controller and stores it in the memory window corresponding to the local current memory window negotiation value; If the synchronization response is used to indicate asynchronization, the process of synchronizing data from the second controller is terminated.

18. The storage device according to any one of claims 10 to 17, characterized in that: The synchronization unit is further used to check whether there is dirty data in the memory window corresponding to the current memory window negotiation value of the first controller when the first controller receives a synchronization request sent by other controllers, and the other controller is not the second controller detected by the first controller; If it does not exist, a synchronization response is sent to the other controller, and the synchronization response is used to indicate a lack of synchronization; if it exists, the local memory window negotiation identifier is checked, and if the local memory window negotiation identifier is a first value, a synchronization response is sent to the other controller, and the synchronization response is used to indicate waiting for synchronization, and when the local memory window negotiation identifier is subsequently updated from the first value to the second value, a synchronization notification is sent to the other controller; if the local memory window negotiation identifier is a second value, a synchronization response is sent to the other controller, and the synchronization response is used to indicate that synchronization is required.

Citation Information

Patent Citations

  • Cache synchronization method and system applied to double control storage system

    CN104881368A

  • Method and device for data backup

    CN106776152A

  • Controller switching method and device, electronic equipment and storage medium

    CN118642897A

  • Duplication device of processor using two common memories and method thereof

    KR1020000003010A

  • Memory device, memory system, and method of operating memory device

    US20170308438A1