WO2015161804A1 - 一种Cache分区的方法及装置 - Google Patents

一种Cache分区的方法及装置 Download PDF

Info

Publication number
WO2015161804A1
WO2015161804A1 PCT/CN2015/077223 CN2015077223W WO2015161804A1 WO 2015161804 A1 WO2015161804 A1 WO 2015161804A1 CN 2015077223 W CN2015077223 W CN 2015077223W WO 2015161804 A1 WO2015161804 A1 WO 2015161804A1
Authority
WO
WIPO (PCT)
Prior art keywords
cache
physical memory
cache set
execution
target
Prior art date
Application number
PCT/CN2015/077223
Other languages
English (en)
French (fr)
Inventor
郑晨
高云伟
詹剑锋
张立新
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015161804A1 publication Critical patent/WO2015161804A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems

Definitions

  • the present invention relates to the field of electronic information technology, and in particular, to a method and an apparatus for a Cache partition.
  • the operating system allocates discontinuous physical memory for the execution entity, so that one execution entity is cached in the same Cache Set, and different Cache Sets do not. Interference occurs, so when multiple execution entities are running, there is no delay in access.
  • the operating system needs to allocate continuous physical memory to the execution entity, while continuous physical memory often spans multiple different Cache Sets, requiring continuous physics.
  • the execution entity of the memory is likely to share the same one or more Cache Sets with other execution entities. In this case, multiple execution entities still have interference in the use of the Cache, resulting in delays in access and thus reduced access. Performance.
  • An embodiment of the present invention provides a method and an apparatus for Cache partitioning, which can flexibly allocate physical memory and a Cache Set for an execution entity, reduce interference generated by multiple execution entities in the use of the Cache, and improve the memory access performance.
  • an embodiment of the present invention provides a method for a Cache partition, which is used for a host, and the host An operating system is provided, the host includes a physical memory and a cache group Cache Sets, the physical memory is used to store data, and the Cache Set is used to cache data in the physical memory; the method includes:
  • the operating system allocates physical memory to the execution entity, and the physical memory allocated to the execution entity is used to store data required for the execution entity to run;
  • the host includes a re-staining component, the re-staining component is configured to read a re-staining table, and the re-staining table is configured to record the execution entity Corresponding relationship between the physical memory and the selected Cache Set; the correspondence between the physical memory allocated to the execution entity and the selected Cache Set includes:
  • the method further includes:
  • the target Cache Set Mask corresponds to a physical memory address allocated for the execution body, according to a physical memory address allocated to the execution body;
  • the method includes:
  • the target Cache Set is determined and accessed according to the target Cache Set Mask stored in the Shadow Address Space.
  • the host further includes a memory management unit MMU, where the MMU is configured to cache a page table cache entry, the page table cache entry Included in the identifier of the execution entity; after the finding and obtaining the target Cache Set Mask, the method includes:
  • the target Cache Set Mask is obtained in the page table cache entry according to the identifier ID of the execution entity
  • the host includes a cache register; and the obtaining the re-staining table includes:
  • the re-staining table is obtained from physical memory.
  • an embodiment of the present invention provides a device for a Cache partition, where the device runs an operating system, and the device includes a physical memory and a cache group Cache Sets, where the physical memory is used to store data, and the Cache Set is used by the Cache Set.
  • Caching data in the physical memory the device includes:
  • An allocation module configured to allocate physical memory to an execution entity, to be allocated within the physical entity of the execution entity Stored for storing data required by the execution entity to run;
  • Establishing a relationship module configured to: in the Cache Sets included in the host, select one or more cache sets that are not occupied, and cache data in physical memory allocated for the execution body to the selected Cache Set. Establishing a correspondence between the physical memory allocated to the execution body and the selected Cache Set.
  • the apparatus includes a re-staining component for reading a re-staining table, the re-staining table being used for recording the execution of the execution subject Corresponding relationship between the physical memory and the selected Cache Set; the establishing relationship module includes:
  • a re-staining table unit for establishing the re-staining table, and establishing, in the re-staining table, a correspondence between a physical memory address allocated to the execution body and a cache group mask Cache Set Mask, the Cache Set Mask is used to identify the selected Cache Set.
  • the apparatus further includes:
  • a re-staining table obtaining module configured to obtain the re-staining table
  • a search module configured to find and acquire a target Cache Set Mask in the re-staining table according to a physical memory address allocated for the execution body, the target Cache Set Mask and a physical memory address allocated to the execution body correspond;
  • the first access module is configured to determine and access the target Cache Set according to the target Cache Set Mask, where the target Cache Set Mask corresponds to the target Cache Set.
  • the apparatus includes:
  • a storage module configured to store the target Cache Set Mask to a shadow address space of a physical memory address allocated to the execution body
  • a second access module configured to determine and access the target Cache Set according to the target Cache Set Mask stored in the Shadow Address Space when the execution entity indexes the target Cache Set again.
  • the apparatus further includes a memory management unit MMU, where the MMU is configured to cache a page table cache entry, the page table cache entry Included in the identification ID of the execution entity; the device includes:
  • Adding a module configured to add, in the page table cache entry of the MMU, the target Cache Set Mask corresponding to the identifier ID of the execution entity;
  • a mask acquisition module configured to: when the execution entity indexes the target Cache Set again, obtain the target Cache Set Mask in the page table cache item according to the identifier ID of the execution entity;
  • the third access module is configured to determine and access the target Cache Set according to the target Cache Set Mask.
  • the apparatus includes a cache register, and the re-staining table obtaining module includes:
  • a detecting unit configured to detect whether the re-staining table exists in the cache register
  • a first obtaining unit configured to obtain the re-staining table from the cache register when present
  • a second obtaining unit configured to acquire the re-staining table from physical memory when not present.
  • the method and device for the Cache partition provided by the embodiment of the present invention can allocate physical memory to the execution entity, and select one or more Cache Sets that are not occupied in the Cache Sets included in the host, and the physics to be allocated for the execution entity
  • the data in the memory is cached in the selected Cache Set, and the correspondence between the physical memory allocated by the execution subject and the selected Cache Set is established.
  • continuous physical memory is required to be executed.
  • the data required to run a row entity is cached in comparison to multiple different Cache Sets.
  • the data in the physical memory allocated for the execution entity is cached into the selected unoccupied Cache Set, and the correspondence between the physical memory allocated to the execution entity and the Cache Set is established, regardless of the allocation to the execution entity.
  • the physical memory and the Cache Set can be allocated to the execution entity flexibly, and different Cache Sets are allocated to different execution entities, thereby avoiding the situation where multiple execution entities share the same one or more Cache Sets.
  • the interference generated by multiple execution entities in the use of the Cache is reduced, and the cache access performance is improved.
  • FIG. 1 is a flowchart of a method for a Cache partition according to an embodiment of the present invention
  • FIG. 1 is a schematic diagram of an execution entity, physical memory, and Cache Set correspondence according to an embodiment of the present disclosure
  • FIG. 2 is a flowchart of a specific implementation manner of a method for a Cache partition according to an embodiment of the present invention
  • FIG. 2a is a schematic structural diagram of an example of a Cache system according to an embodiment of the present invention.
  • 2b is a schematic diagram of a re-staining table according to an embodiment of the present invention.
  • FIG. 4, and FIG. 5 are flowcharts of another method for a Cache partition according to an embodiment of the present invention.
  • 4a, 4b, and 4c are schematic diagrams showing an example of accessing a Cache Set according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of an example of a page table cache entry according to an embodiment of the present disclosure
  • FIG. 6a, FIG. 6b, and FIG. 6c are schematic diagrams of another method for Cache partitioning according to an embodiment of the present invention. Flow chart of the body implementation;
  • FIG. 7 is a schematic structural diagram of an apparatus for a Cache partition according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of a specific implementation manner of an apparatus for a Cache partition according to an embodiment of the present disclosure
  • FIG. 9 is a schematic structural diagram of another apparatus for a Cache partition according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of another apparatus for a Cache partition according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of another apparatus for a Cache partition according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of a specific implementation manner of an apparatus for another Cache partition according to an embodiment of the present disclosure
  • FIG. 13 is a schematic structural diagram of a Cache partition device according to an embodiment of the present invention.
  • the technical solution provided by the embodiment of the present invention is applied to a host, and an operating system running on the host can flexibly allocate physical memory and a Cache Set to the execution entity.
  • the host may include a multi-virtual machine operating system under the virtual machine system, a multi-core operating system under the multi-core hardware platform, or a multi-process scheduling system under the single system, that is, the executing entity may be a process, a kernel, or Virtual machine, etc.
  • at least a Cache partition device or a Cache partition module is added to the Cache system in the host to establish and query the correspondence between the physical memory allocated by the execution entity and the Cache Set.
  • This solution can be applied to all levels of cache, such as: level 1 cache, level 2 cache, level 3 cache, and so on.
  • the embodiment of the invention provides a method for Cache partitioning, as shown in FIG. 1 , including:
  • the operating system allocates physical memory for an execution entity.
  • the operating system runs on the host, and the host includes a physical memory and a cache group Cache Set.
  • the execution entity may be a process, a virtual machine, or a kernel.
  • the operating system may allocate appropriate physical memory to the execution entity according to the specific conditions of each execution entity and the policy decision of the operating system.
  • the physical memory allocated for the execution entity is used to store the data needed to execute the entity runtime.
  • the cache group Cache Set can be used to cache data in physical memory.
  • the physical memory allocated for the execution entity may be continuous or discontinuous, depending on the scenario of the execution entity, for example, a scenario of starting a scene or direct memory access of the device, and operating The system allocates continuous physical memory for the execution entity; in other scenarios, the operating system can also allocate non-contiguous physical memory to the execution entity.
  • Cache Sets included in the host select one or more Cache Sets that are not occupied, and cache data in the physical memory allocated to the execution entity to the selected Cache Set, and establish Corresponding relationship between the physical memory allocated by the execution subject and the selected Cache Set.
  • the host often includes multiple cache group Cache Sets.
  • some cache sets may have been occupied by other execution entities, and other data required for the execution of the main body are cached; another part of the Cache Set is not executed.
  • the main body is occupied and is in an idle state. It is an unoccupied Cache Set.
  • the unoccupied Cache Set is selected to avoid occupying the same Cache Set together with other execution entities.
  • the selected unoccupied Cache Set may be one or more.
  • the data in the physical memory allocated to the execution entity is cached in the selected Cache Set, and the correspondence between the physical memory of the execution entity and the Cache Set is established, so that the physical memory of one execution entity corresponds to one Cache Set or multiple Cache Sets.
  • the physical memory of the execution entity corresponds to a different Cache Set.
  • the correspondence between the physical memory allocated to the execution entity and the Cache Set may be represented by a correspondence between a physical memory address allocated by the execution entity and a Cache Set Mask, and the Cache Set Mask is used to identify the Cache Set.
  • the operating system updates the established correspondence, thereby ensuring the normal operation of the execution entity.
  • the management kernel is equivalent to the operating system.
  • the management kernel allocates physical memory for each lightweight kernel, and selects an unoccupied Cache Set (cache group), which will be lightweight.
  • the data in the physical memory allocated by the level kernel is cached into the selected Cache Set, and the correspondence between the physical memory allocated by the lightweight kernel and the selected Cache Set is established, so that the cache partition management function of the management kernel can be utilized, and the cache performance is obtained.
  • the isolation function module assigns a corresponding Cache Set to each lightweight kernel. When creating, destroying, and migrating lightweight kernels, the management kernel resets the cache partition management functionality.
  • a method for Cache partitioning is capable of allocating physical memory for an execution entity, and selecting one or more Cache Sets that are not occupied in a Cache Sets included in the host, and is to be allocated physical memory for the execution entity.
  • the data is cached into the selected Cache Set, and the correspondence between the physical memory allocated by the execution subject and the selected Cache Set is established.
  • the data required for the execution of the continuous physical memory execution entity is cached in comparison with a plurality of different Cache Sets.
  • the data in the physical memory allocated for the execution entity is cached into the selected unoccupied Cache Set, and the correspondence between the physical memory allocated to the execution entity and the Cache Set is established, regardless of the allocation to the execution entity.
  • the physical memory and the Cache Set can be allocated to the execution entity flexibly, and different Cache Sets are allocated to different execution entities, thereby avoiding the situation where multiple execution entities share the same one or more Cache Sets. Reduced interference caused by multiple execution entities in the use of Cache, improved Cache's memory access performance.
  • the embodiment of the present invention further provides a specific solution of a method for Cache partitioning, where the host includes a re-staining component, and the re-staining component is used to read a re-staining table, and re-staining The table is used to record the correspondence between the physical memory allocated to the execution entity and the Cache Set.
  • the implementation of the solution in the solution shown in FIG. 1 is further refined.
  • the 102 may be specifically implemented as 1021.
  • the method includes:
  • the operating system may record the correspondence between the physical memory allocated to the executing entity and the Cache Set in the form of an entry.
  • the operating system uses the re-staining table to record the correspondence between the physical memory allocated to the executing entity and the Cache Set.
  • the resampling table can be stored in physical memory or in the cache register of the Cache controller.
  • the cache cache system in the host often includes a Cache controller, and a Cache partition device or a Cache partition module may be added in the Cache controller, and the Cache partition device or the Cache partition module includes a re-staining component. It is also possible to add a Cache partition device or a Cache partition module to other devices or parts in the cache Cache system, which is not limited herein.
  • the re-staining table is managed, established, and updated by the operating system kernel; in the virtual machine system, the re-staining table is managed, established, and updated by the VMM (Virtual Machine Manager); In multi-core systems, the re-staining table is managed, built, and updated by the management kernel.
  • VMM Virtual Machine Manager
  • a Cache may be used in the Cache system of the host.
  • a Cache partition module is added to the controller.
  • the Cache partition module includes a re-staining component, a buffer register, and a control space.
  • the re-staining component is used to read the re-staining table
  • the cache register can be used to cache the re-staining table
  • the control space provides a set of control registers to support the startup and initialization of the Cache partitioning module.
  • the memory management unit can perform the conversion of the virtual address and the physical address.
  • the correspondence between the physical memory and the Cache Set may be represented by a physical memory address and a Cache SetMask, and the Cache Set Mask is used to identify the Cache Set.
  • the correspondence between the physical memory address assigned to the execution entity and the Cache Set Mask is recorded in the re-staining table.
  • the execution entity runs, it can be based on the corresponding record in the re-staining table. Relationship, find the Cache Set assigned to this execution entity to get the data needed to run this execution entity.
  • the size of the physical memory address range in the re-staining table may be the size of the Cache line, that is, 64 bytes, or the size of one memory page, that is, 4 KB, or the size of multiple memory pages.
  • the Cache Set Mask can identify a Cache Set or multiple Cache Sets.
  • the re-staining table is also updated synchronously.
  • the specific update process is as follows: updating the data structure of the execution entity, and the data structure of the execution entity is used to generate relevant data about the execution entity in the re-staining table.
  • the operating system updates the data of the corresponding relationship in the re-staining table according to the updated data structure of the executing entity.
  • the corresponding Cache line can be emptied or the Cache line can be written back.
  • a method for Cache partitioning is capable of allocating physical memory for an execution entity, and selecting one or more Cache Sets that are not occupied in a Cache Sets included in the host, and is to be allocated physical memory for the execution entity.
  • the data is cached into the selected Cache Set to establish a re-staining table, and in the re-staining table, a correspondence relationship between the physical memory address allocated to the execution subject and the cache group mask Cache SetMask is established.
  • the data required for the execution of the continuous physical memory is cached in multiple Compared to different Cache Sets.
  • the data in the physical memory allocated for the execution entity is cached into the selected unoccupied Cache Set, and the correspondence between the physical memory allocated to the execution entity and the Cache Set is established, regardless of the allocation to the execution entity.
  • the physical memory and the Cache Set can be allocated to the execution entity flexibly, and different Cache Sets are allocated to different execution entities, thereby avoiding the situation where multiple execution entities share the same one or more Cache Sets.
  • the interference generated by multiple execution entities in the use of the Cache is reduced, and the cache access performance is improved.
  • the embodiment of the present invention further provides a specific solution of a method for Cache partitioning, adding 103-105, specifically indicating that physical memory and Cache Set allocated for the execution entity are established. After the corresponding relationship, how to access the Cache Set corresponding to the execution entity, as shown in Figure 3, includes:
  • the re-staining table can be stored in physical memory or in a cache register.
  • the target Cache Set Mask corresponds to a physical memory address allocated for the execution body, and the corresponding relationship between the physical memory address allocated to all the execution entities and the Cache Set Mask is recorded in the re-staining table, according to the physical memory address allocated for the execution subject, You can find the corresponding Cache Set Mask, which is the target Cache Set Mask.
  • the target Cache Set Mask corresponds to the target Cache Set.
  • a method for Cache partitioning can allocate physical memory for an execution entity, and select one or more Cache Sets that are not occupied in the Cache Sets included in the host, and The data in the physical memory allocated by the row body is cached into the selected Cache Set to establish a re-staining table, and in the re-staining table, the correspondence between the physical memory address allocated by the execution subject and the cache group mask Cache SetMask is established;
  • the re-staining table according to the physical memory address allocated for the execution subject, finds and acquires the target Cache Set Mask in the re-staining table, and accesses the target Cache Set according to the target Cache Set Mask.
  • the data required for the execution of the continuous physical memory execution entity is cached in comparison with a plurality of different Cache Sets.
  • the data in the physical memory allocated for the execution entity is cached into the selected unoccupied Cache Set, and the correspondence between the physical memory allocated to the execution entity and the Cache Set is established, regardless of the allocation to the execution entity.
  • the physical memory and the Cache Set can be allocated to the execution entity flexibly, and different Cache Sets are allocated to different execution entities, thereby avoiding the situation where multiple execution entities share the same one or more Cache Sets.
  • the interference generated by multiple execution entities in the use of the Cache is reduced, and the cache access performance is improved.
  • the embodiment of the present invention further provides a specific solution of a method for Cache partitioning, and the scheme adds 106-107, as shown in FIG. 4, including:
  • the existing processor has a large address space, but the physical memory address of the mainstream processor uses only a part of the space, and the unused space of the other part is idle.
  • the free space of the part of the physical memory address is Shadow Address Space.
  • the existing 64-bit processor addressing space is 64-bit, but the mainstream processor only uses the lower 48 bits of the physical memory address.
  • the upper 16 bits of the physical memory address are basically idle, and the upper 16 bits of the physical memory address. It is the Shadow Address Space.
  • the Cache Set Mask is stored in the Shadow Address Space, so that when the execution entity indexes the target Cache Set again, the Cache Set can be indexed by the Shadow Address Space of the physical address. High cache access efficiency.
  • timings of 105 and 106 are in no particular order, and 106 may be executed before 105, 106 may be executed after 105, and the timing relationships of 105 and 106, 105 and 106 may be performed at the same time.
  • the target cache set is determined and accessed according to the correspondence in the re-staining table and the Shadow Address Space.
  • the virtual address translation may be performed in the Shadow Address Space in the Shadow Address Space. Cache Set Mask.
  • an execution entity identifier may be added to the memory access request to identify the execution entity that sends the request, and the corresponding relationship between the execution entity identifier and the Cache Set Mask may also be recorded in the re-staining table, as shown in FIG. 4c.
  • the execution entity ID can be stored to the Shadow Address Space, and the target Cache Set can be determined and accessed based on the correspondence in the re-staining table and the Shadow Address Space.
  • a method for Cache partitioning is capable of allocating physical memory for an execution entity, and selecting one or more Cache Sets that are not occupied in a Cache Sets included in the host, and is to be allocated physical memory for the execution entity.
  • the data is cached into the selected Cache Set to establish a re-staining table, and in the re-staining table, the correspondence between the physical memory address allocated by the execution subject and the cache group mask Cache SetMask is established; the re-staining table is obtained, according to the execution
  • the physical memory address assigned by the principal is heavy In the dyeing table, find and obtain the target Cache Set Mask, access the target Cache Set according to the target Cache Set Mask, and store the target Cache Set Mask to the shadow address space of the physical memory address allocated for the execution subject, when the execution entity is again
  • the target Cache Set is indexed, the target Cache Set is determined and accessed according to the target Cache Set Mask stored to the Shadow Address Space.
  • the data required for the execution of the continuous physical memory execution entity is cached in comparison with a plurality of different Cache Sets.
  • the data in the physical memory allocated for the execution entity is cached into the selected unoccupied Cache Set, and the correspondence between the physical memory allocated to the execution entity and the Cache Set is established, regardless of the allocation to the execution entity.
  • the physical memory and the Cache Set can be allocated to the execution entity flexibly, and different Cache Sets are allocated to different execution entities, thereby avoiding the situation where multiple execution entities share the same one or more Cache Sets.
  • the interference generated by multiple execution entities in the use of the Cache is reduced, and the cache access performance is improved. Moreover, when the execution entity indexes the target Cache Set again, the Cache Set Mask in the Shadow Address Space can be directly used for indexing. And access to the target Cache Set, saving the time to determine the target Cache Set, improving the efficiency of Cache access.
  • the embodiment of the present invention further provides a specific solution of a method for Cache partitioning, where the host further includes a memory management unit MMU, and the MMU is used to cache a page table cache entry, and the page The table cache entry includes the ID of the execution entity; this scheme adds 108-110, and uses the page table cache entry to access the target Cache Set, as shown in FIG. 5, including:
  • a Cache Set corresponding to the execution entity identifier is added.
  • Mask which facilitates determining and accessing the target Cache Set through the MMU's page table cache entry.
  • 105 and 108 are in no particular order in time, 108 may be executed before 105, 108 may be executed after 105, and the timing relationship of 105 and 108 may be performed at the same time, and the timing relationship of 105 and 108 is not limited herein.
  • the target Cache Set Mask can be determined according to the page table cache entry and the execution entity identifier of the execution entity as shown in FIG. 5a.
  • a method for Cache partitioning is capable of allocating physical memory for an execution entity, and selecting one or more Cache Sets that are not occupied in a Cache Sets included in the host, and is to be allocated physical memory for the execution entity.
  • the data is cached into the selected Cache Set to establish a re-staining table, and in the re-staining table, the correspondence between the physical memory address allocated by the execution subject and the cache group mask Cache SetMask is established; the re-staining table is obtained, according to the execution
  • the physical memory address allocated by the main body, in the re-staining table find and obtain the target Cache Set Mask, access the target Cache Set according to the target Cache Set Mask, and add the target corresponding to the identification ID of the executing entity in the page table cache item of the MMU
  • the Cache Set Mask when the execution entity indexes the target Cache Set again, obtains the target Cache Set Mask in the page table cache item according to the ID of the execution entity, thereby determining and accessing the target Cache Set.
  • the data required for the execution of the continuous physical memory execution entity is cached in comparison with a plurality of different Cache Sets.
  • the data in the physical memory allocated for the execution entity is cached into the selected unoccupied Cache Set, and the correspondence between the physical memory allocated to the execution entity and the Cache Set is established, regardless of the allocation to the execution entity.
  • the physical memory is continuous, you can flexibly allocate physical memory for the execution entity.
  • the Cache Set which allocates different Cache Sets for different execution entities, avoids the situation where multiple execution entities share the same one or more Cache Sets, and thus reduces the interference generated by multiple execution entities in the use of the Cache.
  • the Cache access performance is improved. Moreover, when the execution entity indexes the target Cache Set again, the execution entity identifier and the Cache Set Mask in the page table cache entry of the MMU can be directly indexed to determine and access the target Cache Set. The time for determining the target Cache Set is saved, and the Cache access efficiency is improved.
  • the embodiment of the present invention further provides a specific scheme of a method for Cache partitioning, and the solution is implemented in FIG. 3, FIG. 4, and FIG.
  • the execution process of 103 in the illustrated solution is further refined, wherein 103 can be specifically implemented as 1031-1033, as shown in FIG. 6a, FIG. 6b, and FIG. 6c, including:
  • the Cache system includes a cache register
  • the re-staining table can be stored in physical memory, or can be stored in a cache register, and reading the re-staining table from the cache register is faster.
  • a method for Cache partitioning is capable of allocating physical memory for an execution entity, and selecting one or more Cache Sets that are not occupied in a Cache Sets included in the host, and is to be allocated physical memory for the execution entity.
  • the data is cached into the selected Cache Set to establish a re-staining table, and in the re-staining table, the correspondence between the physical memory address allocated to the execution subject and the cache group mask Cache SetMask is established; and whether the buffer is stored in the cache register is detected.
  • the table when present, obtains the re-staining table from the cache register.
  • the re-staining table is obtained from the physical memory, and the target Cache is found and obtained in the re-staining table according to the physical memory address allocated for the executing entity.
  • Set Mask according to Target Cache Set Mask, access target Cache Set.
  • the data required for the execution of the continuous physical memory execution entity is cached in comparison with a plurality of different Cache Sets.
  • the data in the physical memory allocated for the execution entity is cached into the selected unoccupied Cache Set, and the correspondence between the physical memory allocated to the execution entity and the Cache Set is established, regardless of the allocation to the execution entity.
  • the physical memory and the Cache Set can be allocated to the execution entity flexibly, and different Cache Sets are allocated to different execution entities, thereby avoiding the situation where multiple execution entities share the same one or more Cache Sets. It reduces the interference generated by multiple execution entities in the use of Cache, and improves the memory access performance of the Cache; moreover, the speed of obtaining the re-staining table from the cache register is faster, first consider obtaining the re-staining table from the cache register, saving The time for determining the target Cache Set is improved, thereby improving the cache access efficiency.
  • the embodiment of the present invention provides a device 200 for Cache partitioning.
  • the device 200 runs an operating system.
  • the device 200 includes physical memory and a cache group Cache Sets.
  • the physical memory is used to store data, and the Cache Set is used to cache the physical memory.
  • the data as shown in Figure 7, includes:
  • the allocating module 201 is configured to allocate physical memory for the executing entity.
  • the physical memory allocated for the execution entity is used to store the data needed to execute the entity runtime.
  • the establishing relationship module 202 is configured to: in the Cache Sets included in the host, select one or more Cache Sets that are not occupied, and cache data in the physical memory allocated for the execution body to the selected Cache Set And establishing a correspondence between the physical memory allocated to the execution entity and the selected Cache Set.
  • the device of the Cache partition provided by the embodiment of the present invention can allocate physical memory for the execution entity, and select one or more Cache Sets that are not occupied in the Cache Sets included in the host, and The data in the physical memory allocated by the row body is cached in the selected Cache Set, and the correspondence between the physical memory allocated by the execution subject and the selected Cache Set is established.
  • the data required for the execution of the continuous physical memory execution entity is cached in comparison with a plurality of different Cache Sets.
  • the data in the physical memory allocated for the execution entity is cached into the selected unoccupied Cache Set, and the correspondence between the physical memory allocated to the execution entity and the Cache Set is established, regardless of the allocation to the execution entity.
  • the physical memory and the Cache Set can be allocated to the execution entity flexibly, and different Cache Sets are allocated to different execution entities, thereby avoiding the situation where multiple execution entities share the same one or more Cache Sets.
  • the interference generated by multiple execution entities in the use of the Cache is reduced, and the cache access performance is improved.
  • the device 200 includes a re-staining component for reading a re-staining table, and the re-staining table is used to record a correspondence between the physical memory allocated to the executing body and the selected Cache Set;
  • establishing relationship module 202 includes:
  • the re-staining table unit 2021 is configured to establish the re-staining table, and establish, in the re-staining table, a correspondence between a physical memory address allocated to the execution body and a cache group mask Cache Set Mask.
  • the Cache Set Mask is used to identify the selected Cache Set.
  • the device of the present invention provides a device for Cache partitioning, which is capable of allocating physical memory for an executing entity, and selecting one or more Cache Sets that are not occupied in the Cache Sets included in the host, which will be allocated in physical memory allocated to the executing entity.
  • the data is cached into the selected Cache Set to establish a re-staining table, and in the re-staining table, a correspondence relationship between the physical memory address allocated to the execution subject and the cache group mask Cache Set Mask is established.
  • the data required for the execution of the continuous physical memory execution entity is cached in a plurality of different Compared to the Cache Set.
  • the data in the physical memory allocated for the execution entity is cached into the selected unoccupied Cache Set, and the correspondence between the physical memory allocated to the execution entity and the Cache Set is established, regardless of the allocation to the execution entity.
  • the physical memory and the Cache Set can be allocated to the execution entity flexibly, and different Cache Sets are allocated to different execution entities, thereby avoiding the situation where multiple execution entities share the same one or more Cache Sets.
  • the interference generated by multiple execution entities in the use of the Cache is reduced, and the cache access performance is improved.
  • the apparatus 200 further includes:
  • the re-staining table obtaining module 203 is configured to obtain the re-staining table.
  • the searching module 204 is configured to find and acquire a target Cache Set Mask in the re-staining table according to a physical memory address allocated for the execution body.
  • the target Cache Set Mask corresponds to a physical memory address allocated for the execution entity.
  • the first access module 205 is configured to determine and access the target Cache Set according to the target Cache Set Mask.
  • the target Cache Set Mask corresponds to the target Cache Set.
  • An apparatus for Cache partitioning is capable of allocating physical memory for an execution entity, and selecting one or more Cache Sets that are not occupied in a Cache Sets included in the host, and is to be allocated physical memory for the execution entity.
  • the data is cached into the selected Cache Set to establish a re-staining table, and in the re-staining table, the correspondence between the physical memory address allocated by the execution subject and the cache group mask Cache SetMask is established; the re-staining table is obtained, according to the execution
  • the physical memory address allocated by the subject, in the re-staining table finds and acquires the target Cache Set Mask, and accesses the target Cache Set according to the target Cache Set Mask.
  • the data required for the execution of the continuous physical memory is cached in multiple different Compared to the Cache Set.
  • the data in the physical memory allocated for the execution entity is cached into the selected unoccupied Cache Set, and the correspondence between the physical memory allocated to the execution entity and the Cache Set is established, regardless of the allocation to the execution entity.
  • the physical memory and the Cache Set can be allocated to the execution entity flexibly, and different Cache Sets are allocated to different execution entities, thereby avoiding the situation where multiple execution entities share the same one or more Cache Sets.
  • the interference generated by multiple execution entities in the use of the Cache is reduced, and the cache access performance is improved.
  • the apparatus 200 includes:
  • the storage module 206 is configured to store the target Cache Set Mask to a shadow address space Shadow Address Space of a physical memory address allocated to the execution entity.
  • the second access module 207 is configured to determine and access the target Cache Set according to the target Cache Set Mask stored in the Shadow Address Space when the execution entity indexes the target Cache Set again.
  • An apparatus for Cache partitioning is capable of allocating physical memory for an execution entity, and selecting one or more Cache Sets that are not occupied in a Cache Sets included in the host, and is to be allocated physical memory for the execution entity.
  • the data is cached into the selected Cache Set to establish a re-staining table, and in the re-staining table, the correspondence between the physical memory address allocated by the execution subject and the cache group mask Cache SetMask is established; the re-staining table is obtained, according to the execution
  • the physical memory address allocated by the main body, in the re-staining table find and obtain the target Cache Set Mask, access the target Cache Set according to the target Cache Set Mask, and store the target Cache Set Mask to the shadow address of the physical memory address allocated for the execution subject
  • the space Shadow Address Space when the execution entity indexes the target Cache Set again, determines and accesses the target Cache Set according to the target Cache Set Mask stored to the Shadow Address Space.
  • the interference generated by multiple execution entities in the use of the Cache is reduced, and the cache access performance is improved. Moreover, when the execution entity indexes the target Cache Set again, the Cache Set Mask in the Shadow Address Space can be directly used for indexing. And access to the target Cache Set, saving the time to determine the target Cache Set, improving the efficiency of Cache access.
  • the device 200 further includes a memory management unit MMU, where the MMU is used to cache the page table cache entry, and the page table cache entry includes the identifier ID of the execution entity. As shown in FIG.
  • the adding module 208 is configured to add, in the page table cache entry of the MMU, the target Cache Set Mask corresponding to the ID of the execution entity.
  • the mask obtaining module 209 is configured to obtain the target Cache Set Mask in the page table cache item according to the identifier ID of the execution entity when the execution entity indexes the target Cache Set again.
  • the third access module 210 is configured to determine and access the target Cache Set according to the target Cache Set Mask.
  • An apparatus for Cache partitioning is capable of allocating physical memory for an execution entity, and selecting one or more Cache Sets that are not occupied in a Cache Sets included in the host, and is to be allocated physical memory for the execution entity.
  • the data is cached into the selected Cache Set to establish a re-staining table, and in the re-staining table, a physical memory address and a cache group mask Cache Set allocated for the execution subject are established.
  • the corresponding relationship of the mask; the re-staining table is obtained, and according to the physical memory address allocated for the execution subject, in the re-staining table, the target Cache Set Mask is searched and acquired, and the target Cache Set is accessed according to the target Cache Set Mask; the page table of the MMU is accessed.
  • a target Cache Set Mask corresponding to the ID of the execution entity is added to the cache entry.
  • the target Cache Set Mask is obtained in the page table cache entry according to the ID of the execution entity, thereby determining and accessing. Target Cache Set.
  • the data required for the execution of the continuous physical memory execution entity is cached in comparison with a plurality of different Cache Sets.
  • the data in the physical memory allocated for the execution entity is cached into the selected unoccupied Cache Set, and the correspondence between the physical memory allocated to the execution entity and the Cache Set is established, regardless of the allocation to the execution entity.
  • the physical memory and the Cache Set can be allocated to the execution entity flexibly, and different Cache Sets are allocated to different execution entities, thereby avoiding the situation where multiple execution entities share the same one or more Cache Sets.
  • the interference generated by multiple execution entities in the use of the Cache is reduced, and the cache access performance is improved. Moreover, when the execution entity indexes the target Cache Set again, the execution entity identifier and the Cache in the page table cache entry of the MMU can be directly utilized. The corresponding relationship of the Set Mask is indexed, and the target Cache Set is determined and accessed, which saves the time for determining the target Cache Set, and improves the Cache access efficiency.
  • the Cache system includes a cache register, as shown in FIG. 12, the re-staining table obtaining module 203 includes:
  • the detecting unit 2031 is configured to detect whether the re-staining table exists in the cache register.
  • the first obtaining unit 2032 is configured to, when present, obtain the re-staining table from the cache register.
  • the second obtaining unit 2033 is configured to acquire the re-staining table from the physical memory when not present.
  • An apparatus for Cache partitioning is capable of allocating physical memory for an execution entity, and selecting one or more Cache Sets that are not occupied in a Cache Sets included in the host, and is to be allocated physical memory for the execution entity.
  • the data is cached into the selected Cache Set to establish a re-staining table, and in the re-staining table, the correspondence between the physical memory address allocated to the execution subject and the cache group mask Cache SetMask is established; and whether the buffer is stored in the cache register is detected.
  • the table when present, obtains the re-staining table from the cache register.
  • the re-staining table is obtained from the physical memory, and the target Cache is found and obtained in the re-staining table according to the physical memory address allocated for the executing entity.
  • Set Mask access the target Cache Set according to the target Cache Set Mask.
  • the physical memory and the Cache Set can be allocated to the execution entity flexibly, and different Cache Sets are allocated to different execution entities, thereby avoiding the situation where multiple execution entities share the same one or more Cache Sets. It reduces the interference generated by multiple execution entities in the use of Cache, and improves the memory access performance of the Cache; moreover, the speed of obtaining the re-staining table from the cache register is faster, first consider obtaining the re-staining table from the cache register, saving The time for determining the target Cache Set is improved, thereby improving the cache access efficiency.
  • the embodiment of the present invention further provides a Cache Partitioning Device 300, as shown in FIG. 13, comprising: at least one processor 301, such as a CPU (central process unit), at least one communication bus 302, and a memory 303. Additionally, the network management server 300 can also include at least one network interface 304 and a user interface 305. Communication bus 302 is used to implement connection communication between these components. Optionally, user interface 305 Includes devices such as monitors, keyboards, mice, and touch screens.
  • the memory 303 includes a buffer Cache, which may include a high speed RAM (random access memory) memory, and may also include a non-volatile memory such as a disk memory.
  • the memory 303 is configured to store data required for the execution entity to run, and is also used to store the established correspondence between the physical memory allocated to the execution entity and the Cache Set.
  • the memory 303 is further configured to store a correspondence between a physical memory address allocated to the execution entity in the re-staining table and the Cache Set Mask, or a correspondence between the identification ID of the entity and the Cache Set Mask.
  • the processor 301 may be configured to allocate physical memory to the execution entity; and, in the Cache Sets included in the host, select one or more cache sets that are not occupied, and allocate the same to the execution entity.
  • the data in the physical memory is cached in the selected Cache Set, and the corresponding relationship between the physical memory allocated by the execution entity and the selected Cache Set is established.
  • the processor 301 may be configured to establish the re-staining table, and establish, in the re-staining table, a correspondence between a physical memory address allocated to the executing entity and a cache group mask Cache Set Mask, The Cache Set Mask is used to identify the selected Cache Set.
  • the Cache Partitioning Device 300 includes a re-staining component for reading a re-staining table, and the re-staining table is used to record a correspondence between a physical memory allocated to an execution subject and a selected Cache Set.
  • the processor 301 can be configured to acquire the re-staining table; and, for determining, in the re-staining table, a target Cache Set Mask, according to a physical memory address allocated for the executing entity, the target Cache Set Mask corresponding to a physical memory address allocated to the execution entity; and configured to determine and access the target Cache Set according to the target Cache Set Mask, where the target Cache Set Mask corresponds to the target Cache Set .
  • the processor 301 can be further configured to store the target Cache Set Mask to a shadow address space Shadow Address Space of a physical memory address allocated to the execution entity; and, for when the execution entity indexes the target again In the Cache Set, the target Cache Set is determined and accessed according to the target Cache Set Mask stored in the Shadow Address Space.
  • the processor 301 is further configured to: add, in the page table cache entry of the MMU, a Cache Set Mask corresponding to the identifier of the execution entity; and, when the execution entity indexes the target again And the Cache Set, the target Cache Set Mask is obtained in the page table cache item according to the identifier ID of the execution entity; and configured to determine and access the target Cache Set according to the target Cache Set Mask.
  • the processor 301 is further configured to detect whether the re-staining table exists in the cache register; and, when present, obtain the re-staining table from the cache register; and, for When not present, the re-staining table is obtained from physical memory.
  • the Cache partition device can allocate physical memory for the execution entity, and select one or more Cache Sets that are not occupied in the Cache Sets included in the host, and will be allocated in the physical memory allocated for the execution entity.
  • the data is cached into the selected Cache Set to establish a re-staining table, and in the re-staining table, the correspondence between the physical memory address allocated to the execution subject and the cache group mask Cache Set Mask is established; and whether the buffer is stored in the cache register is detected.
  • the table when present, obtains the re-staining table from the cache register.
  • the re-staining table is obtained from the physical memory, and the target Cache is found and obtained in the re-staining table according to the physical memory address allocated for the executing entity.
  • Set Mask according to the target Cache Set Mask, access the target Cache Set; store the target Cache Set Mask to the shadow address space of the physical memory address allocated for the execution subject, and when the execution entity indexes the target Cache Set again, according to the storage to Shadow Address Space's target Cache Set Mask, identify and access the target Cach e Set; or, add and identify the identity of the executing entity in the page table cache entry of the MMU
  • the target Cache Set Mask corresponding to the ID when the execution entity indexes the target Cache Set again, obtains the target Cache Set Mask in the page table cache item according to the ID of the execution entity, thereby determining and accessing the target Cache Set.
  • the data required for the execution of the continuous physical memory execution entity is cached in comparison with a plurality of different Cache Sets.
  • the data in the physical memory allocated for the execution entity is cached into the selected unoccupied Cache Set, and the correspondence between the physical memory allocated to the execution entity and the Cache Set is established, regardless of the allocation to the execution entity.
  • the physical memory and the Cache Set can be allocated to the execution entity flexibly, and different Cache Sets are allocated to different execution entities, thereby avoiding the situation where multiple execution entities share the same one or more Cache Sets.
  • the interference generated by multiple execution entities in the use of the Cache is reduced, and the cache access performance is improved.
  • the Cache Set Mask in the Shadow Address Space can be directly used for indexing, or
  • the index of the execution entity in the MMU's page table cache entry and the Cache Set Mask are used to index and determine the target Cache Set, which saves the time for determining the target Cache Set, and improves the efficiency of the Cache access; and, from the cache register Get the resampling table faster, first consider getting it from the cache register
  • the re-staining table saves the time for determining the target Cache Set, further improving the efficiency of the Cache access.
  • the machine can be read into a storage medium, and when executed, the program can include the flow of an embodiment of the methods as described above.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

公开一种Cache分区的方法及装置,涉及电子信息技术领域,能够为执行实体灵活分配物理内存和Cache Set,减少了多个执行实体在Cache的使用上产生的干扰,提高访存性能。方法包括:操作***为执行实体分配物理内存(101);在主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为执行主体分配的物理内存中的数据缓存至选取的Cache Set中,建立为执行主体分配的物理内存与选取的Cache Set的对应关系(102)。方法适用于为执行实体分配合适的Cache Set的场景。

Description

一种Cache分区的方法及装置 技术领域
本发明涉及电子信息技术领域,尤其涉及一种Cache分区的方法及装置。
背景技术
在云计算和数据中心的应用中,为了能够充分的利用资源,单节点内往往存在多个执行实体,如:进程、虚拟机或多内核操作***中的内核等。操作***需要对每一个执行实体分配物理内存,现有技术中的Cache索引方式决定了物理内存与Cache(高速缓冲存储器)存在对应关系,分配物理内存后相当于为执行实体分配了Cache,多个执行实体运行时,各个执行实体在Cache的使用上会产生干扰,如:一个进程频繁刷新Cache,使得其他进程访问Cache的成功率下降,从而造成访存延迟。因为在现有技术中,物理内存的地址的低几位与Cache Set(缓存组)存在固定的对应关系,且物理内存的地址的低几位固定不变,连续的物理内存往往会跨越多个Cache Set,为了避免多个执行实体在Cache的使用上产生干扰,操作***为执行实体分配不连续的物理内存,以求一个执行实体缓存在同一个Cache Set中,不同的Cache Set之间不会产生干扰,所以,多个执行实体运行时,不会造成访存延误。
但是,在一些工作场景中,如启动场景或设备直接内存存取场景,操作***需要对执行实体分配连续的物理内存,而连续的物理内存往往跨越了多个不同的Cache Set,需要连续的物理内存的执行实体极有可能与其他的执行实体共用相同的一个或多个Cache Set,在这种情况下,多个执行实体在Cache的使用上仍然会产生干扰,造成访存延误,从而降低访存性能。
发明内容
本发明的实施例提供一种Cache分区的方法及装置,能够为执行实体灵活分配物理内存和Cache Set,减少了多个执行实体在Cache的使用上产生的干扰,提高访存性能。
为达到上述目的,本发明的实施例采用如下技术方案:
第一方面,本发明实施例提供一种Cache分区的方法,用于主机,所述主机 运行有操作***,所述主机包括物理内存和缓存组Cache Sets,所述物理内存用于存储数据,所述Cache Set用于缓存所述物理内存中的数据;所述方法包括:
所述操作***为执行实体分配物理内存,为所述执行实体分配的物理内存用于存储所述执行实体运行时需要的数据;
在所述主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为所述执行主体分配的物理内存中的数据缓存至所述选取的Cache Set中,建立为所述执行主体分配的物理内存与所述选取的Cache Set的对应关系。
结合第一方面,在第一种可能的实现方式中,所述主机包括重染色组件,所述重染色组件用于读取重染色表,所述重染色表用于记录为所述执行主体分配的物理内存与所述选取的Cache Set的对应关系;所述建立为所述执行主体分配的物理内存与所述选取的Cache Set的对应关系,包括:
建立所述重染色表,并在所述重染色表中,建立为所述执行主体分配的物理内存地址与缓存组掩码Cache Set Mask的对应关系,所述Cache Set Mask用于标识所述选取的Cache Set。
结合第一方面的第一种可能的实现方式,在第二种可能的实现方式中,所述方法还包括:
获取所述重染色表;
根据为所述执行主体分配的物理内存地址,在所述重染色表中,查找并获取目标Cache Set Mask,所述目标Cache Set Mask与为所述执行主体分配的物理内存地址对应;
根据所述目标Cache Set Mask,确定并访问所述目标Cache Set,所述目标Cache Set Mask与所述目标Cache Set对应。
结合第一方面的第二种可能的实现方式,在第三种可能的实现方式中,在 所述查找并获取目标Cache Set Mask之后,包括:
将所述目标Cache Set Mask存储至为所述执行主体分配的物理内存地址的影子地址空间Shadow Address Space;
当所述执行实体再次索引所述目标Cache Set时,根据存储至所述Shadow Address Space的所述目标Cache Set Mask,确定并访问所述目标Cache Set。
结合第一方面的第二种可能的实现方式,在第四种可能的实现方式中,所述主机还包括内存管理单元MMU,所述MMU用于缓存页表缓存项,所述页表缓存项中包括所述执行实体的标识ID;在所述查找并获取目标Cache Set Mask之后,包括:
在所述MMU的页表缓存项中添加与所述执行实体的标识ID对应的所述目标Cache Set Mask;
当所述执行实体再次索引所述目标Cache Set时,根据所述执行实体的标识ID,在所述页表缓存项中得到所述目标Cache Set Mask;
根据所述目标Cache Set Mask,确定并访问所述目标Cache Set。
结合第一方面的第二种可能的实现方式,在第五种可能的实现方式中,所述主机包括缓存寄存器;所述获取所述重染色表,包括:
检测所述缓存寄存器中是否存在所述重染色表;
若存在,则从所述缓存寄存器中获取所述重染色表;
若不存在,则从物理内存中获取所述重染色表。
第二方面,本发明实施例提供一种Cache分区的装置,所述装置运行有操作***,所述装置包括物理内存和缓存组Cache Sets,所述物理内存用于存储数据,所述Cache Set用于缓存所述物理内存中的数据;所述装置包括:
分配模块,用于为执行实体分配物理内存,为所述执行实体分配的物理内 存用于存储所述执行实体运行时需要的数据;
建立关系模块,用于在所述主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为所述执行主体分配的物理内存中的数据缓存至所述选取的Cache Set中,建立为所述执行主体分配的物理内存与所述选取的Cache Set的对应关系。
结合第二方面,在第一种可能的实现方式中,所述装置包括重染色组件,所述重染色组件用于读取重染色表,所述重染色表用于记录为所述执行主体分配的物理内存与所述选取的Cache Set的对应关系;所述建立关系模块,包括:
重染色表单元,用于建立所述重染色表,并在所述重染色表中,建立为所述执行主体分配的物理内存地址与缓存组掩码Cache Set Mask的对应关系,所述Cache Set Mask用于标识所述选取的Cache Set。
结合第二方面的第一种可能的实现方式,在第二种可能的实现方式中,所述装置还包括:
重染色表获取模块,用于获取所述重染色表;
查找模块,用于根据为所述执行主体分配的物理内存地址,在所述重染色表中,查找并获取目标Cache Set Mask,所述目标Cache Set Mask与为所述执行主体分配的物理内存地址对应;
第一访问模块,用于根据所述目标Cache Set Mask,确定并访问所述目标Cache Set,所述目标Cache Set Mask与所述目标Cache Set对应。
结合第二方面的第二种可能的实现方式,在第三种可能的实现方式中,所述装置包括:
存储模块,用于将所述目标Cache Set Mask存储至为所述执行主体分配的物理内存地址的影子地址空间Shadow Address Space;
第二访问模块,用于当所述执行实体再次索引所述目标Cache Set时,根据存储至所述Shadow Address Space的所述目标Cache Set Mask,确定并访问所述目标Cache Set。
结合第二方面的第二种可能的实现方式,在第四种可能的实现方式中,所述装置还包括内存管理单元MMU,所述MMU用于缓存页表缓存项,所述页表缓存项中包括所述执行实体的标识ID;所述装置包括:
添加模块,用于在所述MMU的页表缓存项中添加与所述执行实体的标识ID对应的所述目标Cache Set Mask;
掩码获取模块,用于当所述执行实体再次索引所述目标Cache Set时,根据所述执行实体的标识ID,在所述页表缓存项中得到所述目标Cache Set Mask;
第三访问模块,用于根据所述目标Cache Set Mask,确定并访问所述目标Cache Set。
结合第二方面的第二种可能的实现方式,在第五种可能的实现方式中,所述装置包括缓存寄存器;所述重染色表获取模块,包括:
检测单元,用于检测所述缓存寄存器中是否存在所述重染色表;
第一获取单元,用于当存在时,从所述缓存寄存器中获取所述重染色表;
第二获取单元,用于当不存在时,从物理内存中获取所述重染色表。
本发明实施例提供的一种Cache分区的方法及装置,能够为执行实体分配物理内存,在主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为执行主体分配的物理内存中的数据缓存至选取的Cache Set中,建立为执行主体分配的物理内存与选取的Cache Set的对应关系。与现有技术中的:根据物理内存的地址的低几位与Cache Set的固定对应关系,需要连续的物理内存的执 行实体运行需要的数据缓存于多个不同的Cache Set相比。在本方案中,将为执行实体分配的物理内存中的数据缓存至选取的未被占用的Cache Set中,并建立分配给执行实体的物理内存与Cache Set的对应关系,无论为执行实体分配的物理内存是否连续,都可以灵活的为执行实体分配物理内存和Cache Set,为不同的执行实体分配不同的Cache Set,避免了多个执行实体共用相同的一个或多个Cache Set的情况,也从而减少了多个执行实体在Cache的使用上产生的干扰,提高了Cache的访存性能。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为本发明实施例提供的一种Cache分区的方法的流程图;
图1a为本发明实施例提供的一种执行实体、物理内存和Cache Set对应关系的举例示意图;
图2为本发明实施例提供的一种Cache分区的方法的一种具体实现方式的流程图;
图2a为本发明实施例提供的一种Cache***的举例结构示意图;
图2b为本发明实施例提供的一种重染色表的示意图;
图3、图4、图5为本发明实施例提供的另一种Cache分区的方法的流程图;
图4a、图4b、图4c为本发明实施例提供的访问Cache Set的举例示意图;
图5a为本发明实施例提供的一种页表缓存项的举例示意图;
图6a、图6b、图6c为本发明实施例提供的另一种Cache分区的方法的一种具 体实现方式的流程图;
图7为本发明实施例提供的一种Cache分区的装置的结构示意图;
图8为本发明实施例提供的一种Cache分区的装置的一种具体实现方式的结构示意图;
图9为本发明实施例提供的另一种Cache分区的装置的结构示意图;
图10为本发明实施例提供的另一种Cache分区的装置的结构示意图;
图11为本发明实施例提供的另一种Cache分区的装置的结构示意图;
图12为本发明实施例提供的另一种Cache分区的装置的一种具体实现方式的结构示意图;
图13为本发明实施例提供的一种Cache分区设备的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
本发明实施例提供的技术方案应用于主机,运行于主机的操作***能够为执行实体灵活的分配物理内存与Cache Set(缓存组)。其中,主机中可以包括虚拟机***下的多虚拟机操作***、众核硬件平台下的多内核操作***或单体***下的多进程调度***,也就是说,执行实体可以是进程、内核或虚拟机等。为了实现本技术方案在主机中的应用,至少需要在主机中的Cache***中添加了Cache分区器件或者Cache分区模块,用来建立、查询为执行实体分配的物理内存和Cache Set的对应关系。本方案可以应用于各级缓存,如:一级缓存、二级缓存、三级缓存等。
本发明实施例提供了一种Cache分区的方法,如图1所示,包括:
101,所述操作***为执行实体分配物理内存。
其中,操作***运行于主机中,主机中包括物理内存和缓存组Cache Set,
其中,执行实体可以是进程、虚拟机或内核等,操作***可以根据每一个执行实体的具体情况以及操作***的策略决策,为执行实体分配合适的物理内存。为执行实体分配的物理内存用于存储执行实体运行时需要的数据,缓存组Cache Set可以用于缓存物理内存中的数据。
需要说明的是,本方案中,为执行实体分配的物理内存可以是连续的,也可以是不连续的,根据执行实体的场景而定,比如:启动场景或者设备直接内存存取的场景,操作***为执行实体分配连续的物理内存;其他的场景,操作***也可以为执行主体分配不连续的物理内存。
102,在所述主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为所述执行主体分配的物理内存中的数据缓存至所述选取的Cache Set中,建立为所述执行主体分配的物理内存与所述选取的Cache Set的对应关系。
其中,主机中往往包括多个缓存组Cache Set,在多个Cache Set中,一部分Cache Set可能已经被其他执行主体所占用,缓存了其他执行主体运行需要的数据;另一部分的Cache Set未被执行主体占用,处于空闲状态,是未被占用的Cache Set。在本实施例中,在主机中的Cache Sets中,选取未被占用的Cache Set,避免与其他执行主体共同占用同一个Cache Set。选取的未被占用的Cache Set可以是一个,也可以是多个。将为执行主体分配的物理内存中的数据缓存至选取的Cache Set中,建立执行实体的物理内存和Cache Set的对应关系,使得一个执行实体的物理内存对应一个Cache Set或多个Cache Set,不同的执行实体的物理内存对应不同的Cache Set。
优选的,分配给执行实体的物理内存与Cache Set的对应关系,可以用为执行实体分配的物理内存地址与Cache Set Mask的对应关系表示,Cache Set Mask用于标识Cache Set。
需要说明的是,在重新为执行实体分配物理内存的情况下,操作***会更新已经建立的对应关系,从而保证执行实体的正常运行。
比如:如图1a所示,在多内核***中,管理内核相当于操作***,管理内核为每一个轻量级内核分配物理内存,选取未被占用的Cache Set(缓存组),将为轻量级内核分配的物理内存中的数据缓存至选取的Cache Set中,建立为轻量级内核分配的物理内存与选取的Cache Set的对应关系,从而可以利用管理内核的缓存分区管理功能,通过缓存性能隔离功能模块为每一个轻量级内核分配对应的Cache Set。当创建、销毁、迁移轻量级内核时,管理内核会重设缓存分区管理功能。
本发明实施例提供的一种Cache分区的方法,能够为执行实体分配物理内存,在主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为执行主体分配的物理内存中的数据缓存至选取的Cache Set中,建立为执行主体分配的物理内存与选取的Cache Set的对应关系。与现有技术中的:根据物理内存的地址的低几位与Cache Set的固定对应关系,需要连续的物理内存的执行实体运行需要的数据缓存于多个不同的Cache Set相比。在本方案中,将为执行实体分配的物理内存中的数据缓存至选取的未被占用的Cache Set中,并建立分配给执行实体的物理内存与Cache Set的对应关系,无论为执行实体分配的物理内存是否连续,都可以灵活的为执行实体分配物理内存和Cache Set,为不同的执行实体分配不同的Cache Set,避免了多个执行实体共用相同的一个或多个Cache Set的情况,也从而减少了多个执行实体在Cache的使用上产生的干扰,提高了 Cache的访存性能。
进一步的,在图1所示的方案的基础上,本发明实施例还提供了一种Cache分区的方法的具体方案,主机包括重染色组件,重染色组件用于读取重染色表,重染色表用于记录分配给执行实体的物理内存和Cache Set的对应关系。本方案对图1所示的方案中的102的执行过程进一步细化,其中,102可以具体实现为1021,如图2所示,包括:
1021,在所述主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为所述执行主体分配的物理内存中的数据缓存至所述选取的Cache Set中,建立所述重染色表,并在所述重染色表中,建立为所述执行主体分配的物理内存地址与缓存组掩码Cache Set Mask的对应关系。
其中,操作***可以用表项的形式记录分配给执行实体的物理内存和Cache Set的对应关系,本方案中,操作***使用重染色表来记录分配给执行实体的物理内存和Cache Set的对应关系。重染色表可以存储在物理内存中,也可以缓存在Cache控制器的缓存寄存器中。
在具体应用中,主机中的缓存Cache***往往包括Cache控制器,可以在Cache控制器中增加Cache分区器件或Cache分区模块,Cache分区器件或Cache分区模块包括重染色组件。也可以下缓存Cache***中的其他器件或部位添加Cache分区器件或Cache分区模块,在这里不做限定。
需要说明的是,一般情况下,重染色表由操作***内核管理、建立、更新;在虚拟机***中,重染色表由VMM(Virtual Machine Manager,虚拟机管理程序)管理、建立、更新;在多内核***中,重染色表由管理内核管理、建立、更新。
进一步的,为了实现本发明的技术方案,可以在主机的Cache***中的Cache 控制器中增添Cache分区模块,如图2a所示,Cache分区模块包括重染色组件、缓存寄存器和控制空间。重染色组件用于读取重染色表,缓存寄存器可以用于缓存重染色表,控制空间提供了一组控制寄存器支持Cache分区模块的启动和初始化。当硬件线程运行时,内存管理单元可以进行虚拟地址和物理地址的转换。
其中,物理内存与Cache Set的对应关系可以用物理内存地址和Cache SetMask(缓存组掩码)表示,Cache Set Mask用于标识Cache Set。如图2b所示的重染色表,将建立的分配给执行实体的物理内存地址与Cache Set Mask的对应关系记录在重染色表中,当执行实体运行时,能够根据重染色表中记录的对应关系,查找为这个执行实体分配的Cache Set,从而获取这个执行实体运行需要的数据。
需要说明的是,重染色表中的物理内存地址范围的大小可以是Cache line的大小,即64bytes,也可以是一个内存页的大小,即4KB,还可以是多个内存页的大小。Cache Set Mask可以标识一个Cache Set,也可以标识多个Cache Set。
在操作***检测到执行实体的更新时,也会同步更新重染色表,具体更新过程如:更新执行实体的数据结构,执行实体的数据结构用于生成重染色表中关于该执行实体的相关数据,操作***根据更新后的执行实体的数据结构,更新重染色表中的对应关系的数据。其中,可以清空对应的Cache line,或者对Cache line进行写回操作。
本发明实施例提供的一种Cache分区的方法,能够为执行实体分配物理内存,在主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为执行主体分配的物理内存中的数据缓存至选取的Cache Set中,建立重染色表,并在重染色表中,建立为执行主体分配的物理内存地址与缓存组掩码Cache SetMask的对应关系。与现有技术中的:根据物理内存的地址的低几位与Cache Set的固定对应关系,需要连续的物理内存的执行实体运行需要的数据缓存于多个 不同的Cache Set相比。在本方案中,将为执行实体分配的物理内存中的数据缓存至选取的未被占用的Cache Set中,并建立分配给执行实体的物理内存与Cache Set的对应关系,无论为执行实体分配的物理内存是否连续,都可以灵活的为执行实体分配物理内存和Cache Set,为不同的执行实体分配不同的Cache Set,避免了多个执行实体共用相同的一个或多个Cache Set的情况,也从而减少了多个执行实体在Cache的使用上产生的干扰,提高了Cache的访存性能。
此外,在图2所示的方案的基础上,本发明实施例还提供了一种Cache分区的方法的具体方案,增添103-105,具体说明在建立了为执行实体分配的物理内存与Cache Set的对应关系后,如何访问执行实体对应的Cache Set,如图3所示,包括:
103,获取所述重染色表。
其中,重染色表可以存储在物理内存中,也可以存储在缓存寄存器中。
104,根据为所述执行主体分配的物理内存地址,在所述重染色表中,查找并获取目标Cache Set Mask。
其中,目标Cache Set Mask与为执行主体分配的物理内存地址对应,重染色表中记录了为所有执行实体分配的物理内存地址和Cache Set Mask的对应关系,根据为执行主体分配的物理内存地址,就可以查找到对应的Cache Set Mask,即目标Cache Set Mask。
105,根据所述目标Cache Set Mask,确定并访问所述目标Cache Set。
其中,目标Cache Set Mask与目标Cache Set对应。
本发明实施例提供的一种Cache分区的方法,能够为执行实体分配物理内存,在主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为执 行主体分配的物理内存中的数据缓存至选取的Cache Set中,建立重染色表,并在重染色表中,建立为执行主体分配的物理内存地址与缓存组掩码Cache SetMask的对应关系;获取重染色表,根据为执行主体分配的物理内存地址,在重染色表中,查找并获取目标Cache Set Mask,根据目标Cache Set Mask,访问目标Cache Set。与现有技术中的:根据物理内存的地址的低几位与Cache Set的固定对应关系,需要连续的物理内存的执行实体运行需要的数据缓存于多个不同的Cache Set相比。在本方案中,将为执行实体分配的物理内存中的数据缓存至选取的未被占用的Cache Set中,并建立分配给执行实体的物理内存与Cache Set的对应关系,无论为执行实体分配的物理内存是否连续,都可以灵活的为执行实体分配物理内存和Cache Set,为不同的执行实体分配不同的Cache Set,避免了多个执行实体共用相同的一个或多个Cache Set的情况,也从而减少了多个执行实体在Cache的使用上产生的干扰,提高了Cache的访存性能。
此外,在图3所示的方案的基础上,本发明实施例还提供了一种Cache分区的方法的具体方案,本方案增添了106-107,如图4所示,包括:
106,将所述目标Cache Set Mask存储至为所述执行主体分配的物理内存地址的影子地址空间Shadow Address Space。
其中,现有的处理器寻址空间范围较大,但是主流处理器的物理内存地址只使用了其中的一部分空间,另一部分没有使用的空间是空闲的,这部分物理内存地址的空闲的空间就是Shadow Address Space。比如:现有64位处理器寻址空间范围是64位,但是主流处理器只使用了物理内存地址的低48位,物理内存地址的高16位基本是空闲的,物理内存地址的高16位就是Shadow Address Space。将Cache Set Mask存储至Shadow Address Space,使得执行实体再次索引目标Cache Set时,就可以通过物理地址的Shadow Address Space来索引Cache Set,提 高了Cache的访存效率。
需要说明的是,105和106在时序上不分先后,可以在105之前执行106,也可以在105之后执行106,还可以同时执行105和106,105和106的时序关系在此不作限定。
107,当所述执行实体再次索引所述目标Cache Set时,根据存储至所述Shadow Address Space的所述目标Cache Set Mask,确定并访问所述目标Cache Set。
比如:如图4a所示,当三级缓存接收到来自二级缓存的请求物理地址时,根据重染色表中的对应关系和Shadow Address Space(影子地址空间),确定并访问目标Cache Set。
需要说明的是,如图4b所示,如果需要对一级缓存等私有Cache进行分区,可以在Cache***进行虚实地址转换时,就在Shadow Address Space(影子地址空间)存储与物理内存地址对应的Cache Set Mask。
可选的,可以在访存请求中增加执行实体标识,来标识发出请求的执行实体,重染色表中也可以记录执行实体标识与Cache Set Mask(缓存组掩码)的对应关系,如图4c所示,可以将执行实体标识存储至Shadow Address Space,根据重染色表中的对应关系和Shadow Address Space(影子地址空间),确定并访问目标Cache Set。
本发明实施例提供的一种Cache分区的方法,能够为执行实体分配物理内存,在主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为执行主体分配的物理内存中的数据缓存至选取的Cache Set中,建立重染色表,并在重染色表中,建立为执行主体分配的物理内存地址与缓存组掩码Cache SetMask的对应关系;获取重染色表,根据为执行主体分配的物理内存地址,在重 染色表中,查找并获取目标Cache Set Mask,根据目标Cache Set Mask,访问目标Cache Set;将目标Cache Set Mask存储至为执行主体分配的物理内存地址的影子地址空间Shadow Address Space,当执行实体再次索引目标Cache Set时,根据存储至Shadow Address Space的目标Cache Set Mask,确定并访问目标Cache Set。与现有技术中的:根据物理内存的地址的低几位与Cache Set的固定对应关系,需要连续的物理内存的执行实体运行需要的数据缓存于多个不同的Cache Set相比。在本方案中,将为执行实体分配的物理内存中的数据缓存至选取的未被占用的Cache Set中,并建立分配给执行实体的物理内存与Cache Set的对应关系,无论为执行实体分配的物理内存是否连续,都可以灵活的为执行实体分配物理内存和Cache Set,为不同的执行实体分配不同的Cache Set,避免了多个执行实体共用相同的一个或多个Cache Set的情况,也从而减少了多个执行实体在Cache的使用上产生的干扰,提高了Cache的访存性能;而且,当执行实体再次索引目标Cache Set时,可以直接利用Shadow Address Space中的Cache Set Mask进行索引,确定并访问目标Cache Set,节省了确定目标Cache Set的时间,提高了Cache访存的效率。
可选的,在图3所示的方案的基础上,本发明实施例还提供了一种Cache分区的方法的具体方案,主机还包括内存管理单元MMU,MMU用于缓存页表缓存项,页表缓存项中包括执行实体的标识ID;本方案增添了108-110,利用页表缓存项,访问目标Cache Set,如图5所示,包括:
108,在所述MMU的页表缓存项中添加与所述执行实体的标识ID对应的所述目标Cache Set Mask。
其中,如图5a所示的页表缓存项,添加与执行实体标识对应的Cache Set Mask,便于通过MMU的页表缓存项确定并访问目标Cache Set。
需要说明的是,105和108在时序上不分先后,可以在105之前执行108,也可以在105之后执行108,还可以同时执行105和108,105和108的时序关系在此不作限定。
109,当所述执行实体再次索引所述目标Cache Set时,根据所述执行实体的标识ID,在所述页表缓存项中得到所述目标Cache Set Mask。
比如:根据如图5a所示的页表缓存项和执行实体的执行实体标识,可以确定目标Cache Set Mask。
110,根据所述目标Cache Set Mask,确定并访问所述目标Cache Set。
本发明实施例提供的一种Cache分区的方法,能够为执行实体分配物理内存,在主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为执行主体分配的物理内存中的数据缓存至选取的Cache Set中,建立重染色表,并在重染色表中,建立为执行主体分配的物理内存地址与缓存组掩码Cache SetMask的对应关系;获取重染色表,根据为执行主体分配的物理内存地址,在重染色表中,查找并获取目标Cache Set Mask,根据目标Cache Set Mask,访问目标Cache Set;在MMU的页表缓存项中添加与执行实体的标识ID对应的目标Cache Set Mask,当执行实体再次索引目标Cache Set时,根据执行实体的标识ID,在页表缓存项中得到目标Cache Set Mask,从而确定并访问目标Cache Set。与现有技术中的:根据物理内存的地址的低几位与Cache Set的固定对应关系,需要连续的物理内存的执行实体运行需要的数据缓存于多个不同的Cache Set相比。在本方案中,将为执行实体分配的物理内存中的数据缓存至选取的未被占用的Cache Set中,并建立分配给执行实体的物理内存与Cache Set的对应关系,无论为执行实体分配的物理内存是否连续,都可以灵活的为执行实体分配物理内存 和Cache Set,为不同的执行实体分配不同的Cache Set,避免了多个执行实体共用相同的一个或多个Cache Set的情况,也从而减少了多个执行实体在Cache的使用上产生的干扰,提高了Cache的访存性能;而且,执行实体再次索引目标Cache Set时,可以直接利用MMU的页表缓存项中的执行实体标识和Cache Set Mask的对应关系进行索引,确定并访问目标Cache Set,节省了确定目标Cache Set的时间,提高了Cache的访存效率。
更进一步的,在图3、图4、图5所示的方案的基础上,本发明实施例还提供了一种Cache分区的方法的具体方案,本方案对图3、图4、图5所示的方案中的103的执行过程进一步细化,其中,103可以具体实现为1031-1033,如图6a、图6b、图6c所示,包括:
1031,检测所述缓存寄存器中是否存在所述重染色表。
其中,Cache***包括缓存寄存器,重染色表可以存储在物理内存中,也可以存储在缓存寄存器中,从缓存寄存器中读取重染色表速度更快。
1032,从所述缓存寄存器中获取所述重染色表。
1033,从物理内存中获取所述重染色表。
本发明实施例提供的一种Cache分区的方法,能够为执行实体分配物理内存,在主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为执行主体分配的物理内存中的数据缓存至选取的Cache Set中,建立重染色表,并在重染色表中,建立为执行主体分配的物理内存地址与缓存组掩码Cache SetMask的对应关系;检测缓存寄存器中是否存重染色表,存在时,从缓存寄存器中获取重染色表,不存在时,从物理内存中获取所述重染色表,根据为执行主体分配的物理内存地址,在重染色表中,查找并获取目标Cache Set Mask,根据 目标Cache Set Mask,访问目标Cache Set。与现有技术中的:根据物理内存的地址的低几位与Cache Set的固定对应关系,需要连续的物理内存的执行实体运行需要的数据缓存于多个不同的Cache Set相比。在本方案中,将为执行实体分配的物理内存中的数据缓存至选取的未被占用的Cache Set中,并建立分配给执行实体的物理内存与Cache Set的对应关系,无论为执行实体分配的物理内存是否连续,都可以灵活的为执行实体分配物理内存和Cache Set,为不同的执行实体分配不同的Cache Set,避免了多个执行实体共用相同的一个或多个Cache Set的情况,也从而减少了多个执行实体在Cache的使用上产生的干扰,提高了Cache的访存性能;而且,从缓存寄存器中获取重染色表的速度更快,首先考虑从缓存寄存器中获取重染色表,节省了确定目标Cache Set的时间,从而提高了Cache的访存效率。
本发明实施例提供了一种Cache分区的装置200,装置200运行有操作***,装置200包括物理内存和缓存组Cache Sets,物理内存用于存储数据,Cache Set用于缓存所述物理内存中的数据,如图7所示,包括:
分配模块201,用于为执行实体分配物理内存。
其中,为执行实体分配的物理内存用于存储执行实体运行时需要的数据。
建立关系模块202,用于在所述主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为所述执行主体分配的物理内存中的数据缓存至所述选取的Cache Set中,建立为所述执行主体分配的物理内存与所述选取的Cache Set的对应关系。
本发明实施例提供的一种Cache分区的装置,能够为执行实体分配物理内存,在主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为执 行主体分配的物理内存中的数据缓存至选取的Cache Set中,建立为执行主体分配的物理内存与选取的Cache Set的对应关系。与现有技术中的:根据物理内存的地址的低几位与Cache Set的固定对应关系,需要连续的物理内存的执行实体运行需要的数据缓存于多个不同的Cache Set相比。在本方案中,将为执行实体分配的物理内存中的数据缓存至选取的未被占用的Cache Set中,并建立分配给执行实体的物理内存与Cache Set的对应关系,无论为执行实体分配的物理内存是否连续,都可以灵活的为执行实体分配物理内存和Cache Set,为不同的执行实体分配不同的Cache Set,避免了多个执行实体共用相同的一个或多个Cache Set的情况,也从而减少了多个执行实体在Cache的使用上产生的干扰,提高了Cache的访存性能。
进一步的,装置200包括重染色组件,重染色组件用于读取重染色表,重染色表用于记录为所述执行主体分配的物理内存与所述选取的Cache Set的对应关系;如图8所示,建立关系模块202,包括:
重染色表单元2021,用于建立所述重染色表,并在所述重染色表中,建立为所述执行主体分配的物理内存地址与缓存组掩码Cache Set Mask的对应关系。
其中,Cache Set Mask用于标识选取的Cache Set。
发明实施例提供的一种Cache分区的装置,能够为执行实体分配物理内存,在主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为执行主体分配的物理内存中的数据缓存至选取的Cache Set中,建立重染色表,并在重染色表中,建立为执行主体分配的物理内存地址与缓存组掩码Cache Set Mask的对应关系。与现有技术中的:根据物理内存的地址的低几位与Cache Set的固定对应关系,需要连续的物理内存的执行实体运行需要的数据缓存于多个不同的 Cache Set相比。在本方案中,将为执行实体分配的物理内存中的数据缓存至选取的未被占用的Cache Set中,并建立分配给执行实体的物理内存与Cache Set的对应关系,无论为执行实体分配的物理内存是否连续,都可以灵活的为执行实体分配物理内存和Cache Set,为不同的执行实体分配不同的Cache Set,避免了多个执行实体共用相同的一个或多个Cache Set的情况,也从而减少了多个执行实体在Cache的使用上产生的干扰,提高了Cache的访存性能。
此外,如图9所示,装置200还包括:
重染色表获取模块203,用于获取所述重染色表。
查找模块204,用于根据为所述执行主体分配的物理内存地址,在所述重染色表中,查找并获取目标Cache Set Mask。
其中,目标Cache Set Mask与为执行实体分配的物理内存地址对应。
第一访问模块205,用于根据所述目标Cache Set Mask,确定并访问所述目标Cache Set。
其中,目标Cache Set Mask与目标Cache Set对应。
本发明实施例提供的一种Cache分区的装置,能够为执行实体分配物理内存,在主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为执行主体分配的物理内存中的数据缓存至选取的Cache Set中,建立重染色表,并在重染色表中,建立为执行主体分配的物理内存地址与缓存组掩码Cache SetMask的对应关系;获取重染色表,根据为执行主体分配的物理内存地址,在重染色表中,查找并获取目标Cache Set Mask,根据目标Cache Set Mask,访问目标Cache Set。与现有技术中的:根据物理内存的地址的低几位与Cache Set的固定对应关系,需要连续的物理内存的执行实体运行需要的数据缓存于多个不同 的Cache Set相比。在本方案中,将为执行实体分配的物理内存中的数据缓存至选取的未被占用的Cache Set中,并建立分配给执行实体的物理内存与Cache Set的对应关系,无论为执行实体分配的物理内存是否连续,都可以灵活的为执行实体分配物理内存和Cache Set,为不同的执行实体分配不同的Cache Set,避免了多个执行实体共用相同的一个或多个Cache Set的情况,也从而减少了多个执行实体在Cache的使用上产生的干扰,提高了Cache的访存性能。
进一步的,如图10所示,装置200包括:
存储模块206,用于将所述目标Cache Set Mask存储至为所述执行实体分配的物理内存地址的影子地址空间Shadow Address Space。
第二访问模块207,用于当所述执行实体再次索引所述目标Cache Set时,根据存储至所述Shadow Address Space的所述目标Cache Set Mask,确定并访问所述目标Cache Set。
本发明实施例提供的一种Cache分区的装置,能够为执行实体分配物理内存,在主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为执行主体分配的物理内存中的数据缓存至选取的Cache Set中,建立重染色表,并在重染色表中,建立为执行主体分配的物理内存地址与缓存组掩码Cache SetMask的对应关系;获取重染色表,根据为执行主体分配的物理内存地址,在重染色表中,查找并获取目标Cache Set Mask,根据目标Cache Set Mask,访问目标Cache Set;将目标Cache Set Mask存储至为执行主体分配的物理内存地址的影子地址空间Shadow Address Space,当执行实体再次索引目标Cache Set时,根据存储至Shadow Address Space的目标Cache Set Mask,确定并访问目标Cache Set。与现有技术中的:根据物理内存的地址的低几位与Cache Set的固定对应关系, 需要连续的物理内存的执行实体运行需要的数据缓存于多个不同的Cache Set相比。在本方案中,将为执行实体分配的物理内存中的数据缓存至选取的未被占用的Cache Set中,并建立分配给执行实体的物理内存与Cache Set的对应关系,无论为执行实体分配的物理内存是否连续,都可以灵活的为执行实体分配物理内存和Cache Set,为不同的执行实体分配不同的Cache Set,避免了多个执行实体共用相同的一个或多个Cache Set的情况,也从而减少了多个执行实体在Cache的使用上产生的干扰,提高了Cache的访存性能;而且,当执行实体再次索引目标Cache Set时,可以直接利用Shadow Address Space中的Cache Set Mask进行索引,确定并访问目标Cache Set,节省了确定目标Cache Set的时间,提高了Cache访存的效率。
进一步的,装置200还包括内存管理单元MMU,MMU用于用于缓存页表缓存项,页表缓存项中包括执行实体的标识ID,如图11所示,装置200还包括:
添加模块208,用于在所述MMU的页表缓存项中添加与所述执行实体的标识ID对应的所述目标Cache Set Mask。
掩码获取模块209,用于当所述执行实体再次索引所述目标Cache Set时,根据所述执行实体的标识ID,在所述页表缓存项中得到所述目标Cache Set Mask。
第三访问模块210,用于根据所述目标Cache Set Mask,确定并访问所述目标Cache Set。
本发明实施例提供的一种Cache分区的装置,能够为执行实体分配物理内存,在主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为执行主体分配的物理内存中的数据缓存至选取的Cache Set中,建立重染色表,并在重染色表中,建立为执行主体分配的物理内存地址与缓存组掩码Cache Set Mask的对应关系;获取重染色表,根据为执行主体分配的物理内存地址,在重染色表中,查找并获取目标Cache Set Mask,根据目标Cache Set Mask,访问目标Cache Set;在MMU的页表缓存项中添加与执行实体的标识ID对应的目标Cache Set Mask,当执行实体再次索引目标Cache Set时,根据执行实体的标识ID,在页表缓存项中得到目标Cache Set Mask,从而确定并访问目标Cache Set。与现有技术中的:根据物理内存的地址的低几位与Cache Set的固定对应关系,需要连续的物理内存的执行实体运行需要的数据缓存于多个不同的Cache Set相比。在本方案中,将为执行实体分配的物理内存中的数据缓存至选取的未被占用的Cache Set中,并建立分配给执行实体的物理内存与Cache Set的对应关系,无论为执行实体分配的物理内存是否连续,都可以灵活的为执行实体分配物理内存和Cache Set,为不同的执行实体分配不同的Cache Set,避免了多个执行实体共用相同的一个或多个Cache Set的情况,也从而减少了多个执行实体在Cache的使用上产生的干扰,提高了Cache的访存性能;而且,执行实体再次索引目标Cache Set时,可以直接利用MMU的页表缓存项中的执行实体标识和Cache Set Mask的对应关系进行索引,确定并访问目标Cache Set,节省了确定目标Cache Set的时间,提高了Cache的访存效率。
更进一步的,Cache***包括缓存寄存器,如图12所示,重染色表获取模块203,包括:
检测单元2031,用于检测所述缓存寄存器中是否存在所述重染色表。
第一获取单元2032,用于当存在时,从所述缓存寄存器中获取所述重染色表。
第二获取单元2033,用于当不存在时,从物理内存中获取所述重染色表。
本发明实施例提供的一种Cache分区的装置,能够为执行实体分配物理内存,在主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为执行主体分配的物理内存中的数据缓存至选取的Cache Set中,建立重染色表,并在重染色表中,建立为执行主体分配的物理内存地址与缓存组掩码Cache SetMask的对应关系;检测缓存寄存器中是否存重染色表,存在时,从缓存寄存器中获取重染色表,不存在时,从物理内存中获取所述重染色表,根据为执行主体分配的物理内存地址,在重染色表中,查找并获取目标Cache Set Mask,根据目标Cache Set Mask,访问目标Cache Set。与现有技术中的:根据物理内存的地址的低几位与Cache Set的固定对应关系,需要连续的物理内存的执行实体运行需要的数据缓存于多个不同的Cache Set相比。在本方案中,将为执行实体分配的物理内存中的数据缓存至选取的未被占用的Cache Set中,并建立分配给执行实体的物理内存与Cache Set的对应关系,无论为执行实体分配的物理内存是否连续,都可以灵活的为执行实体分配物理内存和Cache Set,为不同的执行实体分配不同的Cache Set,避免了多个执行实体共用相同的一个或多个Cache Set的情况,也从而减少了多个执行实体在Cache的使用上产生的干扰,提高了Cache的访存性能;而且,从缓存寄存器中获取重染色表的速度更快,首先考虑从缓存寄存器中获取重染色表,节省了确定目标Cache Set的时间,从而提高了Cache的访存效率。
本发明实施例还提供了一种Cache分区设备300,如图13所示,包括:至少一个处理器301,例如CPU(central process unit),至少一个通信总线302,存储器303。另外,该网络管理服务器300还可以包括至少一个网络接口304和用户接口305。通信总线302用于实现这些组件之间的连接通信。可选的,用户接口305 包括显示器、键盘、鼠标、触摸屏等设备。存储器303包括缓存器Cache,可能包含高速RAM(random access memory)存储器,也可能还包括非易失性存储器(non-volatile memory),例如磁盘存储器。
具体的,存储器303用于存储执行实体运行时需要的数据,还用于存储建立的为执行实体分配的物理内存与Cache Set的对应关系。
进一步的,存储器303还用于存储在重染色表中为执行实体分配的物理内存地址与Cache Set Mask的对应关系,或者执行实体的标识ID与Cache Set Mask的对应关系。
具体的,处理器301可以用于为执行实体分配物理内存;以及,用于在所述主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为所述执行主体分配的物理内存中的数据缓存至所述选取的Cache Set中,建立为所述执行主体分配的物理内存与所述选取的Cache Set的对应关系。
进一步的,处理器301可以用于建立所述重染色表,并在所述重染色表中,建立为所述执行实体分配的物理内存地址与缓存组掩码Cache Set Mask的对应关系,所述Cache Set Mask用于标识选取的Cache Set。
其中,Cache分区设备300包括重染色组件,所述重染色组件用于读取重染色表,所述重染色表用于记录为执行主体分配的物理内存与选取的Cache Set的对应关系。
此外,处理器301可以用于获取所述重染色表;以及,用于根据为所述执行实体分配的物理内存地址,在所述重染色表中,查找并获取目标Cache Set Mask,所述目标Cache Set Mask与为所述执行实体分配的物理内存地址对应;以及,用于根据所述目标Cache Set Mask,确定并访问所述目标Cache Set,所述目标Cache Set Mask与所述目标Cache Set对应。
此外,处理器301还可以用于将所述目标Cache Set Mask存储至为所述执行实体分配的物理内存地址的影子地址空间Shadow Address Space;以及,用于当所述执行实体再次索引所述目标Cache Set时,根据存储至所述Shadow Address Space的所述目标Cache Set Mask,确定并访问所述目标Cache Set。
可选的,处理器301还可以用于在所述MMU的页表缓存项中添加与所述执行实体的标识ID对应的Cache Set Mask;以及,用于当所述执行实体再次索引所述目标Cache Set时,根据所述执行实体的标识ID,在所述页表缓存项中得到所述目标Cache Set Mask;以及,用于根据所述目标Cache Set Mask,确定并访问所述目标Cache Set。
更进一步的,处理器301还可以用于检测所述缓存寄存器中是否存在所述重染色表;以及,用于当存在时,从所述缓存寄存器中获取所述重染色表;以及,用于当不存在时,从物理内存中获取所述重染色表。
本发明实施例提供的一种Cache分区设备,能够为执行实体分配物理内存,在主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为执行主体分配的物理内存中的数据缓存至选取的Cache Set中,建立重染色表,并在重染色表中,建立为执行主体分配的物理内存地址与缓存组掩码Cache Set Mask的对应关系;检测缓存寄存器中是否存重染色表,存在时,从缓存寄存器中获取重染色表,不存在时,从物理内存中获取所述重染色表,根据为执行主体分配的物理内存地址,在重染色表中,查找并获取目标Cache Set Mask,根据目标Cache Set Mask,访问目标Cache Set;将目标Cache Set Mask存储至为执行主体分配的物理内存地址的影子地址空间Shadow Address Space,当执行实体再次索引目标Cache Set时,根据存储至Shadow Address Space的目标Cache Set Mask,确定并访问目标Cache Set;或者,在MMU的页表缓存项中添加与执行实体的标识 ID对应的目标Cache Set Mask,当执行实体再次索引目标Cache Set时,根据执行实体的标识ID,在页表缓存项中得到目标Cache Set Mask,从而确定并访问目标Cache Set。与现有技术中的:根据物理内存的地址的低几位与Cache Set的固定对应关系,需要连续的物理内存的执行实体运行需要的数据缓存于多个不同的Cache Set相比。在本方案中,将为执行实体分配的物理内存中的数据缓存至选取的未被占用的Cache Set中,并建立分配给执行实体的物理内存与Cache Set的对应关系,无论为执行实体分配的物理内存是否连续,都可以灵活的为执行实体分配物理内存和Cache Set,为不同的执行实体分配不同的Cache Set,避免了多个执行实体共用相同的一个或多个Cache Set的情况,也从而减少了多个执行实体在Cache的使用上产生的干扰,提高了Cache的访存性能;而且,当执行实体再次索引目标Cache Set时,可以直接利用Shadow Address Space中的Cache Set Mask进行索引,或者利用MMU的页表缓存项中的执行实体的标识ID和Cache Set Mask进行索引,确定并访问目标Cache Set,节省了确定目标Cache Set的时间,提高了Cache访存的效率;而且,从缓存寄存器中获取重染色表的速度更快,首先考虑从缓存寄存器中获取重染色表,节省了确定目标Cache Set的时间,进一步提高了Cache访存的效率。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于设备实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算 机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。

Claims (12)

  1. 一种Cache分区的方法,用于主机,其特征在于,所述主机运行有操作***,所述主机包括物理内存和缓存组Cache Sets,所述物理内存用于存储数据,所述Cache Set用于缓存所述物理内存中的数据;所述方法包括:
    所述操作***为执行实体分配物理内存,为所述执行实体分配的物理内存用于存储所述执行实体运行时需要的数据;
    在所述主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为所述执行主体分配的物理内存中的数据缓存至所述选取的Cache Set中,建立为所述执行主体分配的物理内存与所述选取的Cache Set的对应关系。
  2. 根据权利要求1所述的方法,其特征在于,所述主机包括重染色组件,所述重染色组件用于读取重染色表,所述重染色表用于记录为所述执行主体分配的物理内存与所述选取的Cache Set的对应关系;所述建立为所述执行主体分配的物理内存与所述选取的Cache Set的对应关系,包括:
    建立所述重染色表,并在所述重染色表中,建立为所述执行主体分配的物理内存地址与缓存组掩码Cache Set Mask的对应关系,所述Cache Set Mask用于标识所述选取的Cache Set。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    获取所述重染色表;
    根据为所述执行主体分配的物理内存地址,在所述重染色表中,查找并获取目标Cache Set Mask,所述目标Cache Set Mask与为所述执行主体分配的物理内存地址对应;
    根据所述目标Cache Set Mask,确定并访问所述目标Cache Set,所述目标Cache Set Mask与所述目标Cache Set对应。
  4. 根据权利要求3所述的方法,其特征在于,在所述查找并获取目标Cache Set Mask之后,包括:
    将所述目标Cache Set Mask存储至为所述执行主体分配的物理内存地址的影子地址空间Shadow Address Space;
    当所述执行实体再次索引所述目标Cache Set时,根据存储至所述Shadow Address Space的所述目标Cache Set Mask,确定并访问所述目标Cache Set。
  5. 根据权利要求3所述的方法,其特征在于,所述主机还包括内存管理单元MMU,所述MMU用于缓存页表缓存项,所述页表缓存项中包括所述执行实体的标识ID;在所述查找并获取目标Cache Set Mask之后,包括:
    在所述MMU的页表缓存项中添加与所述执行实体的标识ID对应的所述目标Cache Set Mask;
    当所述执行实体再次索引所述目标Cache Set时,根据所述执行实体的标识ID,在所述页表缓存项中得到所述目标Cache Set Mask;
    根据所述目标Cache Set Mask,确定并访问所述目标Cache Set。
  6. 根据权利要求3所述的方法,其特征在于,所述主机包括缓存寄存器;所述获取所述重染色表,包括:
    检测所述缓存寄存器中是否存在所述重染色表;
    若存在,则从所述缓存寄存器中获取所述重染色表;
    若不存在,则从物理内存中获取所述重染色表。
  7. 一种Cache分区的装置,其特征在于,所述装置运行有操作***,所述装置包括物理内存和缓存组Cache Sets,所述物理内存用于存储数据,所述Cache Set用于缓存所述物理内存中的数据;所述装置包括:
    分配模块,用于为执行实体分配物理内存,为所述执行实体分配的物理内存用于存储所述执行实体运行时需要的数据;
    建立关系模块,用于在所述主机包括的Cache Sets中,选取未被占用的一个或多个Cache Set,将为所述执行主体分配的物理内存中的数据缓存至所述选取的Cache Set中,建立为所述执行主体分配的物理内存与所述选取的Cache Set的对应关系。
  8. 根据权利要求7所述的装置,其特征在于,所述装置包括重染色组件,所述重染色组件用于读取重染色表,所述重染色表用于记录为所述执行主体分配的物理内存与所述选取的Cache Set的对应关系;所述建立关系模块,包括:
    重染色表单元,用于建立所述重染色表,并在所述重染色表中,建立为所述执行主体分配的物理内存地址与缓存组掩码Cache Set Mask的对应关系,所述Cache Set Mask用于标识所述选取的Cache Set。
  9. 根据权利要求8所述的装置,其特征在于,所述装置还包括:
    重染色表获取模块,用于获取所述重染色表;
    查找模块,用于根据为所述执行主体分配的物理内存地址,在所述重染色表中,查找并获取目标Cache Set Mask,所述目标Cache Set Mask与为所述执行主体分配的物理内存地址对应;
    第一访问模块,用于根据所述目标Cache Set Mask,确定并访问所述目标Cache Set,所述目标Cache Set Mask与所述目标Cache Set对应。
  10. 根据权利要求9所述的装置,其特征在于,所述装置包括:
    存储模块,用于将所述目标Cache Set Mask存储至为所述执行主体分配的物理内存地址的影子地址空间Shadow Address Space;
    第二访问模块,用于当所述执行实体再次索引所述目标Cache Set时,根据 存储至所述Shadow Address Space的所述目标Cache Set Mask,确定并访问所述目标Cache Set。
  11. 根据权利要求9所述的装置,其特征在于,所述装置还包括内存管理单元MMU,所述MMU用于缓存页表缓存项,所述页表缓存项中包括所述执行实体的标识ID;所述装置包括:
    添加模块,用于在所述MMU的页表缓存项中添加与所述执行实体的标识ID对应的所述目标Cache Set Mask;
    掩码获取模块,用于当所述执行实体再次索引所述目标Cache Set时,根据所述执行实体的标识ID,在所述页表缓存项中得到所述目标Cache Set Mask;
    第三访问模块,用于根据所述目标Cache Set Mask,确定并访问所述目标Cache Set。
  12. 根据权利要求9所述的装置,其特征在于,所述装置包括缓存寄存器;所述重染色表获取模块,包括:
    检测单元,用于检测所述缓存寄存器中是否存在所述重染色表;
    第一获取单元,用于当存在时,从所述缓存寄存器中获取所述重染色表;
    第二获取单元,用于当不存在时,从物理内存中获取所述重染色表。
PCT/CN2015/077223 2014-04-24 2015-04-22 一种Cache分区的方法及装置 WO2015161804A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410168515.2A CN105095105B (zh) 2014-04-24 2014-04-24 一种Cache分区的方法及装置
CN201410168515.2 2014-04-24

Publications (1)

Publication Number Publication Date
WO2015161804A1 true WO2015161804A1 (zh) 2015-10-29

Family

ID=54331761

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/077223 WO2015161804A1 (zh) 2014-04-24 2015-04-22 一种Cache分区的方法及装置

Country Status (2)

Country Link
CN (1) CN105095105B (zh)
WO (1) WO2015161804A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112581351A (zh) * 2020-12-05 2021-03-30 西安翔腾微电子科技有限公司 一种双发射simt染色处理单元写回单元结构及写回通路冲突检测方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112799977B (zh) * 2021-02-26 2022-07-19 中国人民解放军国防科技大学 计算机的缓存分区和缓存访问实时性保护方法及装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221538A (zh) * 2008-01-24 2008-07-16 杭州华三通信技术有限公司 实现对缓存中数据快速查找的***和方法
US20090216953A1 (en) * 2008-02-25 2009-08-27 Telefonaktiebolaget Lm Ericsson (Publ) Methods and systems for dynamic cache partitioning for distributed applications operating on multiprocessor architectures
CN101571835A (zh) * 2009-03-26 2009-11-04 浙江大学 基于程序的需求来改变Cache组相联度的实现方法
CN101719105A (zh) * 2009-12-31 2010-06-02 中国科学院计算技术研究所 一种多核***中对内存访问的优化方法和***
CN102323909A (zh) * 2011-09-13 2012-01-18 北京北大众志微***科技有限责任公司 实现使用大容量高速缓存的内存管理方法及装置
CN102521150A (zh) * 2011-11-28 2012-06-27 华为技术有限公司 一种应用程序cache分配方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6446187B1 (en) * 2000-02-19 2002-09-03 Hewlett-Packard Company Virtual address bypassing using local page mask
US8996814B2 (en) * 2010-12-21 2015-03-31 Microsoft Technology Licensing, Llc System and method for providing stealth memory

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221538A (zh) * 2008-01-24 2008-07-16 杭州华三通信技术有限公司 实现对缓存中数据快速查找的***和方法
US20090216953A1 (en) * 2008-02-25 2009-08-27 Telefonaktiebolaget Lm Ericsson (Publ) Methods and systems for dynamic cache partitioning for distributed applications operating on multiprocessor architectures
CN101571835A (zh) * 2009-03-26 2009-11-04 浙江大学 基于程序的需求来改变Cache组相联度的实现方法
CN101719105A (zh) * 2009-12-31 2010-06-02 中国科学院计算技术研究所 一种多核***中对内存访问的优化方法和***
CN102323909A (zh) * 2011-09-13 2012-01-18 北京北大众志微***科技有限责任公司 实现使用大容量高速缓存的内存管理方法及装置
CN102521150A (zh) * 2011-11-28 2012-06-27 华为技术有限公司 一种应用程序cache分配方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112581351A (zh) * 2020-12-05 2021-03-30 西安翔腾微电子科技有限公司 一种双发射simt染色处理单元写回单元结构及写回通路冲突检测方法

Also Published As

Publication number Publication date
CN105095105A (zh) 2015-11-25
CN105095105B (zh) 2018-07-03

Similar Documents

Publication Publication Date Title
US10552337B2 (en) Memory management and device
US8261267B2 (en) Virtual machine monitor having mapping data generator for mapping virtual page of the virtual memory to a physical memory
US9223712B2 (en) Data cache method, device, and system in a multi-node system
CN114860163B (zh) 一种存储***、内存管理方法和管理节点
KR20120068454A (ko) 원격 페이지 폴트 처리 장치 및 그 방법
JP2000506659A (ja) マルチプロセッサデータ処理システム内でメモリを割り当てる方法
US10824555B2 (en) Method and system for flash-aware heap memory management wherein responsive to a page fault, mapping a physical page (of a logical segment) that was previously reserved in response to another page fault for another page in the first logical segment
JP2018518733A (ja) ファイル操作方法及び装置
US10108553B2 (en) Memory management method and device and memory controller
KR101587579B1 (ko) 가상화 시스템에서 메모리 조정방법
WO2021047425A1 (zh) 一种持久性内存的虚拟化方法及***
US20210191777A1 (en) Memory Allocation in a Hierarchical Memory System
US20140289739A1 (en) Allocating and sharing a data object among program instances
WO2015161804A1 (zh) 一种Cache分区的方法及装置
CN113010452A (zh) 一种高效且支持QoS的虚拟内存架构
US10341177B2 (en) Parallel computing system and migration method
US20220382672A1 (en) Paging in thin-provisioned disaggregated memory
US20220237126A1 (en) Page table manager
JPWO2021218038A5 (zh)
CN115729438A (zh) 数据访问方法、装置及存储介质
US11687359B2 (en) Hybrid memory management apparatus and method for many-to-one virtualization environment
KR102565873B1 (ko) Numa 시스템에서 메모리 버스에 연결하여 사용하는 저장장치의 할당 방법
US20230168822A1 (en) Memory management method and semiconductor device adjusting size of contiguous memory allocation area
US11714753B2 (en) Methods and nodes for handling memory
CN115756742A (zh) 直通i/o虚拟化的性能优化设计方法、***、介质及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15783688

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15783688

Country of ref document: EP

Kind code of ref document: A1