Memory system, control method and chip

By introducing a bus controller into the storage system and switching the states of the storage controller and the memory storage controller, the first storage space is used as the last-level cache, which solves the problem of low memory access efficiency in multi-core systems and achieves more efficient memory access.

CN118939585APending Publication Date: 2024-11-12BEIJING SEMIDRIVE TECHNOLOGY LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410983330.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In multi-core systems, when multiple processing cores access memory simultaneously, the load becomes high, exceeding the optimization range of queues and caches, resulting in reduced memory access efficiency.

Method used

By introducing a bus controller into the storage system, in response to mode switching instructions, the connection or disconnection between the first storage controller and the memory storage controller is set, and the first storage space is used as the last-level cache to receive access requests from the processing core.

Benefits of technology

It improves the efficiency of accessing memory storage space, and by using the first storage space as the last-level cache, it receives access requests from multiple processing cores, thereby improving the stability and flexibility of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939585A_ABST
    Figure CN118939585A_ABST
Patent Text Reader

Abstract

The invention discloses a storage system, a control method and a chip, and the storage system comprises a bus controller of a bus, a first storage space provided with a first storage controller, and a memory storage space provided with a memory storage controller. The first storage controller and the memory storage controller are set to be in a connected state through the bus controller, and when an access request of at least one processing core to the memory storage space is received from the bus, the first storage space is used as a last-stage cache, and access to the memory storage space is achieved. The first storage space can be set as the last-stage cache of the memory storage space, and the access requests of the plurality of processing cores to the memory storage space are received through the first storage space, so that the access efficiency of the memory storage space is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data storage, and in particular to a storage system, a control method and a chip. Background Art

[0002] Currently, cache is usually used to improve the performance of storage systems. Common caches include L1 (first level cache), L2 (second level cache), and L3 (third level cache), which are used to provide different levels of storage performance optimization. However, in a system with multiple processing cores, when multiple cores access the memory at the same time, due to the interweaving of multiple accesses, when the load is high, the queue and cache optimization range is exceeded, which leads to a significant reduction in the efficiency of memory access. Summary of the invention

[0003] An embodiment of the present application provides a storage system, a control method and a chip. The storage system includes a bus controller of a bus, a first storage space provided with a first storage controller and a memory storage space provided with a memory storage controller. The first storage space can be used as a last-level cache to improve the access efficiency to the memory storage space.

[0004] In a first aspect, a storage system is provided, comprising a bus controller of a bus, a first storage space provided with a first storage controller, and a memory storage space provided with a memory storage controller, wherein the first storage controller and the memory storage controller are connected to the bus, and the bus is also connected to a plurality of processing cores, and the bus controller is used to: in response to a mode switching instruction, set the first storage controller and the memory storage controller to a connected state or a disconnected state; when the first storage controller and the memory storage controller are set to a connected state, if an access request to the memory storage space is received from at least one of the processing cores on the bus, the access request is sent to the first storage controller, so that the first storage controller uses the first storage space as a last-level cache to access the memory storage space.

[0005] In a second aspect, a control method for a storage system is provided, wherein the storage system includes a bus controller of a bus, a first storage space provided with a first storage controller, and a memory storage space provided with a memory storage controller, wherein the first storage controller and the memory storage controller are connected to the bus, and the bus is also connected to multiple processing cores, and the method includes: in response to a mode switching instruction, using the bus controller to set the first storage controller and the memory storage controller to a connected state or a disconnected state; when the first storage controller and the memory storage controller are set to a connected state, if an access request to the memory storage space is received from at least one of the processing cores on the bus, using the bus controller to send the access request to the first storage controller, so that the first storage controller uses the first storage space as a last-level cache to access the memory storage space.

[0006] In a third aspect, a chip is provided, comprising a bus, a plurality of processing cores connected to the bus, and the storage system as described in the first aspect.

[0007] By applying the above technical solution, the storage system includes a bus controller of a bus, a first storage space provided with a first storage controller, and a memory storage space provided with a memory storage controller. The first storage controller and the memory storage controller are connected through the bus controller. When an access request to the memory storage space is received from at least one processing core on the bus, the first storage space is used as a last-level cache to implement access to the memory storage space. Since the first storage space can be set as the last-level cache of the memory storage space, access requests to the memory storage space from multiple processing cores are received through the first storage space, thereby improving the access efficiency to the memory storage space. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0009] Figure 1 A schematic diagram of the structure of a storage system according to an embodiment of the present application;

[0010] Figure 2 A schematic diagram of placing a first storage controller and a memory storage controller in a connected state according to an embodiment of the present application;

[0011] Figure 3 A schematic diagram of setting a first storage controller and a memory storage controller to a disconnected state according to an embodiment of the present application;

[0012] Figure 4 A schematic diagram of a first storage space and a memory storage space according to an embodiment of the present application;

[0013] Figure 5 A flowchart of a method for controlling a storage system according to an embodiment of the present application;

[0014] Figure 6 This is a structural block diagram of the chip according to an embodiment of the present application.

[0015] Figure 1-Figure 3 In the figure, 10, bus; 11, bus controller; 20, first storage space; 21, first storage controller; 30, memory storage space; 31, memory storage controller; 40, processing core; 50, first path; 60, second path; 70, third path. DETAILED DESCRIPTION

[0016] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0017] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of the embodiments. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0018] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0019] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0020] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.

[0021] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0022] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0023] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0024] A storage system according to an embodiment of the present application can set the first storage space as the last-level cache of the memory storage space, and receive access requests to the memory storage space from multiple processing cores through the first storage space, thereby improving the access efficiency to the memory storage space.

[0025] like Figure 1 As shown, the storage system includes a bus controller 11 of a bus 10, a first storage space 20 provided with a first storage controller 21, and a memory storage space 30 provided with a memory storage controller 31. The first storage controller 21 and the memory storage controller 31 are connected to the bus 10. The bus 10 is also connected to a plurality of processing cores 40. The bus controller 11 is used to:

[0026] In response to the mode switching instruction, the first storage controller 21 and the memory storage controller 31 are set to a connected state or a disconnected state;

[0027] When the first storage controller 21 and the memory storage controller 31 are set to a connected state, if an access request to the memory storage space 30 is received from at least one processing core 40 on the bus 10, the access request is sent to the first storage controller 21, so that the first storage controller 21 uses the first storage space 20 as the last-level cache to access the memory storage space 30.

[0028] In this embodiment, the storage system includes a bus controller 11 of a bus 10, a first storage space 20 provided with a first storage controller 21, and a memory storage space 30 provided with a memory storage controller 31. Optionally, the bus controller 11, the first storage controller 21, the memory storage controller 31 and the bus 10 can communicate through an AXI (Advanced eXtensible Interface) protocol, a CHI (Coherent Hub Interface) protocol, or other private protocols.

[0029] The bus 10 also connects a plurality of processing cores 40 ( Figure 1 “Processing core×N” in the figure represents N processing cores, where N is a positive integer not less than 2), each processing core 40 can send an access request to the memory storage space 30 through the bus 10, wherein the processing core 40 is also called a processor core, which is a physical computing unit in the processor, for example, it can be a CPU (Central Processing Unit), a GPU (graphics processing unit), an NPU (Neural Processing Units), etc., and each processing core 40 connected to the bus 10 can be one processing core 40 or multiple processing cores 40.

[0030] The first storage controller 21 and the memory storage controller 31 may be in a connected state or a disconnected state. The bus controller 11 may set the first storage controller 21 and the memory storage controller 31 to a connected state or a disconnected state in response to the mode switching instruction. When the first storage controller 21 and the memory storage controller 31 are set to a connected state, the first storage space 20 is the last level cache of the memory storage space 30. The last level cache is also called LLC (Last Level Cache), which is the last layer in the cache hierarchy and is used to cache data in the memory to avoid accessing from the memory every time the data is needed, thereby improving the speed of data access.

[0031] For example, if the memory storage space 30 already has a first-level cache, a second-level cache, and a third-level cache, and the first storage controller 21 and the memory storage controller 31 are connected, the first storage space 20 is the fourth-level cache of the memory storage space 30. If the memory storage space 30 already has a first-level cache and a second-level cache, and the first storage controller 21 and the memory storage controller 31 are connected, the first storage space 20 is the third-level cache of the memory storage space 30.

[0032] If an access request to the memory storage space 30 is received from at least one processing core 40 on the bus 10, the bus controller 11 sends the access request to the first storage controller 21, and the first storage controller 21 uses the first storage space 20 as a final-level cache to access the memory storage space 30. The access request may be sent to the bus 10 via an original final-level cache different from the first storage space 20, or may be sent to the bus 10 directly by the processing core 40.

[0033] It should be noted that, since the first storage space 20 is provided with the first storage controller 21, if the memory storage space 30 itself is configured with a final-level cache, the first storage space 20 is different from the final-level cache configured by the memory storage space 30 itself. In some embodiments of the present application, when the memory storage space 30 itself is configured with a final-level cache, the capacity of the first storage space 20 is greater than the final-level cache configured by the memory storage space 30 itself, so that when the first storage space 20 is used as a final-level cache, the cache hit rate can be improved.

[0034] In order to ensure system stability, the bus controller 11 of the embodiment of the present application receives a mode switching instruction and sets the first storage controller 21 and the memory storage controller 31 to a connected state or a disconnected state when the electronic device corresponding to the storage system is turned on or restarted. Alternatively, the mode switching instruction takes effect when the electronic device corresponding to the storage system is turned on or restarted.

[0035] The storage system of the embodiment of the present application includes a bus controller 11 of a bus 10, a first storage space 20 provided with a first storage controller 21, and a memory storage space 30 provided with a memory storage controller 31. The first storage controller 21 and the memory storage controller 31 are set to be connected through the bus controller 11. When an access request to the memory storage space 30 is received from at least one processing core 40 on the bus 10, the first storage space 20 is used as a last-level cache to implement access to the memory storage space 30. Since the first storage space 20 can be set as the last-level cache of the memory storage space 30, the access requests to the memory storage space 30 from multiple processing cores 40 are received through the first storage space 20, thereby improving the access efficiency to the memory storage space 30.

[0036] In some embodiments of the present application, Figure 1 As shown, the first storage controller 21 is connected to the bus 10 through the first path 50, the memory storage controller 31 is connected to the bus 10 through the second path 60, the first storage controller 21 is connected to the memory storage controller 31 through the third path 70, the first path 50, the second path 60 and the third path 70 are connected to the bus controller 11, the mode switching instruction is the first mode switching instruction or the second mode switching instruction, and the bus controller 11 is specifically used for:

[0037] In response to the first mode switching instruction, the first storage controller 21 and the memory storage controller 31 are placed in a connected state by closing the second path 60 and opening the third path 70; or,

[0038] In response to the second mode switching instruction, the first storage controller 21 and the memory storage controller 31 are set to a disconnected state by closing the third path 70 and opening the second path 60 .

[0039] In this embodiment, the first mode switching instruction and the second mode switching instruction may be issued by a user, an application, or other electronic devices. The bus controller 11 operates the second path 60 and the third path 70 to realize the connection state or disconnection state between the first storage controller 21 and the memory storage controller 31.

[0040] Specifically, the bus controller 11 responds to the first mode switching instruction by closing the second path 60 and opening the third path 70, so as to connect the first storage controller 21 and the memory storage controller 31. Figure 2 As shown in FIG. 1 , the cross in the second path 60 indicates that the second path 60 has been closed. At this time, the first storage space 20 is the last-level cache of the memory storage space 30, and all access requests to the memory storage space 30 first reach the first storage space 20. The bus controller 11 responds to the second mode switching instruction by closing the third path 70 and opening the second path 60, thereby setting the first storage controller 21 and the memory storage controller 31 to a disconnected state. Figure 3 As shown, the cross in the third path 70 indicates that the third path 70 is closed. At this time, the first storage space 20 is an independent storage space, and the access request can be sent to the first storage space 20 or the memory storage space 30 according to the address in the access request.

[0041] By changing the states of the second path 60 and the third path 70 , the first storage controller 21 and the memory storage controller 31 can be reliably placed in a connected state or a disconnected state.

[0042] In some embodiments of the present application, the bus controller 11 is further used to: after closing the second path 60 and opening the third path 70, send the target data in the memory storage space 30 to the first storage space 20 through the memory storage controller 31, so that the first storage space 20 becomes the last-level cache. The target data may be data in the memory storage space 30 whose access frequency is higher than the target frequency.

[0043] In some embodiments of the present application, the bus controller 11 is also used for:

[0044] Before closing the second path 60 and opening the third path 70 , the data in the first storage space 20 is cleared through the first storage controller 21 according to the data clearing instruction of the target application.

[0045] In this embodiment, the target application may be an application that issues a first mode switching instruction. Before closing the second path 60 and opening the third path 70, the first storage space 20 is an independent storage space, in which data may be stored. The target application data may issue a clear instruction to the bus controller 11, so that the bus controller 11 clears the data in the first storage space 20 through the first storage controller 21, thereby realizing the use of the cleared first storage space 20 as the last-level cache, which can meet the cache requirements of the corresponding application.

[0046] Optionally, the data clearing instruction may also be issued by the user.

[0047] Optionally, as an alternative, before closing the second path 60 and opening the third path 70, if the amount of data in the first storage space is higher than the preset amount of data, the first storage controller 21 clears the data in the first storage space 20 or deletes part of the data in the first storage space 20. By clearing the data in the first storage space 20 or deleting part of the data when the amount of data in the first storage space is higher than the preset amount of data, it can be ensured that the first storage space 20 has sufficient cache capacity, wherein before clearing the data in the first storage space 20 or deleting part of the data in the first storage space 20 by the first storage controller 21, a prompt message can be issued to remind the user whether to clear the first storage space 20 or delete part of the data. It can be understood that if the amount of data in the first storage space is not higher than the preset amount of data, the data in the first storage space 20 will not be cleared.

[0048] It is understandable that before closing the second path 60 and opening the third path 70 , if the bus controller 11 does not receive a data clearing instruction, the first storage controller 21 and the memory storage controller 31 are directly set to a connected state.

[0049] In some embodiments of the present application, the bus controller 11 is also used for:

[0050] Before closing the third path 70 and opening the second path 60 , the data in the first storage space 20 is migrated to the memory storage space 30 through the first storage controller 21 .

[0051] In this embodiment, before closing the third path 70 and opening the second path 60, the first storage space 20 is a last-level cache, which still stores part of the data of the memory storage space 30. By migrating the data in the first storage space 20 to the memory storage space 30, the integrity of the data in the memory storage space 30 is ensured after the first storage controller 21 and the memory storage controller 31 are placed in a disconnected state.

[0052] In some embodiments of the present application, the first storage controller 21 is specifically used for:

[0053] In the case where the first storage controller 21 and the memory storage controller 31 are in a connected state, after receiving an access request, determining whether the first storage space 20 has a cache hit;

[0054] If the first storage space 20 cache hits, an access operation corresponding to the access request is performed on the first storage space 20;

[0055] If the first storage space 20 is not cached, the access request is sent to the memory storage controller 31 , so that the memory storage controller 31 performs an access operation on the memory storage space 30 .

[0056] In this embodiment, when the first storage controller 21 and the memory storage controller 31 are connected, the first storage space 20 is a final-level cache, in which the most commonly used data in the memory storage space 30 is stored. After sending the access request to the first storage controller 21, the first storage controller 21 determines whether the first storage space 20 is cached. If the cache hits, it means that the corresponding data exists in the first storage space 20, and the access operation corresponding to the access request is directly performed on the first storage space 20. If there is no cache hit, it means that the corresponding data does not exist in the first storage space 20, and the memory storage space 30 needs to be further accessed. The first storage controller 21 sends the access request to the memory storage controller 31, so that the memory storage controller 31 performs an access operation on the memory storage space 30.

[0057] Depending on whether the first storage space 20 is cache hit, a corresponding access operation is directly performed on the first storage space 20, or a corresponding access operation is performed on the memory storage space 30, so as to achieve efficient response to the access request.

[0058] In some embodiments of the present application, the first storage space 20 includes multiple first sub-areas, the memory storage space 30 includes multiple second sub-areas divided according to a preset granularity, each first sub-area corresponds to a different second sub-area, and the preset granularity includes any one of a channel, a particle, a storage library and a page table of the memory storage space 30.

[0059] In this embodiment, the memory storage space 30 may include multiple channels, each channel may include multiple particles, each particle may include multiple storage libraries (i.e., banks), and each storage library may include multiple page tables. The memory storage space 30 is divided into multiple second sub-areas according to a preset granularity, and the preset granularity includes any one of a channel, a particle, a storage library, and a page table. For example, if the preset granularity is a channel, then one second sub-area corresponds to one channel; if the preset granularity is a particle, then one second sub-area corresponds to one channel and one particle; if the preset granularity is a storage library, then one second sub-area corresponds to one channel, one particle, and one storage library. For example, Figure 4 As shown, the preset granularity is a particle, each first sub-region corresponds to each high-speed storage partition, each second sub-region corresponds to each memory particle, and each high-speed storage partition is connected to different memory particles through a third path.

[0060] The first storage space 20 is divided into multiple second sub-areas, and each first sub-area corresponds to a different second sub-area, that is, each first sub-area is connected to a different second sub-area through a third path 70. Therefore, when the first storage space 20 is used as a last-level cache, each first sub-area forms a cache queue, and different cache queues correspond to different second sub-areas in the memory storage space 30, so that access is dispersed to different second sub-areas, which can reduce page table switching and further improve the access efficiency to the memory storage space 30.

[0061] In some embodiments of the present application, the bus controller 11 is also used for:

[0062] When the first storage controller 21 and the memory storage controller 31 are set to a disconnected state, if an access request to the first storage space 20 is received from the bus 10, the access request to the first storage space 20 is sent to the first storage controller 21, and the first storage space 20 is accessed through the first storage controller 21.

[0063] In this embodiment, when the first storage controller 21 and the memory storage controller 31 are set to a disconnected state, the first storage space 20 is an independent storage space. If an access request to the first storage space 20 is received from the bus 10, the access request to the first storage space 20 is sent to the first storage controller 21, and the first storage space 20 is accessed through the first storage controller 21.

[0064] By setting the first storage controller 21 and the memory storage controller 31 to a disconnected state, the first storage space 20 is converted from a last-level cache to an independent storage space, which can increase the capacity of the high-speed storage space and improve flexibility.

[0065] In some embodiments of the present application, the bus controller 11 is also used for: when the first storage controller 21 and the memory storage controller 31 are set to a disconnected state, if an access request to the memory storage space 30 is received from the bus 10, the access request to the memory storage space 30 is sent to the memory storage controller 31, and the memory storage space 30 is accessed through the memory storage controller 31, thereby achieving direct access to the memory storage controller 31.

[0066] In some embodiments of the present application, the first storage space 20 uses any one of static random access memory, magnetoresistive random access memory, and resistive random access memory, and the memory storage space 30 uses volatile storage including dynamic random access memory.

[0067] In this embodiment, the static random access memory is SRAM (Static Random-Access Memory), the magnetoresistive random access memory is MRAM (Magnetoresistive Random Access Memory), the resistive random access memory is RRAM (Resistive Random Access Memory), and the dynamic random access memory is DRAM (Dynamic Random Access Memory). Optionally, the dynamic random access memory may include any one of DDR SDRAM, DDR2SDRAM, DDR3 SDRAM, DDR4 SDRAM, and DDR5 SDRAM.

[0068] The present application also provides a storage system control method, such as Figure 1 As shown, the storage system includes a bus controller 11 of a bus 10, a first storage space 20 provided with a first storage controller 21, and a memory storage space 30 provided with a memory storage controller 31. The first storage controller 21 and the memory storage controller 31 are connected to the bus 10, and the bus 10 is also connected to a plurality of processing cores 40, such as Figure 5 As shown, the method comprises the following steps:

[0069] Step S101, in response to a mode switching instruction, using the bus controller to set the first storage controller and the memory storage controller to a connected state or a disconnected state.

[0070] In this embodiment, the first storage controller 21 and the memory storage controller 31 may be in a connected state or a disconnected state. The bus controller 11 may connect or disconnect the first storage controller 21 and the memory storage controller 31 in response to the mode switching instruction.

[0071] Step S102, when the first storage controller and the memory storage controller are set to a connected state, if an access request to the memory storage space is received from the bus by at least one of the processing cores, the bus controller is used to send the access request to the first storage controller, so that the first storage controller uses the first storage space as a last-level cache to access the memory storage space.

[0072] In this embodiment, when the first storage controller 21 and the memory storage controller 31 are connected, the first storage space 20 is the last-level cache of the memory storage space 30. If an access request to the memory storage space 30 is received from at least one processing core 40 on the bus 10, the bus controller 11 sends the access request to the first storage controller 21, so that the first storage controller 21 uses the first storage space 20 as the last-level cache to access the memory storage space 30. The access request can be sent to the bus 10 via the original last-level cache different from the first storage space 20, or it can be sent to the bus 10 directly by the processing core 40.

[0073] The control method of the storage system of the embodiment of the present application sets the first storage controller and the memory storage controller to a connected state through a bus controller, and when receiving an access request to the memory storage space from at least one processing core on the bus, the first storage space is used as a last-level cache to implement access to the memory storage space. Since the first storage space can be set as the last-level cache of the memory storage space, the access requests to the memory storage space from multiple processing cores are received through the first storage space, thereby improving the access efficiency to the memory storage space.

[0074] In some embodiments of the present application, Figure 1 As shown, the first storage controller 21 is connected to the bus 10 through the first path 50, the memory storage controller 31 is connected to the bus 10 through the second path 60, the first storage controller 21 is connected to the memory storage controller 31 through the third path 70, the first path 50, the second path 60 and the third path 70 are connected to the bus controller 11, the mode switching instruction is the first mode switching instruction or the second mode switching instruction, and in response to the mode switching instruction, the bus controller 11 is used to set the first storage controller 21 and the memory storage controller 31 to a connected state or a disconnected state, including: in response to the first mode switching instruction, the bus controller is used to close the second path and open the third path to set the first storage controller and the memory storage controller to a connected state; or, in response to the second mode switching instruction, the bus controller is used to close the third path and open the second path to set the first storage controller and the memory storage controller to a disconnected state.

[0075] In this embodiment, the first mode switching instruction and the second mode switching instruction may be issued by a user, an application, or other electronic devices. The bus controller 11 operates the second path 60 and the third path 70 to realize the connection state or disconnection state between the first storage controller 21 and the memory storage controller 31.

[0076] Specifically, the bus controller 11 responds to the first mode switching instruction by closing the second path 60 and opening the third path 70, so as to connect the first storage controller 21 and the memory storage controller 31. Figure 2 As shown in FIG. 1 , the cross in the second path 60 indicates that the second path 60 has been closed. At this time, the first storage space 20 is the last-level cache of the memory storage space 30, and all access requests to the memory storage space 30 first reach the first storage space 20. The bus controller 11 responds to the second mode switching instruction by closing the third path 70 and opening the second path 60, thereby setting the first storage controller 21 and the memory storage controller 31 to a disconnected state. Figure 3 As shown, the cross in the third path 70 indicates that the third path 70 is closed. At this time, the first storage space 20 is an independent storage space, and the access request can be sent to the first storage space 20 or the memory storage space 30 according to the address in the access request.

[0077] By changing the states of the second path 60 and the third path 70 , the first storage controller 21 and the memory storage controller 31 can be reliably placed in a connected state or a disconnected state.

[0078] In some embodiments of the present application, after closing the second path and opening the third path, the method further includes: using the bus controller to send the target data in the memory storage space to the first storage space through the memory storage controller, so that the first storage space becomes the last-level cache. The target data may be data in the memory storage space with an access frequency higher than the target frequency.

[0079] In some embodiments of the present application, before closing the second path and opening the third path, it also includes: using a bus controller to clear data in the first storage space through the first storage controller according to a data clear instruction of a target application.

[0080] In this embodiment, the target application may be an application that issues a first mode switching instruction. Before closing the second path 60 and opening the third path 70, the first storage space 20 is an independent storage space in which data may be stored. The target application data may issue a clear instruction to the bus controller 11, so that the bus controller 11 clears the data in the first storage space 20 through the first storage controller 21, thereby realizing the use of the cleared first storage space 20 as a last-level cache to meet the needs of the corresponding application.

[0081] Optionally, the data clearing instruction may also be issued by the user.

[0082] It is understandable that before closing the second path 60 and opening the third path 70 , if the bus controller 11 does not receive a data clearing instruction, the first storage controller 21 and the memory storage controller 31 are directly set to a connected state.

[0083] In some embodiments of the present application, before closing the third path 70 and opening the second path 60, it also includes: using a bus controller to migrate data in the first storage space to the memory storage space through the first storage controller.

[0084] In this embodiment, before closing the third path 70 and opening the second path 60, the first storage space 20 is a last-level cache, which still stores part of the data of the memory storage space 30. By migrating the data in the first storage space 20 to the memory storage space 30, the integrity of the data in the memory storage space 30 is ensured after the first storage controller 21 and the memory storage controller 31 are placed in a disconnected state.

[0085] In some embodiments of the present application, the first storage controller uses the first storage space as a last-level cache to implement access to the memory storage space, including: determining, through the first storage controller, whether the first storage space is a cache hit; if the first storage space is a cache hit, performing an access operation corresponding to the access request on the first storage space through the first storage controller; if the first storage space is not a cache hit, sending the access request to the memory storage controller through the first storage controller, so that the memory storage controller performs the access operation on the memory storage space.

[0086] In this embodiment, when the first storage controller 21 and the memory storage controller 31 are connected, the first storage space 20 is a final-level cache, in which the most commonly used data in the memory storage space 30 is stored. After sending the access request to the first storage controller 21, the first storage controller 21 determines whether the first storage space 20 is cached. If the cache hits, it means that the corresponding data exists in the first storage space 20, and the access operation corresponding to the access request is directly performed on the first storage space 20. If there is no cache hit, it means that the corresponding data does not exist in the first storage space 20, and the memory storage space 30 needs to be further accessed. The first storage controller 21 sends the access request to the memory storage controller 31, so that the memory storage controller 31 performs an access operation on the memory storage space 30.

[0087] Depending on whether the first storage space 20 is cache hit, a corresponding access operation is directly performed on the first storage space 20, or a corresponding access operation is performed on the memory storage space 30, so as to achieve efficient response to the access request.

[0088] In some embodiments of the present application, the first storage space 20 includes multiple first sub-areas, the memory storage space 30 includes multiple second sub-areas divided according to a preset granularity, each first sub-area corresponds to a different second sub-area, and the preset granularity includes any one of a channel, a particle, a storage library and a page table of the memory storage space 30.

[0089] In this embodiment, the memory storage space 30 may include multiple channels, each channel may include multiple particles, each particle may include multiple storage libraries, and each storage library may include multiple page tables. The memory storage space 30 is divided into multiple second sub-areas according to a preset granularity, and the preset granularity includes any one of a channel, a particle, a storage library, and a page table. For example, if the preset granularity is a channel, one second sub-area corresponds to one channel; if the preset granularity is a particle, one second sub-area corresponds to one channel and one particle; if the preset granularity is a storage library, one second sub-area corresponds to one channel, one particle, and one storage library. Figure 4 As shown, taking the case where the preset particle size is particles as an example, each first sub-region is connected to different particles through the third passage.

[0090] The first storage space 20 is divided into multiple second sub-areas, and each first sub-area corresponds to a different second sub-area, that is, each first sub-area is connected to a different second sub-area through a third path 70. Therefore, when the first storage space 20 is used as a last-level cache, each first sub-area forms a cache queue, and different cache queues correspond to different second sub-areas in the memory storage space 30, so that access is dispersed to different second sub-areas, which can reduce page table switching and further improve the access efficiency to the memory storage space 30.

[0091] In some embodiments of the present application, it also includes: when the first storage controller and the memory storage controller are set to a disconnected state, if an access request to the first storage space is received from the bus, the bus controller is used to send the access request to the first storage space to the first storage controller, and the first storage space is accessed through the first storage controller.

[0092] In this embodiment, when the first storage controller 21 and the memory storage controller 31 are set to a disconnected state, the first storage space 20 is an independent storage space. If an access request to the first storage space 20 is received from the bus 10, the access request to the first storage space 20 is sent to the first storage controller 21, and the first storage space 20 is accessed through the first storage controller 21.

[0093] By setting the first storage controller 21 and the memory storage controller 31 to a disconnected state, the first storage space 20 is converted from a last-level cache to an independent storage space, which can increase the capacity of the high-speed storage space and improve flexibility.

[0094] The present application also provides a chip, such as Figure 6 As shown, it includes a bus, multiple processing cores connected to the bus, and the storage system in various embodiments of the present application.

[0095] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor for execution, or a combination of hardware and software modules in a processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0096] In various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0097] Those skilled in the art will appreciate that the various illustrative logical blocks (ILBs) and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0098] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0099] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. A storage system, characterized in that: A bus controller including a bus, a first storage space provided with a first storage controller, and a memory storage space provided with a memory storage controller, wherein the first storage controller and the memory storage controller are connected to the bus, the bus is also connected to a plurality of processing cores, and the bus controller is used for: In response to a mode switching instruction, the first storage controller and the memory storage controller are placed in a connected state or a disconnected state; When the first storage controller and the memory storage controller are set to a connected state, if an access request to the memory storage space is received from the bus by at least one of the processing cores, the access request is sent to the first storage controller, so that the first storage controller uses the first storage space as a last-level cache to access the memory storage space.

2. The storage system according to claim 1, characterized in that: The first storage controller is connected to the bus via a first path, the memory storage controller is connected to the bus via a second path, the first storage controller is connected to the memory storage controller via a third path, the first path, the second path and the third path are connected to the bus controller, the mode switching instruction is a first mode switching instruction or a second mode switching instruction, and the bus controller is specifically used for: In response to the first mode switching instruction, the first storage controller and the memory storage controller are placed in a connected state by closing the second path and opening the third path; or, In response to the second mode switching instruction, the first storage controller and the memory storage controller are set to a disconnected state by closing the third path and opening the second path.

3. The storage system according to claim 2, characterized in that: The bus controller is also used for: Before closing the second path and opening the third path, data in the first storage space is cleared through the first storage controller according to a data clearing instruction of a target application.

4. The storage system according to claim 2, characterized in that: The bus controller is also used for: Before closing the third path and opening the second path, data in the first storage space is migrated to the memory storage space through the first storage controller.

5. The storage system according to claim 1, wherein: The first storage controller is specifically used for: In a case where the first storage controller and the memory storage controller are in a connected state, after receiving the access request, determining whether the first storage space has a cache hit; If the first storage space cache hits, performing an access operation corresponding to the access request on the first storage space; If the first storage space does not have a cache hit, the access request is sent to the memory storage controller, so that the memory storage controller performs the access operation on the memory storage space.

6. The storage system according to claim 1, wherein: The first storage space includes multiple first sub-areas, and the memory storage space includes multiple second sub-areas divided according to a preset granularity, each of the first sub-areas corresponds to a different second sub-area, and the preset granularity includes any one of the channels, particles, storage libraries and page tables of the memory storage space.

7. The storage system according to claim 1, characterized in that: The bus controller is also used for: When the first storage controller and the memory storage controller are set to a disconnected state, if an access request to the first storage space is received from the bus, the access request to the first storage space is sent to the first storage controller, and the first storage space is accessed through the first storage controller.

8. The storage system according to any one of claims 1 to 7, characterized in that: The first storage space adopts any one of static random access memory, magnetoresistive random access memory, and resistive random access memory, and the memory storage space adopts volatile storage including dynamic random access memory.

9. A storage system control method, characterized in that: The storage system includes a bus controller of a bus, a first storage space provided with a first storage controller, and a memory storage space provided with a memory storage controller, wherein the first storage controller and the memory storage controller are connected to the bus, and the bus is also connected to a plurality of processing cores, and the method includes: In response to a mode switching instruction, using the bus controller to set the first storage controller and the memory storage controller to a connected state or a disconnected state; When the first storage controller and the memory storage controller are set to a connected state, if an access request to the memory storage space is received from the bus by at least one of the processing cores, the bus controller is used to send the access request to the first storage controller, so that the first storage controller uses the first storage space as a last-level cache to access the memory storage space.

10. A chip, characterized in that: The invention comprises a bus, a plurality of processing cores connected to the bus, and a storage system as claimed in any one of claims 1 to 8.