技术领域technical field
本发明涉及数据缓存技术领域,特别是涉及一种缓存组负载均衡的方法、装置和计算机可读存储介质。The present invention relates to the technical field of data caching, in particular to a method, device and computer-readable storage medium for caching group load balancing.
背景技术Background technique
相比于片上的中央处理器(Central Processing Unit,CPU),片外主存的高延迟和低带宽一直是影响系统性能的瓶颈。为减轻片外主存和CPU的性能差距,芯片内部都设有缓存空间,存放那些可能被频繁访问的指令和数据,以减少对片外主存的访问。因此,能否有效地利用片上缓存的空间资源,对系统的性能起着至关重要的作用。Compared with the on-chip central processing unit (Central Processing Unit, CPU), the high latency and low bandwidth of off-chip main memory have always been the bottleneck affecting system performance. In order to alleviate the performance gap between the off-chip main memory and the CPU, there is a cache space inside the chip to store instructions and data that may be frequently accessed to reduce access to the off-chip main memory. Therefore, whether the space resources of the on-chip cache can be effectively used plays a vital role in the performance of the system.
片上缓存通常都采用组相联(set-associative)的映射方式,缓存分为多个组(set),每组包含相同的路数(way),每一路缓存区域即为一个缓存行。路数的取值通常为2的幂次方,比如8路或16路。On-chip caches usually use set-associative mapping. The cache is divided into multiple sets. Each set contains the same number of ways. Each way cache area is a cache line. The value of the number of channels is usually a power of 2, such as 8 channels or 16 channels.
当前缓存通常采用最近最少使用(Least Recently Used,LRU)管理策略进行管理,其可分为三个子策略:1)插入策略,第一次访问的数据被插入到对应缓存组的最高优先级的缓存行中;2)提升策略,缓存组中某个缓存行被访问命中,就把命中的缓存行提升到当前组的最高优先级位置;3)替换策略,缓存组的所有缓存行都已被填充数据,当需要插入新的数据时,选择把最低优先级位置的缓存行数据替换出当前缓存组。The current cache is usually managed by the Least Recently Used (LRU) management strategy, which can be divided into three sub-strategies: 1) Insertion strategy, the data accessed for the first time is inserted into the highest priority cache of the corresponding cache group 2) promotion policy, when a cache line in the cache group is accessed and hit, the hit cache line is promoted to the highest priority position of the current group; 3) replacement policy, all cache lines in the cache group have been filled Data, when new data needs to be inserted, choose to replace the cache line data at the lowest priority position out of the current cache group.
基于当前缓存组的缓存设计,主存访问的压力在片上缓存组间并非都是均匀分布。在程序执行期间,某些缓存组被频繁访问,承担的工作集超过其缓存组的容量,导致其命中率很低;而有些缓存组的某些缓存行可能并没有被有效地利用,存在资源浪费的现象。Based on the cache design of the current cache group, the pressure of main memory access is not uniformly distributed among the on-chip cache groups. During the execution of the program, some cache groups are frequently accessed, and the working set undertaken exceeds the capacity of the cache group, resulting in a low hit rate; and some cache lines of some cache groups may not be effectively used, and there are resources The phenomenon of waste.
针对这种组间压力不均匀的问题,一种比较直观的解决方法是增加组相连度,即增大缓存组的路数,比如先前8路,可增大至16路。这种增加组相连度的方式,就像把两个组进行合并,以分摊两个组的工作集,达到低压力的缓存组分担高压力缓存组的目的。然而,这种增加组相连度的方式,不仅会增加缓存访问的延迟和能耗,而且会导致缓存管理的复杂度上升。并且增加组相连度并不会提高缓存组总的命中率。To solve the problem of uneven pressure between groups, a more intuitive solution is to increase the degree of group connectivity, that is, increase the number of ways in the cache group, for example, the previous 8 ways can be increased to 16 ways. This method of increasing group connectivity is like merging two groups to share the working sets of the two groups, so that the low-pressure cache group can share the high-pressure cache group. However, this method of increasing group associativity will not only increase the delay and energy consumption of cache access, but also increase the complexity of cache management. And increasing the group associativity will not improve the total hit rate of the cache group.
可见,如何解决片上缓存组间压力不均匀的问题,是本领域技术人员亟待解决的问题。It can be seen that how to solve the problem of uneven pressure among on-chip cache groups is an urgent problem to be solved by those skilled in the art.
发明内容Contents of the invention
本发明实施例的目的是提供一种缓存组负载均衡的方法、装置和计算机可读存储介质,可以解决片上缓存组间压力不均匀的问题,提高缓存组的利用率以及缓存命中率。The purpose of the embodiments of the present invention is to provide a cache group load balancing method, device and computer-readable storage medium, which can solve the problem of uneven pressure among on-chip cache groups, and improve the utilization rate and cache hit rate of cache groups.
为解决上述技术问题,本发明实施例提供一种缓存组负载均衡的方法,包括:In order to solve the above technical problems, an embodiment of the present invention provides a method for load balancing a cache group, including:
依据访问地址中携带的组号,从所有缓存组中查找所述组号对应的第一缓存组;Searching for the first cache group corresponding to the group number from all cache groups according to the group number carried in the access address;
判断所述第一缓存组中是否存储有所述访问地址对应的数据;judging whether data corresponding to the access address is stored in the first cache group;
若所述第一缓存组中未存储所述访问地址对应的数据,则依据预先划分的联合组,查找与所述第一缓存组相关联的第二缓存组;If the data corresponding to the access address is not stored in the first cache group, search for a second cache group associated with the first cache group according to the pre-divided association group;
判断所述第一缓存组是否达到饱和状态,并且所述第二缓存组的剩余存储空间是否满足预设条件;judging whether the first cache group is saturated, and whether the remaining storage space of the second cache group satisfies a preset condition;
若是,则将所述第一缓存组中优先级最低的缓存行存储的数据转移至所述第二缓存组中,并将所述访问地址对应的数据存储于所述第一缓存组中。If so, transfer the data stored in the cache line with the lowest priority in the first cache group to the second cache group, and store the data corresponding to the access address in the first cache group.
可选的,所述联合组的划分过程包括:Optionally, the division process of the joint group includes:
依据各个缓存组对应的二进制组号,将最高位相反、其余位相同的两个二进制组号对应的缓存组划分为一个联合组。According to the binary group numbers corresponding to each cache group, the cache groups corresponding to the two binary group numbers whose highest bit is opposite and the remaining bits are the same are divided into a joint group.
可选的,所述将所述访问地址对应的数据存储于所述第一缓存组中包括:Optionally, storing the data corresponding to the access address in the first cache group includes:
将所述第一缓存组中各个缓存行中存储的数据依次转移至优先级低一级的缓存行,并将所述访问地址对应的数据存储于所述第一缓存组中优先级最高的缓存行中。sequentially transferring the data stored in each cache line in the first cache group to a cache line with a lower priority level, and storing the data corresponding to the access address in the cache with the highest priority in the first cache group in line.
可选的,所述将所述第一缓存组中优先级最低的缓存行存储的数据转移至所述第二缓存组中包括:Optionally, the transferring the data stored in the cache line with the lowest priority in the first cache group to the second cache group includes:
依据所述第二缓存组包含的缓存行的个数,将所述第二缓存组中间位置的缓存行作为目标缓存行;并将所述第一缓存组中优先级最低的缓存行存储的数据转移至所述目标缓存行中。According to the number of cache lines contained in the second cache group, the cache line in the middle position of the second cache group is used as the target cache line; and the data stored in the cache line with the lowest priority in the first cache group Moved into the target cache line.
可选的,还包括:Optionally, also include:
在每个缓存行中添加一个替换标记位,当第一缓存行中的数据转移至第二缓存行时,则修改所述第二缓存行的替换标记位的状态值;其中,所述第一缓存行所属的缓存组,与所述第二缓存行所属的缓存组为两个不同的缓存组,并且所述两个不同的缓存组属于同一个联合组。Add a replacement tag bit in each cache line, and when the data in the first cache line is transferred to the second cache line, modify the state value of the replacement tag bit of the second cache line; wherein, the first The cache group to which the cache line belongs is two different cache groups from the cache group to which the second cache line belongs, and the two different cache groups belong to the same association group.
可选的,还包括:Optionally, also include:
在每个缓存组中添加一个查找标记位,当所述第一缓存组中优先级最低的缓存行存储的数据转移至所述第二缓存组中时,则修改所述第一缓存组的查找标记位的状态值。Add a lookup flag bit in each cache group, and when the data stored in the cache line with the lowest priority in the first cache group is transferred to the second cache group, the lookup of the first cache group is modified The state value of the flag bit.
本发明实施例还提供了一种缓存组负载均衡的装置,包括查找单元、第一判断单元、第二判断单元、转移单元和存储单元;The embodiment of the present invention also provides a cache group load balancing device, including a search unit, a first judgment unit, a second judgment unit, a transfer unit, and a storage unit;
所述查找单元,用于依据访问地址中携带的组号,从所有缓存组中查找所述组号对应的第一缓存组;The search unit is configured to search for the first cache group corresponding to the group number from all cache groups according to the group number carried in the access address;
所述第一判断单元,用于判断所述第一缓存组中是否存储有所述访问地址对应的数据;The first judging unit is configured to judge whether data corresponding to the access address is stored in the first cache group;
若所述第一缓存组中未存储所述访问地址对应的数据,则触发所述查找单元,所述查找单元还用于依据预先划分的联合组,查找与所述第一缓存组相关联的第二缓存组;If the data corresponding to the access address is not stored in the first cache group, the search unit is triggered, and the search unit is further configured to search for the data associated with the first cache group according to the pre-divided association group. the second cache group;
所述第二判断单元,用于判断所述第一缓存组是否达到饱和状态,并且所述第二缓存组的剩余存储空间是否满足预设条件;The second judging unit is configured to judge whether the first cache group is saturated, and whether the remaining storage space of the second cache group satisfies a preset condition;
若是,则触发所述转移单元,所述转移单元,用于将所述第一缓存组中优先级最低的缓存行存储的数据转移至所述第二缓存组中;If so, trigger the transfer unit, the transfer unit is configured to transfer the data stored in the cache line with the lowest priority in the first cache group to the second cache group;
所述存储单元,用于将所述访问地址对应的数据存储于所述第一缓存组中。The storage unit is configured to store the data corresponding to the access address in the first cache group.
可选的,还包括划分单元,所述划分单元,用于依据各个缓存组对应的二进制组号,将最高位相反、其余位相同的两个二进制组号对应的缓存组划分为一个联合组。Optionally, a division unit is also included, the division unit is configured to divide the cache groups corresponding to two binary group numbers with opposite highest bits and the same remaining bits into a joint group according to the binary group numbers corresponding to each cache group.
可选的,所述存储单元具体用于将所述第一缓存组中各个缓存行中存储的数据依次转移至优先级低一级的缓存行,并将所述访问地址对应的数据存储于所述第一缓存组中优先级最高的缓存行中。Optionally, the storage unit is specifically configured to sequentially transfer the data stored in each cache line in the first cache group to a cache line with a lower priority, and store the data corresponding to the access address in the cache line. in the cache line with the highest priority in the first cache group.
可选的,所述转移单元具体用于依据所述第二缓存组包含的缓存行的个数,将所述第二缓存组中间位置的缓存行作为目标缓存行;并将所述第一缓存组中优先级最低的缓存行存储的数据转移至所述目标缓存行中。Optionally, the transfer unit is specifically configured to use the cache line in the middle position of the second cache set as the target cache line according to the number of cache lines included in the second cache set; The data stored in the cache line with the lowest priority in the group is transferred to the target cache line.
可选的,还包括添加单元和修改单元;Optionally, it also includes adding units and modifying units;
所述添加单元,用于在每个缓存行中添加一个替换标记位;The adding unit is used to add a replacement flag bit in each cache line;
当第一缓存行中的数据转移至第二缓存行时,则触发所述修改单元,所述修改单元,用于修改所述第二缓存行的替换标记位的状态值;其中,所述第一缓存行所属的缓存组,与所述第二缓存行所属的缓存组为两个不同的缓存组,并且所述两个不同的缓存组属于同一个联合组。When the data in the first cache line is transferred to the second cache line, the modification unit is triggered, and the modification unit is used to modify the state value of the replacement flag bit of the second cache line; wherein, the first cache line The cache group to which a cache line belongs is two different cache groups from the cache group to which the second cache line belongs, and the two different cache groups belong to the same association group.
可选的,所述添加单元还用于在每个缓存组中添加一个查找标记位;Optionally, the adding unit is also used to add a lookup flag bit in each cache group;
当所述第一缓存组中优先级最低的缓存行存储的数据转移至所述第二缓存组中时,则触发所述修改单元,所述修改单元还用于修改所述第一缓存组的查找标记位的状态值。When the data stored in the cache line with the lowest priority in the first cache group is transferred to the second cache group, the modification unit is triggered, and the modification unit is also used to modify the data of the first cache group Find the state value of a flag bit.
本发明实施例还提供了一种缓存组负载均衡的装置,包括:The embodiment of the present invention also provides a cache group load balancing device, including:
存储器,用于存储计算机程序;memory for storing computer programs;
处理器,用于执行所述计算机程序以实现如上述缓存组负载均衡的方法的步骤。A processor, configured to execute the computer program to implement the steps of the above method for cache group load balancing.
本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上述缓存组负载均衡的方法的步骤。An embodiment of the present invention also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned cache group load balancing method are implemented.
由上述技术方案可以看出,系统依据访问地址中携带的组号,从所有缓存组中查找所述组号对应的第一缓存组;判断第一缓存组中是否存储有所述访问地址对应的数据;当第一缓存组中未存储所述访问地址对应的数据时,则依据预先划分的联合组,查找与第一缓存组相关联的第二缓存组,并判断第一缓存组是否达到饱和状态,以及第二缓存组的剩余存储空间是否满足预设条件;当这两个条件均满足时,则说明第二缓存组具有足够的空间容纳第一缓存组中需要转移的数据,此时可以将第一缓存组中优先级最低的缓存行存储的数据转移至第二缓存组中,并将所述访问地址对应的数据存储于所述第一缓存组中。该技术方案中,通过将缓存组进行联合,从而可以将压力较大的缓存组中的数据转移至压力较小的缓存组中,有效地解决片上缓存组间压力不均匀的问题,提高了缓存组的利用率以及缓存命中率。It can be seen from the above technical solution that, according to the group number carried in the access address, the system searches all cache groups for the first cache group corresponding to the group number; and judges whether the first cache group stores the first cache group corresponding to the access address. data; when the data corresponding to the access address is not stored in the first cache group, then according to the pre-divided joint group, search for the second cache group associated with the first cache group, and determine whether the first cache group is saturated state, and whether the remaining storage space of the second cache group satisfies the preset conditions; when these two conditions are met, it means that the second cache group has enough space to accommodate the data that needs to be transferred in the first cache group. The data stored in the cache line with the lowest priority in the first cache group is transferred to the second cache group, and the data corresponding to the access address is stored in the first cache group. In this technical solution, by combining the cache groups, the data in the cache group with higher pressure can be transferred to the cache group with less pressure, which effectively solves the problem of uneven pressure between the on-chip cache groups and improves the cache performance. Group utilization and cache hit ratio.
附图说明Description of drawings
为了更清楚地说明本发明实施例,下面将对实施例中所需要使用的附图做简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the embodiments of the present invention more clearly, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. As far as people are concerned, other drawings can also be obtained based on these drawings on the premise of not paying creative work.
图1为本发明实施例提供的一种缓存组负载均衡的方法的流程图;FIG. 1 is a flowchart of a method for caching group load balancing provided by an embodiment of the present invention;
图2为本发明实施例提供的一种缓存组负载均衡的装置的结构示意图;FIG. 2 is a schematic structural diagram of a cache group load balancing device provided by an embodiment of the present invention;
图3为本发明实施例提供的一种缓存组负载均衡的装置的硬件结构示意图。FIG. 3 is a schematic diagram of a hardware structure of an apparatus for caching group load balancing provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下,所获得的所有其他实施例,都属于本发明保护范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。In order to enable those skilled in the art to better understand the solution of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
接下来,详细介绍本发明实施例所提供的一种缓存组负载均衡的方法。图1为本发明实施例提供的一种缓存组负载均衡的方法的流程图,该方法包括:Next, a cache group load balancing method provided by an embodiment of the present invention is introduced in detail. Fig. 1 is a flow chart of a method for caching group load balancing provided by an embodiment of the present invention, the method comprising:
S101:依据访问地址中携带的组号,从所有缓存组中查找所述组号对应的第一缓存组。S101: Search all cache groups for a first cache group corresponding to the group number according to the group number carried in the access address.
片上缓存可以划分成多个缓存组,每个缓存组有其对应的一个组号,例如,片上缓存包含有10个缓存组,其对应的组号依次为0-9。The on-chip cache can be divided into multiple cache groups, and each cache group has a corresponding group number. For example, the on-chip cache includes 10 cache groups, and the corresponding group numbers are 0-9 in sequence.
在一个访问地址中可以包含有标签信息(tags)和组号,依据该组号可以确定系统所要访问的是哪一个缓存组。An access address may include tag information (tags) and a group number, which cache group the system is to access can be determined according to the group number.
S102:判断所述第一缓存组中是否存储有所述访问地址对应的数据。S102: Determine whether data corresponding to the access address is stored in the first cache group.
一个缓存组可以包含有多个缓存行,每个缓存行中可以存储相应的数据。标签信息代表数据的一个标识,在具体实现中,可以依据标签信息,判断缓存组中是否存储有访问地址对应的数据。A cache group can contain multiple cache lines, and each cache line can store corresponding data. The tag information represents an identifier of the data. In specific implementation, it can be determined whether the data corresponding to the access address is stored in the cache group according to the tag information.
当第一缓存组中存在与访问地址中标签信息相同的标签信息时,则说明第一缓存组中已经存储了访问地址对应的数据;当第一缓存组中不存在与访问地址中标签信息相同的标签信息时,则说明第一缓存组未存储有访问地址对应的数据,此时需要将该访问地址对应的数据存储于第一缓存组中,但是考虑到第一缓存组的缓存空间有限,在将数据存储于第一缓存组之前,需要进行相应的判断。当所述第一缓存组中未存储所述访问地址对应的数据时,执行S103。When there is the same tag information as the tag information in the access address in the first cache group, it means that the data corresponding to the access address has been stored in the first cache group; tag information, it means that the first cache group does not store the data corresponding to the access address. At this time, the data corresponding to the access address needs to be stored in the first cache group. However, considering the limited cache space of the first cache group, Before storing the data in the first cache group, a corresponding judgment needs to be made. When the data corresponding to the access address is not stored in the first cache group, perform S103.
S103:依据预先划分的联合组,查找与所述第一缓存组相关联的第二缓存组。S103: Search for a second cache group associated with the first cache group according to the pre-divided association groups.
在本发明实施例中,为了有效解决缓存组间压力不均匀的问题,可以将缓存组进行联合,例如,可以将两个缓存组划分为一个联合组。这两个缓存组的压力往往不同,当这个联合组中的任意一个缓存组压力较大,导致缓存命中率较低时,则可以将压力较大的缓存组中数据转移至另一个压力较小的缓存组中,以实现压力的均衡。In the embodiment of the present invention, in order to effectively solve the problem of uneven pressure among cache groups, the cache groups may be combined, for example, two cache groups may be divided into one combined group. The pressure of these two cache groups is often different. When the pressure of any one of the cache groups in this joint group is high, resulting in a low cache hit rate, the data in the cache group with high pressure can be transferred to another cache group with low pressure. In the cache group, in order to achieve the balance of pressure.
在本发明实施例中,可以依据各缓存组的组号,进行联合组的划分。具体的,可以依据各个缓存组对应的二进制组号,将最高位相反、其余位相同的两个二进制组号对应的缓存组划分为一个联合组。In the embodiment of the present invention, the joint groups may be divided according to the group numbers of each cache group. Specifically, according to the binary group numbers corresponding to each cache group, the cache groups corresponding to the two binary group numbers whose highest bits are opposite and whose remaining bits are the same may be divided into a joint group.
例如,二进制组号占用4位,第一缓存组的组号为5,其二进制形式为0101B;与该二进制组号最高位相反,其余位相同的二进制组号为1101B,即组号13,因此,可以将组号为5的缓存组和组号为13的缓存组作为一个联合组。For example, the binary group number occupies 4 bits, the group number of the first cache group is 5, and its binary form is 0101B; contrary to the highest bit of the binary group number, the binary group number with the same remaining bits is 1101B, that is, group number 13, so , the cache group with group number 5 and the cache group with group number 13 can be used as a joint group.
为了便于后续介绍,可以将与第一缓存组属于同一个联合组的缓存组称作第二缓存组。For the convenience of subsequent introductions, the cache group that belongs to the same joint group as the first cache group may be referred to as a second cache group.
S104:判断所述第一缓存组是否达到饱和状态,并且所述第二缓存组的剩余存储空间是否满足预设条件。S104: Determine whether the first cache group has reached a saturated state, and whether the remaining storage space of the second cache group satisfies a preset condition.
在本发明实施例中,为了更加准确的统计各缓存组的压力状态,可以对各缓存组所承载的压力进行量化统计。具体的,可以在每个缓存组中添加一个饱和计数器(Saturating Counter,SC),当缓存组中并未存储访问地址对应的数据时,也即出现命中缺失时,则将该缓存组的饱和计数器加1;当缓存组中存储有访问地址对应的数据时,也即命中时,则将该缓存组的饱和计数器减1。In the embodiment of the present invention, in order to more accurately count the pressure status of each cache group, quantitative statistics may be performed on the pressure carried by each cache group. Specifically, a saturation counter (Saturating Counter, SC) can be added in each cache group. When the data corresponding to the access address is not stored in the cache group, that is, when a miss occurs, the saturation counter of the cache group is Add 1; when the data corresponding to the access address is stored in the cache group, that is, when there is a hit, the saturation counter of the cache group is decremented by 1.
饱和计数器的计数值反映了缓存组所承载的压力程度,饱和计数器的计数值越高,表明该缓存组的压力越大,其命中率越低。The count value of the saturation counter reflects the degree of pressure carried by the cache group. The higher the count value of the saturation counter, the greater the pressure of the cache group and the lower its hit rate.
对于饱和计数器的计数值的范围,可以依据缓存组的组相连度设置。计数值往往以二进制形式表示,相应的,饱和计数器计数值的位数可以按照1+log2k设置,其中,k表示缓存组的组相连度,即缓存组中包含的缓存行的个数。The range of the count value of the saturation counter may be set according to the group associativity of the cache group. The count value is often expressed in binary form. Correspondingly, the number of digits of the saturation counter count value can be set according to 1+log2 k, where k represents the group connectivity of the cache group, that is, the number of cache lines contained in the cache group.
例如,第一缓存组的组相连度为8,则饱和计数器计数值的位数为1+log28=4,也即计数值范围为[0,15]。For example, if the group associativity degree of the first cache group is 8, then the number of digits of the count value of the saturation counter is 1+log2 8=4, that is, the range of the count value is [0, 15].
饱和状态可以是缓存组的一个极限状态,在本发明实施例中,可以将饱和状态设定为饱和计数器的计数值达到2k-1。The saturation state may be a limit state of the cache group. In the embodiment of the present invention, the saturation state may be set when the count value of the saturation counter reaches 2k-1.
缓存组的剩余存储空间是否满足预设条件,可以设定为缓存组的饱和计数器的计数值是否小于k。当缓存组的饱和计数器的计数值小于k时,则说明该缓存组的剩余存储空间满足预设条件,可以用于存储其相关联的缓存组转移来的数据;当缓存组的饱和计数器的计数值大于等于k时,则说明该缓存组的剩余存储空间不满足预设条件,不适合存储其相关联的缓存组转移来的数据。Whether the remaining storage space of the cache group satisfies a preset condition may be set as whether the count value of the saturation counter of the cache group is less than k. When the count value of the saturation counter of the cache group is less than k, it indicates that the remaining storage space of the cache group satisfies the preset condition and can be used to store the data transferred from its associated cache group; when the count of the saturation counter of the cache group When the value is greater than or equal to k, it indicates that the remaining storage space of the cache group does not meet the preset conditions and is not suitable for storing the data transferred from its associated cache group.
当第一缓存组达到饱和状态,并且第二缓存组的剩余存储空间满足预设条件,则可以执行S105;也即当这两个条件同时满足时,缓存行数据在组间交换的操作才能进行,否则按照传统方式,将缓存行数据送到下级存储层中。When the first cache group is saturated and the remaining storage space of the second cache group satisfies the preset condition, S105 can be executed; that is, when the two conditions are met at the same time, the operation of exchanging cache line data between groups can be performed , otherwise, the cache line data is sent to the lower storage layer in the traditional way.
S105:将所述第一缓存组中优先级最低的缓存行存储的数据转移至所述第二缓存组中,并将所述访问地址对应的数据存储于所述第一缓存组中。S105: Transfer the data stored in the cache line with the lowest priority in the first cache group to the second cache group, and store the data corresponding to the access address in the first cache group.
缓存组中的数据往往按照优先级顺序依次存储,第一个缓存行的优先级最高,最后一个缓存行的优先级最低。The data in the cache group is usually stored in order of priority, with the first cache line having the highest priority and the last cache line having the lowest priority.
如果将第一缓存组中优先级最低的缓存行存储的数据插入到第二缓存组中最高优先级位置,会对联合缓存组的命中率产生较大的影响;但是若将该数据插入到最低优先级位置,又达不到预想的效果,因为若插入到最低优先级位置会很快被替换出去,不能被再次命中。If the data stored in the cache line with the lowest priority in the first cache group is inserted into the highest priority position in the second cache group, it will have a greater impact on the hit rate of the joint cache group; but if the data is inserted into the lowest The priority position cannot achieve the expected effect, because if it is inserted into the lowest priority position, it will be replaced quickly and cannot be hit again.
故此,在本发明实施例中,可以依据所述第二缓存组包含的缓存行的个数,将所述第二缓存组中间位置的缓存行作为目标缓存行;从而将第一缓存组中优先级最低的缓存行存储的数据转移至所述目标缓存行中。Therefore, in the embodiment of the present invention, according to the number of cache lines contained in the second cache group, the cache line in the middle position of the second cache group can be used as the target cache line; The data stored in the lowest-level cache line is transferred to the target cache line.
例如,第二缓存组包含的缓存行的个数为8即k=8,则可以选取第k/2=4个缓存行作为目标缓存行,用来存储第一缓存组转移来的数据。若第4个缓存行已经存储有数据,则可以将第4缓存行以及后续存储有数据的缓存行依次转移至优先级低一级的缓存行,从而空出第4个缓存行用于存储第一缓存组转移来的数据。For example, if the number of cache lines included in the second cache group is 8, that is, k=8, then the k/2=4th cache line may be selected as the target cache line to store the data transferred from the first cache group. If data is already stored in the fourth cache line, the fourth cache line and subsequent cache lines with data stored therein can be sequentially transferred to a cache line with a lower priority level, thereby freeing up the fourth cache line for storing the first cache line. A cache set of transferred data.
在实际应用中,往往将内存访问引入的数据存储在缓存组优先级最高的位置,故此,当第一缓存组中优先级最低的缓存行存储的数据转移至第二缓存组后,可以将所述第一缓存组中各个缓存行中存储的数据依次转移至优先级低一级的缓存行,并将所述访问地址对应的数据存储于所述第一缓存组中优先级最高的缓存行中。In practical applications, the data introduced by memory access is often stored in the cache group with the highest priority. Therefore, when the data stored in the cache line with the lowest priority in the first cache group is transferred to the second cache group, all The data stored in each cache line in the first cache group is sequentially transferred to the cache line with a lower priority level, and the data corresponding to the access address is stored in the cache line with the highest priority in the first cache group .
如表1所示,片上缓存共有四个缓存组,组号依次为0、1、2和3,缓存组的组相连度k=2,依据上述联合组的划分方式可知,组号0和组号2的两个缓存组为一个联合组;组号1和组号3的两个缓存组为一个联合组。表1中标头为“tags”的第2列数据表示各缓存行的标签信息;标头为“SC”的第5列数据表示各缓存组的饱和计数器的计数值。As shown in Table 1, there are four cache groups in the on-chip cache, the group numbers are 0, 1, 2, and 3 in sequence, and the group connectivity of the cache groups is k=2. The two cache groups of No. 2 are a union group; the two cache groups of group No. 1 and group No. 3 are a union group. The data in the second column with the header "tags" in Table 1 indicates the tag information of each cache line; the data in the fifth column with the header "SC" indicates the count value of the saturation counter of each cache group.
表1Table 1
以7位的访问地址为例,前5位代表标签信息tags,后2位代表组号,假设访问地址为“1111000”,表示系统需要访问组号为0的缓存组,由表1可知,组号为0的缓存组中并不存在“11110”,也即该缓存组中未存储该访问地址对应的数据。为方便介绍,用setx表示组号为x(0、1、2或3)的缓存组。因为set0的SC=3(2k-1),说明set0达到了饱和状态,与其相关联的set2的SC=1(小于k),说明set2的剩余存储空间满足预设条件,所以可以将set0中缓存行“10010”的数据转移至set2的第一行(k/2)中,并将“11110”对应的数据写入set0的第一行,数据转移后的片上缓存的数据分布如表2所示。Take the 7-digit access address as an example, the first 5 digits represent the tag information tags, and the last 2 digits represent the group number. Assume that the access address is "1111000", which means that the system needs to access the cache group whose group number is 0. As can be seen from Table 1, the group "11110" does not exist in the cache group numbered 0, that is, the data corresponding to the access address is not stored in the cache group. For the convenience of introduction, setx is used to represent the cache group whose group number is x (0, 1, 2 or 3). Because the SC of set0=3(2k-1), it means that set0 has reached a saturated state, and the SC of set2 associated with it=1 (less than k), it means that the remaining storage space of set2 meets the preset conditions, so it can be cached in set0 The data of row "10010" is transferred to the first row (k/2) of set2, and the data corresponding to "11110" is written into the first row of set0. The data distribution of the on-chip cache after the data transfer is shown in Table 2 .
表2Table 2
结合表2,假设第二次的访问地址为“1001000”,表示系统需要访问组号为0的缓存组,由表2可知,set0中并不存在“10010”,也即该缓存组中未存储该访问地址对应的数据。由于在接收第二次的访问地址之前,将set0中的一部分数据转移至了set2中,故此,可以再查询set2中是否存储有第二次的访问地址对应的数据,由表2可知,set2中存在“10010”,也即该缓存组中存储该访问地址对应的数据,故此,可以将set2中的SC减1,此时片上缓存的数据分布如表3所示。Combined with Table 2, assuming that the second access address is "1001000", it means that the system needs to access the cache group whose group number is 0. It can be seen from Table 2 that "10010" does not exist in set0, that is, there is no storage in this cache group. The data corresponding to the access address. Before receiving the second access address, part of the data in set0 is transferred to set2, so you can check whether the data corresponding to the second access address is stored in set2, as can be seen from Table 2, in set2 There is "10010", that is, the data corresponding to the access address is stored in the cache group. Therefore, the SC in set2 can be decremented by 1. At this time, the data distribution of the on-chip cache is shown in Table 3.
表3table 3
由上述技术方案可以看出,系统依据访问地址中携带的组号,从所有缓存组中查找所述组号对应的第一缓存组;判断第一缓存组中是否存储有所述访问地址对应的数据;当第一缓存组中未存储所述访问地址对应的数据时,则依据预先划分的联合组,查找与第一缓存组相关联的第二缓存组,并判断第一缓存组是否达到饱和状态,以及第二缓存组的剩余存储空间是否满足预设条件;当这两个条件均满足时,则说明第二缓存组具有足够的空间容纳第一缓存组中需要转移的数据,此时可以将第一缓存组中优先级最低的缓存行存储的数据转移至第二缓存组中,并将所述访问地址对应的数据存储于所述第一缓存组中。该技术方案中,通过将缓存组进行联合,从而可以将压力较大的缓存组中的数据转移至压力较小的缓存组中,有效地解决片上缓存组间压力不均匀的问题,提高了缓存组的利用率以及缓存命中率。It can be seen from the above technical solution that, according to the group number carried in the access address, the system searches all cache groups for the first cache group corresponding to the group number; and judges whether the first cache group stores the first cache group corresponding to the access address. data; when the data corresponding to the access address is not stored in the first cache group, then according to the pre-divided joint group, search for the second cache group associated with the first cache group, and determine whether the first cache group is saturated state, and whether the remaining storage space of the second cache group satisfies the preset conditions; when these two conditions are met, it means that the second cache group has enough space to accommodate the data that needs to be transferred in the first cache group. The data stored in the cache line with the lowest priority in the first cache group is transferred to the second cache group, and the data corresponding to the access address is stored in the first cache group. In this technical solution, by combining the cache groups, the data in the cache group with higher pressure can be transferred to the cache group with less pressure, which effectively solves the problem of uneven pressure between the on-chip cache groups and improves the cache performance. Group utilization and cache hit ratio.
考虑到缓存组中存储的数据既有因内存访问引入的数据,也有来自于其相关联的缓存组转移的数据,为了对这两类数据进行区分,可以在每个缓存行中添加一个替换标记位,当第一缓存行中的数据转移至第二缓存行时,则修改所述第二缓存行的替换标记位的状态值;其中,所述第一缓存行所属的缓存组,与所述第二缓存行所属的缓存组为两个不同的缓存组,并且所述两个不同的缓存组属于同一个联合组。Considering that the data stored in the cache group includes both data introduced by memory access and data transferred from its associated cache group, in order to distinguish these two types of data, a replacement tag can be added to each cache line bit, when the data in the first cache line is transferred to the second cache line, the state value of the replacement flag bit of the second cache line is modified; wherein, the cache group to which the first cache line belongs is the same as the The cache groups to which the second cache line belongs are two different cache groups, and the two different cache groups belong to the same joint group.
结合上述表1-表3,以表1为例,在表1中标头“D”表示替换标记位,表1中标头为“D”的第3列数据表示各缓存行替换标记位的状态值,其中D的取值可以有0和1,D=0表示缓存行中数据属于内存访问引入的数据,D=1表示缓存行中数据属于其相关联的缓存组转移的数据。结合上述对表2的介绍可知,由于set2第一行的数据来自于set0,因此,表2中set2第一行的替换标记位的状态值为1。Combining the above Table 1-Table 3, taking Table 1 as an example, the header "D" in Table 1 indicates the replacement flag bit, and the data in the third column with the header "D" in Table 1 indicates the state value of each cache line replacement flag bit , where the value of D can be 0 and 1, D=0 means that the data in the cache line belongs to the data introduced by memory access, and D=1 means that the data in the cache line belongs to the data transferred by its associated cache group. Based on the above introduction to Table 2, it can be seen that since the data in the first row of set2 comes from set0, the status value of the replacement flag bit in the first row of set2 in Table 2 is 1.
结合上述对表2的介绍可知,由于set2中存储有来自于set0的数据,因此,当set0中不存在访问地址对应的数据时,需要查询set2。为了便于系统识别是否需要二次查找,可以在在每个缓存组中添加一个查找标记位,当所述第一缓存组中优先级最低的缓存行存储的数据转移至所述第二缓存组中时,则修改所述第一缓存组的查找标记位的状态值。Based on the above introduction to Table 2, it can be seen that since set2 stores data from set0, when there is no data corresponding to the access address in set0, set2 needs to be queried. In order to facilitate the system to identify whether a secondary lookup is required, a lookup flag can be added to each cache group, when the data stored in the cache line with the lowest priority in the first cache group is transferred to the second cache group , modify the state value of the lookup flag bit of the first cache group.
结合上述表1-表3,以表1为例,在表1中标头“SS”表示查找标记位,表1中标头为“SS”的第4列数据表示各缓存组查找标记位的状态值,其中SS的取值可以有0和1,SS=0表示只查询该缓存组即可,SS=1表示除了查询该缓存组外,还需要查询其相关联的缓存组。结合上述对表2的介绍可知,由于set2第一行的数据来自于set0,因此,表2中set0的查找标记位的状态值为1。Combining the above Table 1-Table 3, taking Table 1 as an example, the header "SS" in Table 1 indicates the search flag bit, and the data in the fourth column with the header "SS" in Table 1 indicates the state value of each cache group lookup flag bit , where the value of SS can be 0 and 1, SS=0 means that only the cache group can be queried, and SS=1 means that in addition to querying the cache group, the associated cache group also needs to be queried. Based on the above introduction to Table 2, it can be seen that since the data in the first row of set2 comes from set0, the state value of the search flag bit of set0 in Table 2 is 1.
当缓存组数据替换出某一缓存行数据时,对缓存组中的所有缓存行的替换标记位D进行“或”运算,若结果为0,表明当前缓存组不再包含其相关联的缓存组转移的数据,此时可以令缓存组查找标记位SS的状态值为0,从而避免二次查找。When the cache group data is replaced by a certain cache line data, the "OR" operation is performed on the replacement flag D of all cache lines in the cache group. If the result is 0, it indicates that the current cache group no longer contains its associated cache group. For the transferred data, at this time, the state value of the cache group search flag bit SS can be set to 0, so as to avoid secondary search.
图2为本发明实施例提供的一种缓存组负载均衡的装置的结构示意图,包括查找单元21、第一判断单元22、第二判断单元23、转移单元24和存储单元25;2 is a schematic structural diagram of a cache group load balancing device provided by an embodiment of the present invention, including a search unit 21, a first judgment unit 22, a second judgment unit 23, a transfer unit 24, and a storage unit 25;
所述查找单元21,用于依据访问地址中携带的组号,从所有缓存组中查找所述组号对应的第一缓存组;The search unit 21 is configured to search for the first cache group corresponding to the group number from all cache groups according to the group number carried in the access address;
所述第一判断单元22,用于判断所述第一缓存组中是否存储有所述访问地址对应的数据;The first judging unit 22 is configured to judge whether data corresponding to the access address is stored in the first cache group;
若所述第一缓存组中未存储所述访问地址对应的数据,则触发所述查找单元21,所述查找单元21还用于依据预先划分的联合组,查找与所述第一缓存组相关联的第二缓存组;If the data corresponding to the access address is not stored in the first cache group, trigger the search unit 21, and the search unit 21 is also used to search Associated second cache group;
所述第二判断单元23,用于判断所述第一缓存组是否达到饱和状态,并且所述第二缓存组的剩余存储空间是否满足预设条件;The second judging unit 23 is configured to judge whether the first cache group is saturated, and whether the remaining storage space of the second cache group satisfies a preset condition;
若是,则触发所述转移单元24,所述转移单元24,用于将所述第一缓存组中优先级最低的缓存行存储的数据转移至所述第二缓存组中;If so, trigger the transfer unit 24, the transfer unit 24 is configured to transfer the data stored in the cache line with the lowest priority in the first cache group to the second cache group;
所述存储单元25,用于将所述访问地址对应的数据存储于所述第一缓存组中。The storage unit 25 is configured to store the data corresponding to the access address in the first cache group.
可选的,还包括划分单元,所述划分单元,用于依据各个缓存组对应的二进制组号,将最高位相反、其余位相同的两个二进制组号对应的缓存组划分为一个联合组。Optionally, a division unit is also included, the division unit is configured to divide the cache groups corresponding to two binary group numbers with opposite highest bits and the same remaining bits into a joint group according to the binary group numbers corresponding to each cache group.
可选的,所述存储单元具体用于将所述第一缓存组中各个缓存行中存储的数据依次转移至优先级低一级的缓存行,并将所述访问地址对应的数据存储于所述第一缓存组中优先级最高的缓存行中。Optionally, the storage unit is specifically configured to sequentially transfer the data stored in each cache line in the first cache group to a cache line with a lower priority, and store the data corresponding to the access address in the cache line. in the cache line with the highest priority in the first cache group.
可选的,所述转移单元具体用于依据所述第二缓存组包含的缓存行的个数,将所述第二缓存组中间位置的缓存行作为目标缓存行;并将所述第一缓存组中优先级最低的缓存行存储的数据转移至所述目标缓存行中。Optionally, the transfer unit is specifically configured to use the cache line in the middle position of the second cache set as the target cache line according to the number of cache lines included in the second cache set; The data stored in the cache line with the lowest priority in the group is transferred to the target cache line.
可选的,还包括添加单元和修改单元;Optionally, it also includes adding units and modifying units;
所述添加单元,用于在每个缓存行中添加一个替换标记位;The adding unit is used to add a replacement flag bit in each cache line;
当第一缓存行中的数据转移至第二缓存行时,则触发所述修改单元,所述修改单元,用于修改所述第二缓存行的替换标记位的状态值;其中,所述第一缓存行所属的缓存组,与所述第二缓存行所属的缓存组为两个不同的缓存组,并且所述两个不同的缓存组属于同一个联合组。When the data in the first cache line is transferred to the second cache line, the modification unit is triggered, and the modification unit is used to modify the state value of the replacement flag bit of the second cache line; wherein, the first cache line The cache group to which a cache line belongs is two different cache groups from the cache group to which the second cache line belongs, and the two different cache groups belong to the same association group.
可选的,所述添加单元还用于在每个缓存组中添加一个查找标记位;Optionally, the adding unit is also used to add a lookup flag bit in each cache group;
当所述第一缓存组中优先级最低的缓存行存储的数据转移至所述第二缓存组中时,则触发所述修改单元,所述修改单元还用于修改所述第一缓存组的查找标记位的状态值。When the data stored in the cache line with the lowest priority in the first cache group is transferred to the second cache group, the modification unit is triggered, and the modification unit is also used to modify the data of the first cache group Find the state value of a flag bit.
图2所对应实施例中特征的说明可以参见图1所对应实施例的相关说明,这里不再一一赘述。For descriptions of features in the embodiment corresponding to FIG. 2 , reference may be made to relevant descriptions of the embodiment corresponding to FIG. 1 , and details will not be repeated here.
由上述技术方案可以看出,系统依据访问地址中携带的组号,从所有缓存组中查找所述组号对应的第一缓存组;判断第一缓存组中是否存储有所述访问地址对应的数据;当第一缓存组中未存储所述访问地址对应的数据时,则依据预先划分的联合组,查找与第一缓存组相关联的第二缓存组,并判断第一缓存组是否达到饱和状态,以及第二缓存组的剩余存储空间是否满足预设条件;当这两个条件均满足时,则说明第二缓存组具有足够的空间容纳第一缓存组中需要转移的数据,此时可以将第一缓存组中优先级最低的缓存行存储的数据转移至第二缓存组中,并将所述访问地址对应的数据存储于所述第一缓存组中。该技术方案中,通过将缓存组进行联合,从而可以将压力较大的缓存组中的数据转移至压力较小的缓存组中,有效地解决片上缓存组间压力不均匀的问题,提高了缓存组的利用率以及缓存命中率。It can be seen from the above technical solution that, according to the group number carried in the access address, the system searches all cache groups for the first cache group corresponding to the group number; and judges whether the first cache group stores the first cache group corresponding to the access address. data; when the data corresponding to the access address is not stored in the first cache group, then according to the pre-divided joint group, search for the second cache group associated with the first cache group, and determine whether the first cache group is saturated state, and whether the remaining storage space of the second cache group satisfies the preset conditions; when these two conditions are met, it means that the second cache group has enough space to accommodate the data that needs to be transferred in the first cache group. The data stored in the cache line with the lowest priority in the first cache group is transferred to the second cache group, and the data corresponding to the access address is stored in the first cache group. In this technical solution, by combining the cache groups, the data in the cache group with higher pressure can be transferred to the cache group with less pressure, which effectively solves the problem of uneven pressure between the on-chip cache groups and improves the cache performance. Group utilization and cache hit ratio.
图3为本发明实施例提供的一种缓存组负载均衡的装置30的硬件结构示意图,包括:FIG. 3 is a schematic diagram of a hardware structure of a cache group load balancing device 30 provided in an embodiment of the present invention, including:
存储器31,用于存储计算机程序;memory 31 for storing computer programs;
处理器32,用于执行所述计算机程序以实现如上述缓存组负载均衡的方法的步骤。The processor 32 is configured to execute the computer program to implement the steps of the above-mentioned cache group load balancing method.
本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上述缓存组负载均衡的方法的步骤。An embodiment of the present invention also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned cache group load balancing method are implemented.
以上对本发明实施例所提供的一种缓存组负载均衡的方法、装置和计算机可读存储介质进行了详细介绍。说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。The method, device, and computer-readable storage medium for load balancing of cache groups provided by the embodiments of the present invention are described above in detail. Each embodiment in the description is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for the related part, please refer to the description of the method part. It should be pointed out that for those skilled in the art, without departing from the principle of the present invention, some improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Professionals can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the possible For interchangeability, in the above description, the composition and steps of each example have been generally described according to their functions. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be directly implemented by hardware, software modules executed by a processor, or a combination of both. Software modules can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other Any other known storage medium.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711285384.6ACN107861819B (en) | 2017-12-07 | 2017-12-07 | Cache group load balancing method and device and computer readable storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711285384.6ACN107861819B (en) | 2017-12-07 | 2017-12-07 | Cache group load balancing method and device and computer readable storage medium |
| Publication Number | Publication Date |
|---|---|
| CN107861819Atrue CN107861819A (en) | 2018-03-30 |
| CN107861819B CN107861819B (en) | 2021-07-16 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201711285384.6AActiveCN107861819B (en) | 2017-12-07 | 2017-12-07 | Cache group load balancing method and device and computer readable storage medium |
| Country | Link |
|---|---|
| CN (1) | CN107861819B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110175136A (en)* | 2018-12-30 | 2019-08-27 | 成都海光集成电路设计有限公司 | Buffer memory management method, buffer and storage medium |
| CN117149781A (en)* | 2023-11-01 | 2023-12-01 | 中电科申泰信息科技有限公司 | Group-associative self-adaptive expansion cache architecture and access processing method thereof |
| CN119135688A (en)* | 2024-08-30 | 2024-12-13 | 北京大学 | Internet of Things node load balancing method, device, electronic device and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6145056A (en)* | 1998-06-08 | 2000-11-07 | Compaq Computer Corporation | Method and apparatus for caching the results of function applications with dynamic, fine-grained dependencies |
| US7032073B2 (en)* | 2001-07-02 | 2006-04-18 | Shay Mizrachi | Cache system for network and multi-tasking applications |
| CN104156323A (en)* | 2014-08-07 | 2014-11-19 | 浪潮(北京)电子信息产业有限公司 | Method and device for reading length of data block of cache memory in self-adaption mode |
| CN104166631A (en)* | 2014-09-11 | 2014-11-26 | 浪潮(北京)电子信息产业有限公司 | Replacement method for Cache row in LLC |
| CN105095116A (en)* | 2014-05-19 | 2015-11-25 | 华为技术有限公司 | Cache replacing method, cache controller and processor |
| CN106537361A (en)* | 2014-07-17 | 2017-03-22 | 高通股份有限公司 | Method and apparatus for flexible cache partitioning by sets and ways into component caches |
| CN106569960A (en)* | 2016-11-08 | 2017-04-19 | 郑州云海信息技术有限公司 | Last stage cache management method for mixed main store |
| CN106909515A (en)* | 2017-02-11 | 2017-06-30 | 郑州云海信息技术有限公司 | Towards multinuclear shared last level cache management method and device that mixing is hosted |
| CN104834608B (en)* | 2015-05-12 | 2017-09-29 | 华中科技大学 | A kind of buffer replacing method under isomery memory environment |
| CN107368437A (en)* | 2017-07-24 | 2017-11-21 | 郑州云海信息技术有限公司 | A kind of last level cache management method and system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6145056A (en)* | 1998-06-08 | 2000-11-07 | Compaq Computer Corporation | Method and apparatus for caching the results of function applications with dynamic, fine-grained dependencies |
| US7032073B2 (en)* | 2001-07-02 | 2006-04-18 | Shay Mizrachi | Cache system for network and multi-tasking applications |
| CN105095116A (en)* | 2014-05-19 | 2015-11-25 | 华为技术有限公司 | Cache replacing method, cache controller and processor |
| CN106537361A (en)* | 2014-07-17 | 2017-03-22 | 高通股份有限公司 | Method and apparatus for flexible cache partitioning by sets and ways into component caches |
| CN104156323A (en)* | 2014-08-07 | 2014-11-19 | 浪潮(北京)电子信息产业有限公司 | Method and device for reading length of data block of cache memory in self-adaption mode |
| CN104166631A (en)* | 2014-09-11 | 2014-11-26 | 浪潮(北京)电子信息产业有限公司 | Replacement method for Cache row in LLC |
| CN104834608B (en)* | 2015-05-12 | 2017-09-29 | 华中科技大学 | A kind of buffer replacing method under isomery memory environment |
| CN106569960A (en)* | 2016-11-08 | 2017-04-19 | 郑州云海信息技术有限公司 | Last stage cache management method for mixed main store |
| CN106909515A (en)* | 2017-02-11 | 2017-06-30 | 郑州云海信息技术有限公司 | Towards multinuclear shared last level cache management method and device that mixing is hosted |
| CN107368437A (en)* | 2017-07-24 | 2017-11-21 | 郑州云海信息技术有限公司 | A kind of last level cache management method and system |
| Title |
|---|
| 张德闪,: "混合主存感知的末级缓存管理策略研究", 《中国优秀硕士学位论文全文数据库信息科技辑》* |
| 陈继承,等;: "一种基于共享转发态的多级缓存一致性协议", 《计算机研究与发展》* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110175136A (en)* | 2018-12-30 | 2019-08-27 | 成都海光集成电路设计有限公司 | Buffer memory management method, buffer and storage medium |
| CN110175136B (en)* | 2018-12-30 | 2022-08-26 | 成都海光集成电路设计有限公司 | Cache management method, cache, and storage medium |
| CN117149781A (en)* | 2023-11-01 | 2023-12-01 | 中电科申泰信息科技有限公司 | Group-associative self-adaptive expansion cache architecture and access processing method thereof |
| CN117149781B (en)* | 2023-11-01 | 2024-02-13 | 中电科申泰信息科技有限公司 | Group-associative self-adaptive expansion cache architecture and access processing method thereof |
| CN119135688A (en)* | 2024-08-30 | 2024-12-13 | 北京大学 | Internet of Things node load balancing method, device, electronic device and storage medium |
| Publication number | Publication date |
|---|---|
| CN107861819B (en) | 2021-07-16 |
| Publication | Publication Date | Title |
|---|---|---|
| US10558577B2 (en) | Managing memory access requests with prefetch for streams | |
| US10198363B2 (en) | Reducing data I/O using in-memory data structures | |
| CN106909515B (en) | Multi-core shared last-level cache management method and device for mixed main memory | |
| CN104809076B (en) | Cache management method and device | |
| US20080168236A1 (en) | Performance of a cache by detecting cache lines that have been reused | |
| US8583874B2 (en) | Method and apparatus for caching prefetched data | |
| US10007615B1 (en) | Methods and apparatus for performing fast caching | |
| CN1499382A (en) | The Realization Method of High Efficiency High Cache in Inexpensive Redundant Disk Array System | |
| CN107368437A (en) | A kind of last level cache management method and system | |
| Fukuda et al. | Caching memcached at reconfigurable network interface | |
| CN117093371B (en) | Cache resource allocation method, device, electronic device and storage medium | |
| CN110879797A (en) | High-speed reconfigurable processor configuration information cache replacement method and storage architecture | |
| CN107861819A (en) | A kind of method, apparatus and computer-readable recording medium of caching group load balancing | |
| CN106569960A (en) | Last stage cache management method for mixed main store | |
| CN115357196A (en) | Dynamically scalable set associative cache method, device, equipment and medium | |
| CN107577616A (en) | A kind of method and system for dividing final stage shared buffer memory | |
| CN102799538A (en) | Cache replacement algorithm based on packet least recently used (LRU) algorithm | |
| CN104811495B (en) | A kind of networking component content storage method and module for wisdom contract network | |
| CN101520751B (en) | Implementation method of self-adaptive insertion strategy of Cache | |
| CN103885890B (en) | Replacement processing method and device for cache blocks in caches | |
| CN116069719A (en) | Processor, memory controller, system-on-chip and data prefetching method | |
| CN112231241B (en) | A data reading method and device, computer-readable storage medium | |
| CN106155936A (en) | A kind of buffer replacing method and relevant apparatus | |
| CN104301227A (en) | TCAM-based high-speed and low-power IP routing table lookup method | |
| CN107294855B (en) | A kind of TCP under high-performance calculation network searches optimization method |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |