Access method, device, equipment and medium of multi-level cache storage system

By directly determining the replacement area and the target writeback area in the multi-level cache storage system, the replacement and writeback of data blocks is realized, which solves the problem of insufficient flexibility in data consistency maintenance and improves the flexibility and multi-function of data block replacement and writeback. Access efficiency of level cache storage system.

CN118626410BActive Publication Date: 2024-10-29BEIJING VCORE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411096643.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-10-29
Estimated Expiration
2044-08-12

AI Technical Summary

Technical Problem

When a data block is modified in a multi-level cache storage system, the conditions for replacing and writing it back to the previous level cache are limited, resulting in insufficient flexibility in data consistency maintenance.

Method used

By obtaining the replacement request operation in the target request operation, the replacement area and the target writeback area are determined, and the data block is directly written back to the target writeback area to avoid waiting for specific conditions to be met.

Benefits of technology

It improves the flexibility of data block replacement and write-back, optimizes the access method of multi-level cache storage system, and achieves data consistency maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626410B_ABST
    Figure CN118626410B_ABST
Patent Text Reader

Abstract

The present application proposes a method, device, equipment and medium for accessing a multi-level cache storage system, which relates to the field of data processing technology. The method includes: obtaining a target request operation of the multi-level cache storage system; in response to the target request operation being a first replacement request operation, obtaining a replacement area of ​​the first replacement request operation in the multi-level cache storage system to determine a target write-back area of ​​the first replacement request operation in the multi-level cache storage system; obtaining a first data block of the first replacement request operation in the replacement area, and replacing and writing the first data block back to the target write-back area. Without waiting for a specific condition to be met, the data block can be replaced and written back to a different target write-back area, which improves the flexibility of replacing and writing back the data block, and optimizes the access method of the multi-level cache storage system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an access method, device, equipment and medium for a multi-level cache storage system. Background Art

[0002] With the development of technology, the number of processor cores integrated on a chip is increasing, and the amount of data stored in the on-chip multi-level cache storage system is increasing accordingly.

[0003] When data in a data block in a multi-level cache storage system is modified, the data block can be marked for modification and replaced and written back to the previous level cache when specific conditions are met to maintain data consistency in the multi-level cache storage system. However, the flexibility is poor. Summary of the invention

[0004] The present application aims to solve one of the technical problems in the related art at least to some extent.

[0005] To this end, a first aspect of the present application proposes an access method for a multi-level cache storage system.

[0006] A second aspect of the present application provides an access device for a multi-level cache storage system.

[0007] A third aspect of the present application provides an electronic device.

[0008] A fourth aspect of the present application provides a computer-readable storage medium.

[0009] In a first aspect, the present application proposes a method for accessing a multi-level cache storage system, the method comprising: obtaining a target request operation of the multi-level cache storage system; in response to the target request operation being a first replacement request operation, obtaining a replacement area of ​​the first replacement request operation in the multi-level cache storage system to determine a target write-back area of ​​the first replacement request operation in the multi-level cache storage system; obtaining a first data block of the first replacement request operation in the replacement area, and replacing and writing the first data block back to the target write-back area.

[0010] In a second aspect of the present application, a device for accessing a multi-level cache storage system is proposed, the device comprising: an acquisition module, used to acquire a target request operation of the multi-level cache storage system; a determination module, used to obtain a replacement area of ​​the first replacement request operation in the multi-level cache storage system in response to the target request operation being a first replacement request operation, so as to determine a target write-back area of ​​the first replacement request operation in the multi-level cache storage system; a replacement write-back module, used to acquire a first data block of the first replacement request operation in the replacement area, and replace and write the first data block back to the target write-back area.

[0011] The third aspect of the present application proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the access method of the multi-level cache storage system proposed in the first aspect above.

[0012] To achieve the above-mentioned purpose, the fourth aspect of the present application proposes a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the access method of the multi-level cache storage system proposed in the first aspect above is implemented.

[0013] The access method, device, equipment and medium of the multi-level cache storage system of the embodiment of the present application, when the target request operation is the first replacement request operation, obtain the replacement area and the target write-back area corresponding to the first replacement request operation, perform replacement processing on the first data block in the replacement area, and write the first data block back to the target write-back area. In the present application, the target write-back area is determined according to the replacement area to replace and write back the first data block, thereby realizing the consistency maintenance of the multi-level cache storage system, realizing the replacement write-back of the first data block based on the first replacement request operation, and replacing and writing back the data block to different target write-back areas without waiting for specific conditions to be met, thereby improving the flexibility of replacing and writing back the data block, and optimizing the access method of the multi-level cache storage system.

[0014] It should be understood that the contents described in this application are not intended to identify the key or important features of the embodiments of this application, nor are they intended to limit the scope of this application. Other features of this application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0016] Figure 1 A schematic diagram of a flow chart of a method for accessing a multi-level cache storage system according to an embodiment of the present application;

[0017] Figure 2 A schematic diagram of a multi-level cache storage system according to an embodiment of the present application;

[0018] Figure 3 A schematic diagram of a flow chart of a method for accessing a multi-level cache storage system according to another embodiment of the present application;

[0019] Figure 4 A schematic diagram of the structure of an access device of a multi-level cache storage system according to an embodiment of the present application;

[0020] Figure 5 It is a structural schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0021] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0022] Figure 1 FIG. 1 is a flow chart of a method for accessing a multi-level cache storage system according to an embodiment of the present application. Figure 1 As shown, the method includes:

[0023] S101, obtaining a target request operation of a multi-level cache storage system.

[0024] In an embodiment of the present application, a request operation for accessing a multi-level cache storage system may be marked as a target request operation, wherein the target request operation may include a read access request operation, a write access request operation, a replacement request operation, an invalidation request operation, and an invalidation and write-back request operation, etc.

[0025] S102: In response to the target request operation being a first replacement request operation, obtaining a replacement area of ​​the first replacement request operation in the multi-level cache storage system to determine a target write-back area of ​​the first replacement request operation in the multi-level cache storage system.

[0026] In the embodiment of the present application, the target request operation may also include a replacement request operation of a data block in the multi-level cache storage system, and the replacement request operation currently to be executed in the multi-level cache storage system may be marked as a first replacement request operation.

[0027] Optionally, there is an access area in the multi-level cache storage system for the first replacement request operation, and the area can be marked as a replacement area for the first replacement request operation in the multi-level cache storage system. The replacement area can be understood as the area where the data blocks that need to be replaced by the first replacement request operation in the multi-level cache storage request operation are located.

[0028] As an example, Figure 2 As shown, the processor core 1 includes a first-level private cache, and the multi-level cache storage system also includes a second-level private cache and a shared cache. Figure 2 The routing node shown implements the first-level private cache, the second-level private cache, and Figure 2 The data interaction between the shared caches shown in the figure is constructed Figure 2 A multi-level cache storage system is shown.

[0029] exist Figure 2In the scenario shown, the replacement area of ​​the first replacement request operation can be Figure 2 The first-level private cache shown can also be Figure 2 The secondary private cache shown can also be Figure 2 The shared cache shown is not specifically limited here.

[0030] In an embodiment of the present application, after a data block in a replacement area is replaced, the data in the data block needs to be written back, wherein the area where the data block is written back can be marked as the target write-back area of ​​the first replacement request operation in the multi-level cache storage system.

[0031] As an example, the replacement area of ​​the first replacement request operation in the multi-level cache storage system is set to Figure 2 The first-level private cache shown is Figure 2 In the multi-level cache storage system shown in FIG. Figure 2 The second-level private cache at the previous level of the first-level private cache is determined as the target write-back area of ​​the first replacement request operation.

[0032] As another example, the replacement area of ​​the first replacement request operation is set to Figure 2 The secondary private cache shown in FIG. 1 is a private cache of the embodiment shown in FIG. Figure 2 The shared cache shown is the target write-back area corresponding to the second-level private cache.

[0033] S103, obtaining a first data block in the replacement area of ​​the first replacement request operation, and replacing and writing the first data block back to the target write-back area.

[0034] In the embodiment of the present application, the data block replaced by the first replacement request operation in the replacement area may be marked as the first data block.

[0035] Optionally, based on the execution of the first replacement request operation, a replacement process may be performed on the first data block in the replacement area, and the data in the first data block may be written back to the corresponding target write-back area.

[0036] As an example, set the replacement area to Figure 2 The target write-back area of ​​the first-level private cache is Figure 2 In the example, after the first data block in the first private cache is replaced, the data in the first data block can be written back to Figure 2 The secondary private cache shown thereby completes the execution of the first replacement request operation.

[0037] The method of the multi-level cache storage system proposed in the present application, when the target request operation is the first replacement request operation, obtains the replacement area and the target write-back area corresponding to the first replacement request operation, performs replacement processing on the first data block in the replacement area, and writes the first data block back to the target write-back area. In the present application, the target write-back area is determined according to the replacement area to replace and write back the first data block, thereby realizing the consistency maintenance of the multi-level cache storage system, realizing the replacement write-back of the first data block based on the first replacement request operation, and replacing and writing back the data block to different target write-back areas without waiting for specific conditions to be met, thereby improving the flexibility of replacing and writing back the data block, and optimizing the access method of the multi-level cache storage system.

[0038] In the above embodiment, regarding the execution of the first replacement request operation, it is also possible to combine Figure 3 understand, Figure 3 FIG. 1 is a flow chart of a method for accessing a multi-level cache storage system according to another embodiment of the present application. Figure 3 As shown, the method includes:

[0039] S301, in response to a first access request operation being a first replacement request operation, obtaining a replacement area of ​​the first replacement request operation in a multi-level cache storage system to determine a target write-back area of ​​the replacement request operation in the multi-level cache storage system.

[0040] Optionally, in response to the replacement area being a first-level private cache in the multi-level cache storage system, a second-level private cache corresponding to the first-level private cache is determined to be a target write-back area of ​​the first replacement request operation in the multi-level cache storage system.

[0041] As an example, Figure 2 As shown, in Figure 2 In the multi-level cache storage system shown, the previous level cache of the first-level private cache is the second-level private cache, wherein the data blocks in the first-level private cache can be written back to the second-level private cache.

[0042] In this scenario, when the replacement area of ​​the first replacement request operation in the multi-level cache storage system is the first-level private cache, the second-level private cache can be determined as the target write-back area corresponding to the first replacement request operation.

[0043] Optionally, in response to the replacement area being a secondary private cache in the multi-level cache storage system, the shared cache and / or the memory is determined as a target write-back area for the first replacement request operation in the multi-level cache storage system.

[0044] As an example, in Figure 2 In the multi-level cache storage system shown, data blocks in the second-level private cache can be written back to the shared cache or directly written back to the memory.

[0045] In this example, when the replacement area of ​​the first replacement request operation is Figure 2 When the secondary private cache is shown, Figure 2 The shared cache and / or memory shown is determined as a target write-back area in the multi-level cache storage system for the first replacement request operation.

[0046] S302: Obtain a first data block in a replacement area for a first replacement request operation, and write the first data block back to a target write-back area by replacement.

[0047] Optionally, in response to the replacement area being a first-level private cache and the target write-back area being a second-level private cache, the second data block in the first-level private cache of the first replacement request operation is obtained, and the second data block is used as the first data block to generate a second replacement request operation for the second-level private cache, and the first data block is replaced and written back to the second-level private cache based on the second replacement request operation.

[0048] In the scenario where the replacement area is the first-level private cache and the target write-back area is the second-level private cache, the data block that needs to be replaced in the first-level private cache by the first replacement request operation can be marked as the second data block, and the second data block is the first data block in the replacement area of ​​the first replacement request operation.

[0049] Optionally, the second data block serving as the first data block needs to be replaced and written back. In this scenario, the first-level private cache can generate a request operation corresponding to the second data block and send the request operation to the second-level private cache to replace the second data block from the first-level private cache and write it back to the second-level private cache.

[0050] The request operation generated by the first-level private cache for replacing and writing the second data block back to the second-level private cache may be marked as a second replacement request operation.

[0051] In an embodiment of the present application, each data block in the secondary private cache is provided with an inclusion bit vector bit and a write status bit (w bit), wherein, for any data block, the value on the inclusion bit vector bit of the data block can be used to identify whether there is a corresponding data block in the corresponding primary private cache, and the value on the write status bit of the data block can be used to identify whether the data block has been written.

[0052] In this scenario, the write status bit and the included bit vector bit of the first data block in the secondary private cache are modified, and a replacement write-back response is performed on the processor core corresponding to the first replacement request operation.

[0053] In the embodiment of the present application, after the first data block is replaced in the first-level private cache and written back to the second-level private cache, the state of the first data block in the second-level private cache changes.

[0054] In this scenario, the first data block in the secondary private cache is a written data block, and the value of the write status bit of the first data block in the secondary private cache can be modified to a corresponding value of the written state, such as 1.

[0055] Accordingly, when the second data block in the first-level private cache is replaced and the first data block is written back to the second-level private cache, it can be determined that the first data block in the second-level private cache does not have a corresponding associated data block in the first-level private cache. In this scenario, the inclusion relationship corresponding to the first data block can be determined according to the inclusion relationship determination method in the relevant technology, and the inclusion bit vector bit corresponding to the first data block can be modified according to the determination result.

[0056] It should be noted that the inclusion relationship between the data blocks can be a maintenance inclusion relationship, a non-maintenance inclusion relationship, or a non-inclusion relationship, which is not specifically limited here.

[0057] Optionally, in response to the replacement area being a secondary private cache, a third data block in the secondary private cache of the first replacement request operation is obtained, the third data block is used as the first data block, and a first data block state of the first data block in the secondary private cache is obtained.

[0058] In the scenario where the replacement area is a secondary private cache, the data block to be replaced by the first replacement request operation in the secondary private cache can be marked as a third data block, and the third data block is the first data block in the replacement area of ​​the first replacement request operation.

[0059] The third data block as the first data block may be in a shared state or an exclusive state. In this scenario, the first data block may be replaced and written back to the target write-back area according to the state of the first data block.

[0060] As a possible implementation, in response to the fact that the fourth data block associated with the first data block does not exist in the shared cache and the first data block status indicates that the first data block is in a shared state, the shared cache is determined to be the target write-back area, and the first data block is replaced and written back to the shared cache.

[0061] In the embodiment of the present application, the state of the first data block in the replacement area may be marked as the first data block state, and the current state of the first data block may be identified based on specific information carried by the first data block state.

[0062] Optionally, in order to maintain a non-inclusion relationship between cache levels in a multi-level cache storage system, in this scenario, the first data block in the secondary private cache may or may not have an associated data block in the shared cache, wherein the data block associated with the first data block in the secondary private cache in the shared cache can be marked as the fourth data block.

[0063] Among them, when the fourth data block does not exist in the shared cache and the first data block in the secondary private cache is in a shared state, it can be determined that the data in the first data block can be used as data that can be shared by caches of all levels in the multi-level cache storage system, and further it can be determined that the target write-back area of ​​the first data block is the shared cache.

[0064] Furthermore, the first data block may be replaced and written back from the secondary private cache to the shared cache.

[0065] As another possible implementation, in response to the absence of a fourth data block associated with the first data block in the shared cache and the first data block status indicating that the first data block is in an exclusive state, the memory is determined as the target write-back area, and the first data block is replaced and written back to the memory.

[0066] In an embodiment of the present application, when the fourth data block does not exist in the shared cache and the first data block is in an exclusive state, it can be understood that the data in the first data block is not data that can be shared by caches at each level of the multi-level cache storage system. In this scenario, the first data block is not written back to the shared cache, and it can be determined that the memory can be used as the target write-back area for the first data block.

[0067] Further, based on the execution of the first replacement request operation, the first data block is replaced and written back to the memory from the secondary private cache.

[0068] It should be noted that there may be a fourth data block associated with the first data block in the shared cache, wherein in response to the first data block having an associated fourth data block in the shared cache, the first data block is replaced and written back to the shared cache.

[0069] In the embodiment of the present application, there may be a fourth data block associated with the first data block in the shared cache. In this scenario, it can be determined that the data in the first data block can be written back to the shared cache.

[0070] Furthermore, the shared cache may be used as a target write-back area for the first data block, and the first data block may be replaced by being written back to the shared cache from the secondary private cache.

[0071] As another possible implementation, in response to the existence of corresponding data block directory information for the first data block in the cache directory of the multi-level cache storage system and the absence of the fourth data block in the shared cache, the first data block is replaced and written back to the target write-back area according to the status of the first data block.

[0072] In an embodiment of the present application, a multi-level cache storage system has a corresponding cache directory. In this scenario, there may be corresponding directory information for the first data block in the cache directory, and the directory information can be marked as the data block directory information corresponding to the first data block in the cache directory.

[0073] In a scenario where data block directory information exists in the cache directory and the fourth data block does not exist in the shared cache, the state of the first data block can be a shared state or an exclusive state, wherein, in response to the first data block state being a shared state, the first data block is replaced and written back to the shared cache.

[0074] It can be understood that when the state of the first data block is a shared state, the data in the first data block can be used as data shared by caches at all levels of the multi-level cache storage system. In this scenario, the first data block can be replaced by the secondary private cache and written back to the shared cache.

[0075] Accordingly, the first data block may be in an exclusive state, wherein, in response to the first data block being in an exclusive state, the first data block is replaced and written back to the memory. It can be understood that when the first data block is in an exclusive state, the data in the first data block does not need to be in the shared cache as data shared by caches of various levels of a multi-level cache storage system. In this scenario, the first data block can be directly replaced and written back to the memory by the secondary private cache.

[0076] It should be noted that after the first data block is replaced by the secondary private cache and written back to the corresponding target write-back area, the data block directory information corresponding to the first data block in the cache directory needs to be modified, wherein, in response to the first data block being replaced and written back to the shared cache, the status information and identification bit information of the data block directory information are modified.

[0077] In an embodiment of the present application, the data block directory information can be modified by modifying the status information and identification bit information of the data block directory information, wherein the status of the first data block can be obtained through the status information, and the identification bit information can be understood as the w bit in the data block directory information, which is used to indicate whether the corresponding data block is written.

[0078] Optionally, after the first data block is replaced and written back to the target write-back area, the target write-back area performs a replacement write-back response to the secondary private cache. It can be understood that when the first data block is replaced and written back to the corresponding target write-back area, the target write-back area can generate corresponding response information, which is the replacement write-back response sent to the secondary private cache serving as the replacement area.

[0079] It should be noted that, during the replacement write-back process, the data blocks that are replaced and written back may need to be invalidated. The invalidation of the data blocks can be understood in conjunction with the following contents:

[0080] Optionally, in response to the target request operation being an invalidation request operation, the second data block status of the fifth data block of the invalidation request operation in the second-level private cache is obtained, and the sixth data block of the invalidation request operation in the first-level private cache corresponding to the second-level private cache is obtained, wherein the invalidation request operation is a request operation sent by the cache directory to the second-level private cache.

[0081] In an embodiment of the present application, some data blocks in a multi-level cache storage system need to be invalidated. For example, for any data block, when the directory information of the data block in the cache directory indicates that the data block is an invalid data block, and the data block is currently in a non-invalid state, in order to maintain the data consistency of the multi-level cache storage system, in this scenario, the data block needs to be invalidated.

[0082] Optionally, the cache directory may send a related request operation to the cache to which the data block belongs, thereby invalidating the data block.

[0083] As an example, the cache to which the data block to be invalidated belongs is set to Figure 2 The secondary private cache shown in FIG. 1 can mark the related request operation sent by the cache directory to the secondary private cache as an invalid request operation, and mark the data block that needs to be invalidated in the secondary private cache by the invalid request operation as the fifth data block, and the invalid request operation in FIG. Figure 2 The data block in the first-level private cache that needs to be invalidated is marked as the sixth data block.

[0084] In this scenario, the invalidation request operation may be performed according to the status of the fifth data block and the status of the sixth data block, wherein the status of the fifth data block may be marked as the second data block status.

[0085] Optionally, in response to the second data block being in a shared state and identifying that the sixth data block exists in the first-level private cache, invalidation processing is performed on the sixth data block.

[0086] In an embodiment of the present application, when the second data block status indicates that the fifth data block is in a shared state and the sixth data block exists in the first-level private cache, it is necessary to invalidate the sixth data block and then invalidate the fifth data block in the second-level private cache.

[0087] It should be noted that the sixth data block may be in a shared state in the first-level private cache. In this scenario, in response to the target request operation being an invalid request operation, and the sixth data block being in a shared state in the first-level private cache, and the fifth data block and the sixth data block being in a maintenance inclusion relationship, the sixth data block is invalidated.

[0088] In an embodiment of the present application, when the fifth data block and the sixth data block are in a maintenance containment relationship, it can be understood that the fifth data block contains all the data in the sixth data block. In this scenario, it is necessary to first invalidate the sixth data block and then invalidate the fifth data block to implement the corresponding invalidation request operation.

[0089] Optionally, in response to the target request operation being an invalid request operation and the sixth data block being in a shared state, invalidation processing is performed on the sixth data block.

[0090] In an embodiment of the present application, when the sixth data block is in a shared state, it can be understood that the data content in the sixth data block may have a backup in the private cache on other processor cores, or may have a backup in the shared cache. In this scenario, in order to implement the execution of the invalidation request operation, the sixth data block can be invalidated first, and a corresponding invalidation processing response can be generated and transmitted to the secondary private cache.

[0091] It should be noted that after receiving the invalidation processing response, the secondary private cache may invalidate the fifth data block stored therein, or may invalidate related data blocks in other caches based on other preset invalidation strategies, which is not specifically limited here.

[0092] Optionally, the sixth data block may be processed based on a data block invalidation processing method in the related art, thereby achieving invalidation processing of the sixth data block.

[0093] Optionally, in response to the first-level private cache making a first invalidation response to the second-level private cache for the sixth data block, the fifth data block is invalidated, and a second invalidation response to the fifth data block and the sixth data block is made to the cache directory.

[0094] In an embodiment of the present application, after the sixth data block in the first-level private cache is invalidated, a corresponding processing response can be generated and sent to the second-level private cache. The processing response can be marked as a first invalid response. Furthermore, after the second-level private cache receives the first invalid response sent by the first-level private cache, it can invalidate the fifth data block in the second-level private cache.

[0095] Optionally, after the fifth data block in the secondary private cache is invalidated, a corresponding processing response can be generated and returned to the cache directory that sent the invalidation request operation. The processing response can be marked as a second invalidation response. Based on the cache directory's reception of the second invalidation response, the fifth data block and the sixth data block are invalidated.

[0096] In the embodiment of the present application, the write-back of the data block in the replacement write-back process can be further understood in conjunction with the following contents:

[0097] In some implementations, in response to the target request operation being a write-back request operation, it is identified whether the seventh data block of the write-back request operation in the secondary private cache is in an exclusive state, and it is identified whether there is an associated eighth data block in the first-level private cache corresponding to the second-level private cache for the write-back request operation, wherein the write-back request operation is a request operation sent by the cache directory to the second-level private cache.

[0098] In an embodiment of the present application, the cache directory can send a write-back request operation to each level of cache on the corresponding processor core, wherein the data block that needs to be written back in the secondary private cache on the processor core by the write-back request operation can be marked as the seventh data block, and the data block that needs to be written back in the primary private cache by the write-back request operation can be marked as the eighth data block.

[0099] In this scenario, the status of the seventh data block and the eighth data block can be identified respectively, wherein, whether the seventh data block is in an exclusive state and whether the eighth data block exists in the first-level private cache can be identified based on their respective attribute information.

[0100] Optionally, in response to a write-back request operation and an associated eighth data block exists in the first-level private cache, the eighth data block is written back to the second-level private cache, and the eighth data block is adjusted to a shared state; and, in response to identifying that the seventh data block is in an exclusive state, after the eighth data block is written back to the second-level private cache, the seventh data block is adjusted to a shared state, and a write-back response corresponding to the write-back request operation is sent to the cache directory.

[0101] It can be understood that when the eighth data block exists in the first-level private cache, the eighth data block needs to be written back to the second-level private cache, and the eighth data block needs to be adjusted to a shared state. In this scenario, it can be identified whether the seventh data block is in an exclusive state. When it is identified that the seventh data block is in an exclusive state, its state needs to be adjusted.

[0102] The seventh data block needs to be adjusted to a shared state, and a corresponding response is generated and returned to the cache directory that sent the write-back request operation, wherein the response is a write-back response.

[0103] It should be noted that after the seventh data block is adjusted to a shared state, the secondary private cache can be marked as the owner node of the seventh data block, wherein the secondary private cache can be set and processed according to the owner node setting method in the relevant technology, thereby marking the secondary private cache as the owner node of the seventh data block.

[0104] In some implementations, in response to the target request operation being a write-back request operation and the eighth data block being in an exclusive state in the first-level private cache, the second-level private cache sends a write-back response to the first exclusive processor core, wherein the first exclusive processor core is a processor core that exclusively owns the backup data block corresponding to the eighth data block.

[0105] In an embodiment of the present application, when the eighth data block in the first-level private cache can be in an exclusive state, in order to realize the write back of the eighth data block to the second-level private cache, a corresponding write back request can be sent to the processor core that exclusively owns the backup data block corresponding to the eighth data block in the multi-level cache storage system, wherein the processor core that exclusively owns the backup data block corresponding to the eighth data block can be marked as the first exclusive processor core.

[0106] Further, the secondary private cache may send a corresponding write-back request to the first exclusive processor core, so as to write the backup data block corresponding to the eighth data block exclusively occupied by the first exclusive processor core back to the secondary private cache.

[0107] In other implementations, in response to the target request operation being a write-back request operation and the eighth data block being in an exclusive state in the first-level private cache, the eighth data block is adjusted to a shared state and the eighth data block is written back to the second-level private cache.

[0108] In an embodiment of the present application, when the eighth data block is in an exclusive state in the first-level private cache, in order to realize the write back of the eighth data block to the second-level private cache, the data block state of the eighth data block can be adjusted so that the eighth data block after the state adjustment can realize the data block write back operation.

[0109] Among them, the eighth data block can be adjusted to a shared state, which can be understood as the eighth data block in a shared state meets the preset data block write-back condition. In this scenario, the eighth data block adjusted to a shared state can be written back to the secondary private cache.

[0110] In the embodiment of the present application, during the process of performing replacement write-back, it may also be necessary to invalidate and write-back the data block. The invalidation and write-back can be understood in conjunction with the following contents:

[0111] In response to the target request operation being an invalidate and write back request operation, it is identified whether the ninth data block of the invalidate and write back request operation in the secondary private cache is in an exclusive state, and it is identified whether there is an associated tenth data block in the primary private cache corresponding to the secondary private cache of the invalidate and write back request operation, wherein the invalidate and write back request operation is a request operation sent by the cache directory to the secondary private cache.

[0112] In an embodiment of the present application, when the target request operation is an invalidation and write-back request operation sent by the cache directory to the secondary private cache, the data block that needs to be written back and invalidated in the secondary private cache for the request operation can be marked as the ninth data block, and the data block that needs to be written back and invalidated in the first-level private cache for the request operation can be marked as the tenth data block.

[0113] Optionally, it is necessary to identify the status of the ninth data block in the second-level private cache and whether the tenth data block exists in the first-level private cache, wherein, when it is identified that the tenth data block exists in the first-level private cache, in response to an invalidation and write-back request operation, there is an associated tenth data block in the first-level private cache, the tenth data block is invalidated, and the tenth data block is written back to the second-level private cache.

[0114] In this scenario, the tenth data block in the first-level private cache needs to be written back to the second-level private cache, and the tenth data block needs to be invalidated in the first-level private cache, thereby completing the invalidation and write-back process of the tenth data block.

[0115] Optionally, in response to identifying that the ninth data block is in an exclusive state, after the tenth data block is written back to the secondary private cache, the ninth data block is invalidated and written back, and an invalidation and write-back response corresponding to the invalidation and write-back request operation is sent to the cache directory.

[0116] It can be understood that after the tenth data block is written back to the secondary private cache, the ninth data block in the exclusive state will be written back, wherein, when the ninth data block is in the exclusive state, the data in the ninth data block can be directly written back to the memory, and the ninth data block will be placed in an invalid state after the data is written back, so as to realize the invalidation and write back of the ninth data block.

[0117] Further, a processing response corresponding to the invalidation and write-back processing of the ninth data block is generated, and the response is sent to the cache directory as an invalidation and write-back response corresponding to the invalidation and write-back request operation.

[0118] In some implementations, in response to the target request operation being an invalidation and write-back request operation, and the tenth data block being in an exclusive state, the secondary private cache sends an invalidation and write-back request operation to the corresponding second exclusive processor core, wherein the second exclusive processor core is a processor core that exclusively owns a backup data block of the tenth data block, and the ninth data block is obtained based on the replacement of the tenth data block in the secondary private cache, and the ninth data block is in a maintenance inclusion relationship with the tenth data block.

[0119] In an embodiment of the present application, when the ninth data block is obtained by performing a replacement operation on the tenth data block with which the ninth data block is in a maintenance inclusion relationship, it can be understood that the data in the ninth data block is the same as the data in the tenth data block. In this scenario, when the tenth data block is in an exclusive state, the backup data block on the processor core that exclusively controls the backup corresponding to the tenth data block in the multi-level cache storage system can be invalidated, wherein the processor core can be marked as a second exclusive processor core.

[0120] Furthermore, the tenth data block and the corresponding backup data block on the second exclusive processor core are invalidated.

[0121] In other implementations, in response to the target request operation being an invalidate and write back request operation, and the tenth data block being in an exclusive state, the tenth data block is invalidated and a corresponding write back response is sent to the secondary private cache to write the tenth data block back to the secondary private cache.

[0122] In an embodiment of the present application, when the tenth data block is in an exclusive state, the tenth data block can be invalidated, and a corresponding write-back response can be sent to the corresponding secondary private cache to achieve invalidation and write-back of the tenth data block to the secondary private cache.

[0123] In the embodiment of the present application, the first replacement request operation may also be implemented through a cache directory, which may be understood in conjunction with the following content:

[0124] The directory status of the eleventh data block corresponding to the first replacement request operation in the cache directory is obtained, wherein, in response to the directory status being valid and clean, the backup data block in the secondary private cache having a backup of the eleventh data block is invalidated.

[0125] In an embodiment of the present application, the operation data block corresponding to the first replacement request operation in the multi-level cache storage system can be marked as the eleventh data block. In this scenario, the status of the eleventh data block recorded in the cache directory can be obtained and marked as the target status of the eleventh data block.

[0126] In some implementations, the directory status of the eleventh data block in the cache directory can be a valid-clean state. In this scenario, the secondary private cache on the processor core that has the backup data block of the eleventh data block in the multi-level cache storage system can be obtained, and the backup data blocks stored in each of the secondary private caches can be invalidated.

[0127] Optionally, in response to the directory status being valid and dirty, invalidation processing is performed on the backup data block in the secondary private cache of the non-owner node that has the backup of the eleventh data block.

[0128] In an embodiment of the present application, when the directory status indicates that the eleventh data block is in a valid-dirty state, it is necessary to obtain a partial secondary private cache of a non-owner node from a partial secondary private cache that has a backup of the eleventh data block, and invalidate the backup data blocks in the partial secondary private cache.

[0129] Optionally, in response to the directory status being valid and dirty, an invalidation and write-back request is sent to the third exclusive processor core or owner node of the eleventh data block.

[0130] In an embodiment of the present application, the processor core that exclusively owns the eleventh data block can be marked as the third exclusive processor core. Optionally, when the directory status indicates that the eleventh data block is in a valid-dirty state, an invalidation and write-back request can be sent to the third exclusive processor core or the owner node of the eleventh data block to invalidate and write-back the corresponding data block.

[0131] The method of the multi-level cache storage system proposed in the present application determines the target write-back area according to the replacement area to perform replacement write-back on the first data block, thereby realizing consistency maintenance of the multi-level cache storage system, and realizing replacement write-back of the first data block based on the first replacement request operation. The data block can be replaced and written back to a different target write-back area without waiting for specific conditions to be met, thereby improving the flexibility of replacement write-back of the data block and optimizing the access method of the multi-level cache storage system.

[0132] Corresponding to the access method of the multi-level cache storage system proposed in the above-mentioned embodiments, an embodiment of the present application also proposes an access device for a multi-level cache storage system. Since the access device for the multi-level cache storage system proposed in the embodiment of the present application corresponds to the access method for the multi-level cache storage system proposed in the above-mentioned embodiments, the implementation method of the above-mentioned multi-level cache storage system is also applicable to the access device for the multi-level cache storage system proposed in the embodiment of the present application, and will not be described in detail in the following embodiments.

[0133] Figure 4 FIG. 1 is a schematic diagram of a structure of an access device of a multi-level cache storage system according to an embodiment of the present application. Figure 4 As shown, the access device 400 of the multi-level cache storage system includes an acquisition module 41, a determination module 42 and a replacement write-back module 43, wherein:

[0134] An acquisition module 41 is used to acquire a target request operation of a multi-level cache storage system;

[0135] A determination module 42, configured to obtain a replacement area of ​​the first replacement request operation in the multi-level cache storage system in response to the target request operation being a first replacement request operation, so as to determine a target write-back area of ​​the first replacement request operation in the multi-level cache storage system;

[0136] The replacement write-back module 43 is used to obtain the first data block in the replacement area of ​​the first replacement request operation, and replace and write the first data block back to the target write-back area.

[0137] In an embodiment of the present application, the replacement write-back module 43 is also used to: in response to the replacement area being a first-level private cache in a multi-level cache storage system, determine that the second-level private cache corresponding to the first-level private cache is the target write-back area for the first replacement request operation in the multi-level cache storage system; in response to the replacement area being a second-level private cache in the multi-level cache storage system, determine that the shared cache and / or memory is the target write-back area for the first replacement request operation in the multi-level cache storage system.

[0138] In an embodiment of the present application, the replacement write-back module 43 is also used to: in response to the replacement area being a first-level private cache and the target write-back area being a second-level private cache, obtain the second data block in the first-level private cache of the first replacement request operation, and use the second data block as the first data block; generate a second replacement request operation for the second-level private cache, and replace and write the first data block back to the second-level private cache based on the second replacement request operation.

[0139] In the embodiment of the present application, the replacement write-back module 43 is further used to: modify the write status bit and the inclusion bit vector bit of the first data block in the secondary private cache, and perform a replacement write-back response to the processor core corresponding to the first replacement request operation.

[0140] In an embodiment of the present application, the replacement write-back module 43 is also used to: in response to the replacement area being a secondary private cache, obtain the third data block in the secondary private cache for the first replacement request operation, and use the third data block as the first data block; obtain the first data block status of the first data block in the secondary private cache; and write the first data block replacement back to the target write-back area according to the first data block status.

[0141] In an embodiment of the present application, the replacement write-back module 43 is also used to: in response to the absence of a fourth data block associated with the first data block in the shared cache, and the first data block status indicates that the first data block is in a shared state, determine that the shared cache is a target write-back area, and replace the first data block with the shared cache; in response to the absence of a fourth data block associated with the first data block in the shared cache, and the first data block status indicates that the first data block is in an exclusive state, determine that the memory is a target write-back area, and replace the first data block with the memory.

[0142] In the embodiment of the present application, the replacement write-back module 43 is further used to: in response to the first data block having an associated fourth data block in the shared cache, replace the first data block and write it back to the shared cache.

[0143] In an embodiment of the present application, the replacement write-back module 43 is also used for: in response to the existence of corresponding data block directory information for the first data block in the cache directory of the multi-level cache storage system, and the absence of the fourth data block in the shared cache, replacing the first data block with a target write-back area according to the first data block status; in response to the first data block status being a shared status, replacing the first data block with a shared cache; in response to the first data block status being an exclusive status, replacing the first data block with a memory.

[0144] In the embodiment of the present application, the replacement write-back module 43 is further used to: in response to the first data block being replaced and written back to the shared cache, modify the state information and the identification bit information of the data block directory information.

[0145] In the embodiment of the present application, the replacement write-back module 43 is further used for: the target write-back area to perform a replacement write-back response to the secondary private cache.

[0146] In an embodiment of the present application, the device also includes an invalidation module, which is used to: in response to the target request operation being an invalidation request operation, obtain the second data block status of the fifth data block in the second-level private cache of the invalidation request operation, and obtain the sixth data block in the first-level private cache corresponding to the second-level private cache of the invalidation request operation, wherein the invalidation request operation is a request operation sent by the cache directory to the second-level private cache; in response to the second data block status being a shared state and identifying that the sixth data block exists in the first-level private cache, invalidate the sixth data block; in response to the first-level private cache making a first invalidation response of the sixth data block to the second-level private cache, invalidate the fifth data block, and make a second invalidation response of the fifth data block and the sixth data block to the cache directory.

[0147] In an embodiment of the present application, the invalidation module is also used to: in response to the target request operation being an invalidation request operation, and the sixth data block is in a shared state in the first-level private cache, and the fifth data block and the sixth data block are in a maintenance inclusion relationship, invalidate the sixth data block.

[0148] In the embodiment of the present application, the invalidation module is further used to: in response to the target request operation being an invalid request operation and the sixth data block being in a shared state, perform invalidation processing on the sixth data block.

[0149] In an embodiment of the present application, the device also includes a write-back module, which is used to: in response to the target request operation being a write-back request operation, identify whether the seventh data block in the secondary private cache of the write-back request operation is in an exclusive state, and identify whether there is an associated eighth data block in the primary private cache corresponding to the secondary private cache of the write-back request operation, wherein the write-back request operation is a request operation sent by the cache directory to the secondary private cache; in response to the write-back request operation, there is an associated eighth data block in the primary private cache, write the eighth data block back to the secondary private cache, and adjust the eighth data block to a shared state; in response to identifying that the seventh data block is in an exclusive state, after the eighth data block is written back to the secondary private cache, adjust the seventh data block to a shared state, and perform a write-back response corresponding to the write-back request operation to the cache directory.

[0150] In an embodiment of the present application, the write back module is also used for: in response to the target request operation being a write back request operation, and the eighth data block is in an exclusive state in the first-level private cache, the second-level private cache sends a write back response to the first exclusive processor core, wherein the first exclusive processor core is the processor core that exclusively occupies the backup data block corresponding to the eighth data block.

[0151] In an embodiment of the present application, the write back module is also used to: in response to the target request operation being a write back request operation, and the eighth data block being in an exclusive state in the first-level private cache, adjust the eighth data block to a shared state, and write the eighth data block back to the second-level private cache.

[0152] In the embodiment of the present application, the write-back module is further used to: mark the secondary private cache as the owner node of the seventh data block.

[0153] In an embodiment of the present application, the device also includes an invalidation and write-back module, which is used to: in response to the target request operation being an invalidation and write-back request operation, identify whether the ninth data block in the second-level private cache of the invalidation and write-back request operation is in an exclusive state, and identify whether there is an associated tenth data block in the first-level private cache corresponding to the second-level private cache of the invalidation and write-back request operation, wherein the invalidation and write-back request operation is a request operation sent by the cache directory to the second-level private cache; in response to the invalidation and write-back request operation having an associated tenth data block in the first-level private cache, invalidate the tenth data block and write the tenth data block back to the second-level private cache; in response to identifying that the ninth data block is in an exclusive state, after the tenth data block is written back to the second-level private cache, invalidate and write-back the ninth data block, and send an invalidation and write-back response corresponding to the invalidation and write-back request operation to the cache directory.

[0154] In an embodiment of the present application, the invalidation and write-back module is also used for: in response to the target request operation being an invalidation and write-back request operation, and the tenth data block is in an exclusive state, the secondary private cache sends an invalidation and write-back request operation to the corresponding second exclusive processor core, wherein the second exclusive processor core is a processor core that exclusively owns the backup data block of the tenth data block, and the ninth data block is obtained based on the replacement of the tenth data block in the secondary private cache, and the ninth data block is in a maintenance inclusion relationship with the tenth data block.

[0155] In an embodiment of the present application, the invalidation and write-back module is also used to: in response to the target request operation being an invalidation and write-back request operation, and the tenth data block is in an exclusive state, invalidate the tenth data block, and send a corresponding write-back response to the secondary private cache to write the tenth data block back to the secondary private cache.

[0156] In an embodiment of the present application, the invalidation and write-back module is also used to: obtain the first directory status of the eleventh data block corresponding to the first replacement request operation in the cache directory; in response to the directory status being valid and clean, invalidate the backup data block in the secondary private cache that has a backup of the eleventh data block; in response to the directory status being valid and dirty, invalidate the backup data block in the secondary private cache that has a backup of the eleventh data block and is a non-owner node.

[0157] In the embodiment of the present application, the invalidation and write-back module is further used to: in response to the directory status being valid and dirty, send an invalidation and write-back request to the third exclusive processor core or owner node of the eleventh data block.

[0158] The device of the multi-level cache storage system proposed in the present application, when the target request operation is the first replacement request operation, obtains the replacement area and the target write-back area corresponding to the first replacement request operation, performs replacement processing on the first data block in the replacement area, and writes the first data block back to the target write-back area. In the present application, the target write-back area is determined according to the replacement area to replace and write back the first data block, thereby realizing the consistency maintenance of the multi-level cache storage system, realizing the replacement write-back of the first data block based on the first replacement request operation, and replacing and writing back the data block to different target write-back areas without waiting for specific conditions to be met, thereby improving the flexibility of replacing and writing back the data block, and optimizing the access method of the multi-level cache storage system.

[0159] In order to implement the above embodiment, the present application embodiment also proposes an electronic device 500, such as Figure 5 As shown, the electronic device 500 may specifically include: a memory 51, a processor 52, and a computer program stored in the memory 51 and executable on the processor 52. When the processor 52 executes the program, it implements the access method of the multi-level cache storage system shown in the above embodiment.

[0160] In order to implement the above embodiment, the embodiment of the present application also proposes a computer-readable storage medium, on which a computer program is stored. The program is executed by a processor to implement the access method of the multi-level cache storage system shown in the above embodiment.

[0161] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0162] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0163] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for accessing a multi-level cache storage system, characterized in that: The method comprises: Obtain target request operation of a multi-level cache storage system; In response to the target request operation being a first replacement request operation, obtaining a replacement area of ​​the first replacement request operation in the multi-level cache storage system to determine a target write-back area of ​​the first replacement request operation in the multi-level cache storage system; Acquire the first data block in the replacement area operated by the first replacement request, and replace and write the first data block back to the target write-back area; In response to the target request operation being a first replacement request operation, obtaining a replacement area in the multi-level cache storage system for the first replacement request operation to determine a target write-back area for the first replacement request operation in the multi-level cache storage system, including: in response to the replacement area being a first-level private cache in the multi-level cache storage system, determining that a second-level private cache corresponding to the first-level private cache is the target write-back area for the first replacement request operation in the multi-level cache storage system; in response to the replacement area being the second-level private cache in the multi-level cache storage system, determining that a shared cache and / or a memory is the target write-back area for the first replacement request operation in the multi-level cache storage system; Acquiring the first data block in the replacement area by the first replacement request operation, and replacing and writing the first data block back to the target write-back area, including: in response to the replacement area being the first-level private cache and the target write-back area being the second-level private cache, acquiring the second data block in the first-level private cache by the first replacement request operation, and using the second data block as the first data block; generating a second replacement request operation for the second-level private cache, and replacing and writing the first data block back to the second-level private cache based on the second replacement request operation; Obtaining the first data block in the replacement area for the first replacement request operation, and replacing and writing the first data block back to the target write-back area, also includes: in response to the replacement area being the secondary private cache, obtaining the third data block in the secondary private cache for the first replacement request operation, and using the third data block as the first data block; obtaining the first data block status of the first data block in the secondary private cache, and replacing and writing the first data block back to the target write-back area based on the first data block status.

2. The method according to claim 1, characterized in that The method further comprises: The write status bit and the inclusion bit vector bit of the first data block in the secondary private cache are modified, and a replacement write-back response is performed to the processor core corresponding to the first replacement request operation.

3. The method according to claim 1, characterized in that The step of replacing and writing the first data block back to the target write-back area according to the state of the first data block includes: In response to the fourth data block associated with the first data block not existing in the shared cache, and the first data block state indicating that the first data block is in a shared state, determining the shared cache as the target write-back area, and replacing and writing the first data block back to the shared cache; In response to the fourth data block associated with the first data block not existing in the shared cache and the first data block state indicating that the first data block is in an exclusive state, the memory is determined to be the target write-back area, and the first data block is replaced and written back to the memory.

4. The method according to claim 3, characterized in that The method further comprises: In response to the fourth data block associated with the first data block existing in the shared cache, the first data block is replaced and written back to the shared cache.

5. The method according to claim 1, characterized in that The step of replacing and writing the first data block back to the target write-back area according to the state of the first data block includes: In response to the presence of corresponding data block directory information for the first data block in the cache directory of the multi-level cache storage system and the absence of a fourth data block in the shared cache, replacing and writing the first data block back to the target write-back area according to the state of the first data block; In response to the state of the first data block being a shared state, replacing and writing the first data block back to the shared cache; In response to the state of the first data block being an exclusive state, the first data block is replaced and written back to the memory.

6. The method according to claim 5, characterized in that The method further comprises: In response to the first data block being replaced and written back to the shared cache, the state information and the flag bit information of the data block directory information are modified.

7. The method according to claim 5, characterized in that After the first data block is replaced and written back to the target write-back area according to the state of the first data block, the method includes: The target write-back area performs a replacement write-back response to the secondary private cache.

8. The method according to claim 1, characterized in that The method further comprises: In response to the target request operation being an invalidation request operation, obtaining a second data block state of a fifth data block in the secondary private cache for the invalidation request operation, and obtaining a sixth data block in the primary private cache corresponding to the secondary private cache for the invalidation request operation, wherein the invalidation request operation is a request operation sent by a cache directory to the secondary private cache; In response to the second data block being in a shared state and recognizing that the sixth data block exists in the first-level private cache, invalidating the sixth data block; In response to the first-level private cache making a first invalidation response to the second-level private cache for the sixth data block, the fifth data block is invalidated, and a second invalidation response to the fifth data block and the sixth data block is made to the cache directory.

9. The method according to claim 1, characterized in that: The method further comprises: In response to the target request operation being an invalidation request operation, the sixth data block is in a shared state in the first-level private cache, and the fifth data block and the sixth data block are in a maintenance inclusion relationship, the sixth data block is invalidated.

10. The method according to claim 1, characterized in that The method further comprises: In response to the target request operation being an invalid request operation and the sixth data block being in a shared state, invalidation processing is performed on the sixth data block.

11. The method according to claim 1, characterized in that: The method further comprises: In response to the target request operation being a write-back request operation, identifying whether the seventh data block in the secondary private cache of the write-back request operation is in an exclusive state, and identifying whether there is an associated eighth data block in the primary private cache corresponding to the secondary private cache of the write-back request operation, wherein the write-back request operation is a request operation sent by a cache directory to the secondary private cache; In response to the write-back request operation, the eighth data block associated with the first-level private cache is written back to the second-level private cache, and the eighth data block is adjusted to a shared state; In response to identifying that the seventh data block is in the exclusive state, after the eighth data block is written back to the secondary private cache, the seventh data block is adjusted to a shared state, and a write-back response corresponding to the write-back request operation is performed to the cache directory.

12. The method according to claim 1, characterized in that The method further comprises: In response to the target request operation being a write-back request operation and the eighth data block being in an exclusive state in the first-level private cache, the second-level private cache sends a write-back response to the first exclusive processor core, wherein the first exclusive processor core is the processor core that exclusively owns the backup data block corresponding to the eighth data block.

13. The method according to claim 1, characterized in that The method further comprises: In response to the target request operation being a write-back request operation and the eighth data block being in an exclusive state in the first-level private cache, adjusting the eighth data block to a shared state, and writing the eighth data block back to the second-level private cache.

14. The method according to claim 11, characterized in that The method further comprises: The secondary private cache is marked as the owner node of the seventh data block.

15. The method according to claim 1, characterized in that The method further comprises: In response to the target request operation being an invalidation and write-back request operation, identifying whether a ninth data block in the second-level private cache of the invalidation and write-back request operation is in an exclusive state, and identifying whether there is an associated tenth data block in the first-level private cache corresponding to the second-level private cache of the invalidation and write-back request operation, wherein the invalidation and write-back request operation is a request operation sent by a cache directory to the second-level private cache; In response to the invalidation and write-back request operation, the tenth data block associated with the first-level private cache is invalidated, and the tenth data block is written back to the second-level private cache; In response to identifying that the ninth data block is in an exclusive state, after the tenth data block is written back to the secondary private cache, the ninth data block is invalidated and written back, and an invalidation and write-back response corresponding to the invalidation and write-back request operation is sent to the cache directory.

16. The method according to claim 1, characterized in that The method further comprises: In response to the target request operation being an invalidation and write-back request operation, and the tenth data block being in an exclusive state, the secondary private cache sends an invalidation and write-back request operation to the corresponding second exclusive processor core, wherein the second exclusive processor core is a processor core that exclusively occupies the backup data block of the tenth data block, and the ninth data block is obtained based on the replacement of the tenth data block in the secondary private cache, and the ninth data block is in a maintenance inclusion relationship with the tenth data block.

17. The method according to claim 1, characterized in that The method further comprises: In response to the target request operation being an invalidation and write-back request operation and the tenth data block being in an exclusive state, the tenth data block is invalidated and a corresponding write-back response is sent to the secondary private cache to write the tenth data block back to the secondary private cache.

18. The method according to claim 1, characterized in that The method further comprises: Obtaining a directory status of an eleventh data block corresponding to the first replacement request operation in a cache directory; In response to the directory status being valid and clean, invalidating a backup data block in a secondary private cache that has a backup of the eleventh data block; In response to the directory status being valid and dirty, invalidation processing is performed on the backup data block in the secondary private cache of the non-owner node that owns the backup of the eleventh data block.

19. The method according to claim 18, characterized in that The method further comprises: In response to the directory status being valid and dirty, an invalidation and write-back request is sent to the third exclusive processor core or owner node of the eleventh data block.

20. An access device for a multi-level cache storage system, characterized in that: The device comprises: An acquisition module, used for acquiring a target request operation of a multi-level cache storage system; a determination module, configured to obtain, in response to the target request operation being a first replacement request operation, a replacement area of ​​the first replacement request operation in the multi-level cache storage system, so as to determine a target write-back area of ​​the first replacement request operation in the multi-level cache storage system; A replacement write-back module, configured to obtain a first data block in the replacement area by the first replacement request operation, and replace and write the first data block back to the target write-back area; In response to the target request operation being a first replacement request operation, obtaining a replacement area in the multi-level cache storage system for the first replacement request operation to determine a target write-back area for the first replacement request operation in the multi-level cache storage system, including: in response to the replacement area being a first-level private cache in the multi-level cache storage system, determining that a second-level private cache corresponding to the first-level private cache is the target write-back area for the first replacement request operation in the multi-level cache storage system; in response to the replacement area being the second-level private cache in the multi-level cache storage system, determining that a shared cache and / or a memory is the target write-back area for the first replacement request operation in the multi-level cache storage system; Acquiring the first data block in the replacement area by the first replacement request operation, and replacing and writing the first data block back to the target write-back area, including: in response to the replacement area being the first-level private cache and the target write-back area being the second-level private cache, acquiring the second data block in the first-level private cache by the first replacement request operation, and using the second data block as the first data block; generating a second replacement request operation for the second-level private cache, and replacing and writing the first data block back to the second-level private cache based on the second replacement request operation; Obtaining the first data block in the replacement area for the first replacement request operation, and replacing and writing the first data block back to the target write-back area, also includes: in response to the replacement area being the secondary private cache, obtaining the third data block in the secondary private cache for the first replacement request operation, and using the third data block as the first data block; obtaining the first data block status of the first data block in the secondary private cache, and replacing and writing the first data block back to the target write-back area based on the first data block status.

21. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 19 is implemented.

22. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 19 is implemented.

Citation Information

Patent Citations

  • Cache consistency detection system and method

    CN109213641A

  • Data processing method and device, electronic equipment and storage medium

    CN117707999A