Storage control method applied to storage device and storage device
By adopting differentiated designs of heterogeneous controllers and dynamically negotiating memory window negotiation values in storage devices, the problem of business interruption caused by simultaneous abnormalities of controllers in storage devices is solved, ensuring business continuity and maximum performance.
Patent Information
- Application Number
- CN202411765969.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-12-03
AI Technical Summary
In a storage device, multiple controllers with the same design may experience exceptions at the same time, causing service interruption.
The differentiated design of heterogeneous controllers is adopted, and the memory window negotiation value is dynamically negotiated to ensure that each controller is allocated the largest memory window during the startup process to avoid anomalies at the same time.
This achieves business continuity in storage devices, maximizes the performance of each controller, and avoids interruptions caused by simultaneous controller anomalies.
Smart Images

Figure CN119759261B_ABST
Abstract
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, to ensure device reliability, multiple controllers are typically installed within a storage device. If any controller fails, another controller takes over the failed controller's services, ensuring business continuity. The controller in a storage device is primarily responsible for data transmission and reception, data storage, and data protection.
[0003] In actual implementation, each controller in a storage device usually adopts the same design scheme. However, the same design scheme may cause each controller to fail at the same time, causing service interruption. Summary of the Invention
[0004] 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 this application include:
[0006] A storage control method applied to a storage device, wherein the storage device includes N controllers, where N is greater than 1, and at least two of the N controllers are heterogeneous controllers; the method includes:
[0007] During startup, the first controller determines a maximum memory window value supported by the first controller based on the memory size of the physical memory actually installed in the first controller and hardware requirements configured for the first controller; the hardware requirements at least include a requirement for the physical memory to be accessed by controllers other than the present controller; the maximum memory window value is less than or equal to a size of a memory window in the physical memory to be accessed by controllers other than the present controller; the first controller is any controller in a 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 first controller, the first controller detects whether the storage device has at least one second controller, 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 so, 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 startup, the first controller synchronizes data with the at least one second controller based on the current memory window negotiation value and the current memory window negotiation value of the at least one second controller to complete service recovery of the first controller.
[0011] A storage device comprising N controllers, where N is greater than 1, and at least two of the N controllers are 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, after determining the maximum value of the memory window supported by the first controller, detect whether the storage device has at least one second 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, determining a target memory window negotiation value according to the memory window maximum value and the current memory window negotiation value of each second controller, 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, determining the target memory window negotiation value as the current memory window negotiation value of the first controller, and updating the local memory window negotiation identifier from a first value to a second value, where 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;
[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 service recovery of the first controller.
[0018] As can be seen from the above technical solutions, in this embodiment, by using at least two heterogeneous controllers in the storage device and adopting differentiated controller designs, it is possible to avoid all controllers in the storage device being abnormal at the same time, thereby ensuring service 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 value 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, and ensures 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 flow chart of the method shown in an embodiment of the present application;
[0022] Figure 3 This is a flowchart of the dynamic determination of the 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 This is a hardware structure diagram of a storage device shown in an 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 existing technical solutions and the technical solutions in the embodiments of the present invention are further described in detail below with reference to the accompanying drawings.
[0026] To prevent all controllers in a storage device from failing at the same time, embodiments of the present application propose a multi-controller storage device based on heterogeneous controllers. Here, a multi-controller storage device based on heterogeneous controllers means that the storage device has N controllers, at least two of which are heterogeneous controllers, and N is greater than 1.
[0027] Heterogeneous controllers can be characterized by their differentiated designs. For example, controllers with different design schemes are called 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 This example illustrates two controllers being heterogeneous. For example, in a dual-controller storage device (comprising two controllers: controller 1 and controller 2), controllers 1 and 2 in the dual-controller storage device each use CPUs of the same architecture, such as the X86 architecture or ARM architecture, but from different vendors. In this case, controllers 1 and 2 in the dual-controller storage device are considered heterogeneous controllers. Another example is in a quad-controller storage device (comprising four controllers: controllers 1 through 4). If controllers 1 and 3 in the quad-controller storage device use X86 architecture CPUs from vendor A, and controllers 3 and 4 use X86 architecture CPUs from vendor B, then controllers 1 and 3, or controllers 1 and 4, or controllers 2 and 3, or controllers 2 and 4 are considered heterogeneous controllers. If controllers 1 through 4 in the quad-controller storage device use X86 architecture or ARM architecture CPUs from different vendors, then controllers 1 through 4 are considered heterogeneous controllers. And so on.
[0029] As another example, if at least two controllers use CPUs of different architectures, the at least two controllers can be considered heterogeneous controllers. For example, in the dual-controller storage device described above, if controller 1 uses an X86-architecture CPU and controller 2 uses an ARM-architecture CPU, then controllers 1 and 2 in the dual-controller storage device can be considered heterogeneous controllers. Furthermore, in the quad-controller storage device described above, if controllers 1 and 2 use X86-architecture CPUs from manufacturer A, and controllers 3 and 4 use ARM-architecture CPUs from manufacturer B, then controllers 1 and 3, or controllers 1 and 4, or controllers 2 and 3, or controllers 2 and 4 can be considered heterogeneous controllers. If controllers 1 through 4 in the quad-controller storage device use CPUs of different architectures, then controllers 1 through 4 are considered heterogeneous controllers. And so on.
[0030] The above description of heterogeneous controllers is based on examples and is not restrictive. In this embodiment, it is sufficient to ensure that heterogeneous controllers with different design solutions are deployed in a multi-controller storage device and are differentiated.
[0031] By setting at least two controllers in the storage device to be heterogeneous controllers (for example, through differentiated controller design), the risk of all controllers failing due to the same exception can be avoided, thus ensuring business continuity.
[0032] In conventional applications, a memory configuration table is configured for the storage device. This memory configuration table contains at least 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, a controller using CPU1 supports a 16GB memory window, while a controller using CPU2 supports a 24GB memory window. Therefore, in this embodiment, a memory configuration table can be set based on the characteristics of each controller in the storage device. Tables 1 to 3 illustrate examples of memory configuration tables.
[0033] For example, as shown in the memory configuration table in Table 1, when the controller's physical memory is 32GB, the memory window size supported by the controller (the memory window size that allows other controllers to perform specified operations) is 24GB. When the controller's physical memory 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 are not detailed here.
[0034]
[0035]
[0036] Table 1
[0037]
[0038] Table 2
[0039]
[0040] Table 3
[0041] In applications, to ensure that all controllers can store the same amount of user data in their memory windows, the memory windows of all controllers must be the same size. In specific implementations, based on the memory window sizes supported by each controller in the memory configuration table above, the minimum of the supported memory window sizes can be selected as the target memory window size. Each controller then allocates memory windows based on this target memory window size.
[0042] For example, if a storage device can be configured with four controllers, controllers a through d, whose models may be AAAA, BBBB, or CCCC, and all four controllers have 32GB of physical memory, according to Tables 1 through 3, when the physical memory is 32GB, the minimum memory window size supported by each controller is 8GB. Regardless of the model of controllers a through d, the target memory window size used by each controller in the storage device will ultimately be limited to the minimum value, i.e., 8GB. For example, if controllers a and b are currently installed in the storage device, and the models are AAAA, and controllers c and d are BBBB, even though the available memory window sizes for controllers a through d are 24GB, the target memory window sizes for controllers a through d in the storage device will still be uniformly limited to 8GB. For another example, if only controllers a and b are currently installed in the storage device, and the available memory window sizes for controllers a and b are both 24GB, the target memory window sizes for controllers a and b in the storage device will still be uniformly limited to 8GB.
[0043] As can be seen, determining the target memory window size for each controller based on the aforementioned memory configuration table limits the available memory window size for each controller in the storage device, thereby limiting performance. To maximize the performance of each controller in the storage device, this embodiment provides a solution for dynamic memory window negotiation between controllers. This allows each controller to be allocated the maximum possible memory window size based on the characteristics of the controllers actually installed in the storage device. This is described in detail below.
[0044] See also Figure 2 , Figure 2 This is a flow chart 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 startup of the first controller, 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 example, in this embodiment, before determining the maximum value of the memory window, the first controller may 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 0, etc., which is not specifically limited in this embodiment.
[0048] As an example, in this embodiment, the hardware requirements at least include requirements for access to the physical memory by controllers other than the current controller. For example, the size of the memory window in the physical memory accessible by the current controller may be required. Correspondingly, the maximum memory window size is less than or equal to the size of the memory window in the physical memory accessible by controllers other than the current controller. This is essentially the maximum memory window size 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 above hardware requirements limit the size of the memory window in the above physical memory accessed by other controllers except this controller to 32GB. It is finally determined that the maximum value of the memory window supported by the above 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 of the first controller. This can be implemented based on the code written by the developer or other methods, and the embodiment itself does not limit this.
[0051] Step 202 : After determining the maximum value of the memory window supported by the first controller, the first controller detects whether the storage device has at least one second controller. If yes, step 203 is executed; if not, step 204 is executed.
[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 that returns 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] In step 203, a target memory window negotiation value is determined based on the maximum memory window 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. The target memory window negotiation value is determined as the current memory window negotiation value of the first controller. Furthermore, a local memory window negotiation flag is updated from a first value to a second value, where the first value indicates that the memory window negotiation is incomplete and the second value indicates that the memory window negotiation is complete. Step 205 is then executed.
[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 (referred to as the current memory window negotiation value of the second controller). Here, the current memory window negotiation value of the second controller can be the maximum memory window value supported by the second controller. The method for determining the maximum memory window value supported by the second controller is similar to the method for determining the maximum memory window value by the first controller and is not further defined 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 explained below. Figure 3 The examples are described here and I will not go into details.
[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 negotiated 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 no second controller is detected in the storage device. For example, if the physical memory actually installed in the first controller is 64 GB, and the hardware requirements limit the size of the memory window in the physical memory accessible by controllers other than the first controller to 32 GB, if it is detected that the storage device does not have a second controller, the current negotiated memory window value of the first controller is ultimately determined to be 32 GB, and the first controller divides the memory window according to the negotiated current memory window value of 32 GB.
[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 negotiated value and the current memory window negotiated 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 synchronizing 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 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 As can be seen from the illustrated process, in this embodiment, by using at least two heterogeneous controllers in the storage device and adopting differentiated controller designs, it is possible to prevent all controllers in the storage device from failing at the same time, thereby ensuring service 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 value 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, and ensures 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 embodiment of Figure 1 The following process is described:
[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 memory window value supported by the controller 301 (i.e., the maximum memory window value actually supported by the controller 301) based on 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 be 32GB. Then, the controller 301 determines that the above-mentioned maximum memory window value 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 example, if controller 301 finds that there is no powered-on controller (referred to as controller 302) in the storage device, controller 301 determines the maximum memory window value as the current memory window negotiation value of controller 301, and divides the memory window according to the determined memory window negotiation value, such as 32 GB. Simultaneously, controller 301 updates the local memory window negotiation flag 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 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] Controller 301 then determines a target memory window negotiation value based on the maximum memory window value and the current memory window negotiation values of each second controller. Alternatively, the target memory window negotiation value can be represented by the following formula: target memory window negotiation value = min{maximum memory window value of controller 301, current memory window negotiation values of all second controllers}.
[0072] Controller 301 determines the target memory window negotiation value as the current memory window negotiation value of controller 301, and divides the memory window according to the current memory window negotiation value, such as 32 GB. For example, if the target memory window negotiation value is 32 GB, controller 301 divides the memory window according to the target memory window negotiation value of 32 GB. At the same time, controller 301 updates the local memory window negotiation flag 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 controller 301 can continue to detect whether the current memory window negotiation value of the second controller is the same as the above-mentioned target memory window negotiation value for the next second controller.
[0074] Taking one controller 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 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 different from the current memory window negotiation value of the controller 302, it sends a renegotiation notification to the controller 302, and the renegotiation notification carries the current memory window negotiation value of the 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, the controller 302 will find that the current memory window negotiation value of the controller 302 is greater than the current memory window negotiation value of the controller 301 (that is, the target memory window negotiation value mentioned above). The 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 the controller 301, and shrinking the local memory window based on the current memory window negotiation value of the controller 301 (that is, the target memory window negotiation value mentioned above) so that the size of the shrinked memory window is the current memory window negotiation value of the controller 301 (that is, the target memory window negotiation value mentioned above), and at the same time, the current memory window negotiation value is modified to the current memory window negotiation value of the controller 301 (that is, the target memory window negotiation value mentioned above). 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 size of the local memory window by: the controller 302 determines the space to be released based on the local current memory window negotiated value and the current memory window negotiated value of the controller 301 (i.e., the target memory window negotiated value); the space to be released is the remaining space in the memory space corresponding to the current memory window negotiated value of the controller 302, excluding the memory space corresponding to the target memory window negotiated value. For example, assuming that the current memory window negotiated value of the controller 302 is 48GB and the current memory window negotiated value of the controller 301 (i.e., the target memory window negotiated value) is 32GB, the space to be released is the remaining space in the 48GB memory space corresponding to the current memory window negotiated value of the controller 302, excluding the 32GB memory space corresponding to the target memory window negotiated value. The size of the space to be released is the difference between the local current memory window negotiated value and the memory window negotiated value carried in the renegotiation notification, i.e., 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, it 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 write is successful, the cache block is released. Once 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 this part of 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 cache blocks 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, 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 when the local memory window negotiation flag changes from the first value to the second value to determine that synchronization can be started, etc., a synchronization notification is sent to the controller 301.
[0085] Controller 301 receives a synchronization response from controller 302. If the synchronization response indicates that synchronization is not required, data synchronization is not performed with controller 302. If the synchronization response indicates that synchronization is required, data synchronization is performed with controller 302 to synchronize data from controller 302. If the synchronization response indicates that synchronization is to be waited for, controller 302 is added to a waiting list. After receiving a synchronization notification from controller 302, controller 301 removes controller 302 from the waiting list and synchronizes data with controller 302 to synchronize data from 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 this controller 301.
[0087] The above describes the interaction between controller 301 and controller 302, taking controller 302 as an example. After controller 301 performs the above interaction on each controller 302, the memory window corresponding to the current negotiated memory window value of controller 301 contains all dirty data (valid user data that has not been written to disk), which means that controller 301 is ready to run the service and can start the service.
[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 negotiated 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 negotiated values of all powered-on controllers all store the same dirty data, then the controller 301 can synchronize data from any controller 302 without having to synchronize data from every controller 302, thus 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 simultaneously. Taking a storage device containing two controllers (controller A and controller B) as an example, some services of the storage device run on controller A, and the other services run on controller B. Under this premise, the multiple controllers in the storage device monitor each other. Once any controller is detected to have an abnormality, such as a failure, shutdown, or being 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, thereby ensuring service continuity.
[0090] Optionally, in this embodiment, in response to the aforementioned exception, the remaining controllers in the storage device may renegotiate the memory window size. In this embodiment, after the aforementioned exception occurs, the remaining controllers in the storage device may renegotiate a memory window size that is larger than the previously negotiated memory window size. This maximizes the memory window used by the remaining controllers in the storage device, maximizing 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 called the takeover end) will update the local memory window negotiation identifier from the second value to the first value after confirming that it has been selected to take over the business of the controller where the abnormality occurs, 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 of 48 GB, and the remaining controller (referred to as controller Y) supports a maximum memory window of 32 GB. Figure 2 As shown in the process, the memory window size (that is, 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 2The process shown in the figure renegotiates the memory window size. The final negotiated memory window size (i.e., 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), thereby improving physical memory utilization.
[0093] It should be noted that in this embodiment, when the takeover end confirms that it has taken over the business of the controller (referred to as the taken-over end) that has experienced an abnormality, 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 steps are executed: Figure 2 The process shown to eventually restore 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 currently supported maximum 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 above describes the method provided in the embodiment of the present application. The following describes the device provided in the embodiment of the present application:
[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, where 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, after determining the maximum value of the memory window supported by the first controller, detect whether the storage device has at least one second 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, determining a target memory window negotiation value according to the memory window maximum value and the current memory window negotiation value of each second controller, 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, determining the target memory window negotiation value as the current memory window negotiation value of the first controller, and updating the local memory window negotiation identifier from a first value to a second value, where 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;
[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 service recovery of the first controller.
[0103] Optionally, 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.
[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 maximum memory window 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 the 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 based on the local current memory window negotiated value and the memory window negotiated value carried in the renegotiation notification, and prohibit subsequent data storage in the space to be released; the size of the space to be released is the difference between the local current memory window negotiated value and the memory window negotiated 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, when the first controller confirms taking over the service running on the abnormal controller, the processing unit further updates the local memory window negotiation identifier from the second value to the first value, and returns to the operation after determining the maximum value of the memory window supported by the controller.
[0113] Optionally, the first controller synchronizing data with the at least one second controller based on the current memory window negotiated value and the current memory window negotiated value of the 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 the synchronization data from the memory window corresponding to the current memory window negotiated value of the second controller and stores the synchronization data into the local memory window corresponding to the current memory window negotiated 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 the synchronization data in the local memory window corresponding to the 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, which is used to indicate that it is not synchronized; 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, which 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, which 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, this 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 achieve 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 machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that may contain or store information, such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, a storage drive (such as a hard disk drive), a solid-state drive, any type of storage disk (such as a CD, DVD, etc.), or similar storage media, 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 having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.
[0128] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this 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 can be provided as methods, systems, or computer program products. Therefore, the present application can 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 can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic 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 produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. 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] Furthermore, these computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising 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 A step that specifies a function in one or more boxes.
[0133] The foregoing is merely 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 modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within 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 startup, the first controller determines a maximum memory window value supported by the first controller based on the memory size of the physical memory actually installed in the first controller and hardware requirements configured for the first controller; the hardware requirements at least include a requirement for the physical memory to be accessed by controllers other than the present controller; the maximum memory window value is less than or equal to a size of a memory window in the physical memory to be accessed by controllers other than the present controller; the first controller is any controller in a 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 first controller, the first controller detects whether the storage device has at least one second controller, 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 so, 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 startup, the first controller synchronizes data with the at least one second controller based on the current memory window negotiation value and the current memory window negotiation value of the at least one second controller to complete 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 determining of 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: From the maximum memory window 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, wherein 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, wherein 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. Then, 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 based on the local current memory window negotiated value and the memory window negotiated value carried in the renegotiation notification, and prohibit subsequent data storage in the space to be released; the size of the space to be released is the difference between the local current memory window negotiated value and the memory window negotiated 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 to 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 synchronizing data with the at least one second controller based on the current memory window negotiated value and the current memory window negotiated value of the 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 the synchronization data from the memory window corresponding to the current memory window negotiated value of the second controller and stores the synchronization data into the local memory window corresponding to the current memory window negotiated 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 the synchronization data in the local memory window corresponding to the 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 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, after determining the maximum value of the memory window supported by the first controller, detect whether the storage device has at least one second 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, determining a target memory window negotiation value according to the memory window maximum value and the current memory window negotiation value of each second controller, 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, determining the target memory window negotiation value as the current memory window negotiation value of the first controller, and updating the local memory window negotiation identifier from a first value to a second value, where 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; 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 service recovery of the first controller.
11. The storage device according to claim 10, wherein: 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, wherein: The determining of 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: From the maximum memory window 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, wherein: 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, wherein: 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, wherein: 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 based on the local current memory window negotiated value and the memory window negotiated value carried in the renegotiation notification, and prohibit subsequent data storage in the space to be released; the size of the space to be released is the difference between the local current memory window negotiated value and the memory window negotiated 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, wherein: 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 that have an abnormality, and return to the operation after determining the maximum memory window value supported by the controller.
17. The storage device according to claim 10, wherein: The synchronizing data with the at least one second controller based on the current memory window negotiated value and the current memory window negotiated value of the 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 the synchronization data from the memory window corresponding to the current memory window negotiated value of the second controller and stores the synchronization data into the local memory window corresponding to the current memory window negotiated 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 the synchronization data in the local memory window corresponding to the 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, wherein: The synchronization unit is further configured 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 another controller, 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, which is used to indicate that it is not synchronized; 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, which 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, which 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