Performance aware partially cached avalanche

By selecting the appropriate cache channel for avalanche based on the deterministic cache ejection strategy in the partial cache avalanche procedure and replacing the cache line that is not recently used, the problem of low cache hit rate in the existing technology is solved, and the computing system is improved performance.

CN119213387AActive Publication Date: 2024-12-27QUALCOMM INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202380041224.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-05-27
Filing Date
2023-03-29
Publication Date
2024-12-27
Estimated Expiration
2043-03-29

AI Technical Summary

Technical Problem

When executing partial cache avalanches, existing computing systems fail to effectively consider the nearest degree of the avalanche cache line relative to other cache channels, resulting in reduced cache hit rate and performance losses.

Method used

By counting cache lines in the cache channel based on the deterministic cache eviction policy in the partial cache avalanche procedure, selecting cache channels that meet the eviction criteria for avalanche, and replacing non-most recently used cache lines when necessary to improve Cache hit rate.

Benefits of technology

Improves cache hit rate, reduces DDR memory access time and power consumption, thereby improving the performance of processing devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119213387A_ABST
    Figure CN119213387A_ABST
Patent Text Reader

Abstract

Aspects of the present disclosure relate to systems and methods for improving the performance of handling a partially cached avalanche by a device. Certain embodiments provide a method for performing a partial cache avalanche procedure, the method comprising: counting a number of cache lines that meet an eviction criterion based on a deterministic cache eviction policy in each cache lane of a set of cache lanes; selecting at least one cache channel from the group for avalanche based on a corresponding number of cache lines of the at least one cache channel that meet the eviction criteria; and performing the partially cached avalanche procedure based on selecting the at least one cache channel for an avalanche from the group.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to U.S. patent application No. 17 / 827,302, filed on May 27, 2022, which is assigned to the assignee of the present application and is hereby expressly incorporated by reference in its entirety, as if fully set forth below and for all applicable purposes. Background Art Technical Field

[0003] Aspects of the present disclosure relate to memory devices, and in particular, to systems and methods for improving the performance of partial cache avalanche by a processing device.

[0004] Related technologies

[0005] Typically, main memory in a computing system may use random access memory (RAM) devices as a volatile memory source. RAM is particularly useful as a memory due to its density and speed. One of the disadvantages is that RAM may occasionally experience errors due to, for example, neutrons or alpha particles passing through the die, faulty components, inaccurate system timing, etc. This disadvantage may be particularly problematic for computing systems that convey critical data or require data that is nearly error-free.

[0006] For this reason, a computer system may include an error correction device that generates and stores one or more error correction code (ECC) bits corresponding to the data stored in the RAM. Here, when the stored data is read from the main memory, the associated ECC bits are also read out and sent to the error correction device for proper evaluation and, if necessary, error correction. In some RAM devices, the ECC bits are stored "inline" with the corresponding data. In one example, for every 512 bits of payload data stored in the RAM device, there are associated ECC bits stored in the same DRAM in another location (address) different from the payload data.

[0007] However, in order to perform certain memory functions (e.g., partial data writes), the RAM area storing data and its corresponding ECC bits must be initialized to matching values. For example, an application or processor may need to perform a process for initializing the area by writing zeros into the RAM area storing both data and ECC bits. However, such a process may require a relatively large amount of time and power. In one example, this may cause problems for battery-powered RAM devices. As RAM devices are increasingly utilized, there is a need for further improvements to such devices. Summary of the invention

[0008] The systems, methods, and devices of the present disclosure each have several aspects, no single aspect of which is solely responsible for its desired characteristics. Without limiting the scope of the present application as expressed by the subsequent claims, some features will now be briefly discussed. After considering this discussion, and especially after reading the section entitled "Detailed Description of the Invention", it will be understood how the features of the present disclosure provide advantages.

[0009] Certain embodiments provide a method for performing a partial cache avalanche procedure. The method generally includes: counting the number of cache lines that meet eviction criteria based on a deterministic cache eviction policy in each cache way in a group of cache ways; selecting at least one cache way from the group for avalanche based on the number of cache lines that meet the eviction criteria corresponding to the at least one cache way; and performing the partial cache avalanche procedure based on the at least one cache way selected for avalanche from the group.

[0010] The following description and the associated drawings set forth in detail certain illustrative features of one or more implementations. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings depict certain aspects of the one or more embodiments and therefore are not to be considered limiting of the scope of the present disclosure.

[0012] Figure 1 Example components and interconnections in a system on a chip (SoC) coupled to a memory that may be suitable for implementing various aspects of the present disclosure are illustrated.

[0013] Figure 2 is a schematic diagram illustrating partial cache avalanche in an example cache according to aspects of the present disclosure.

[0014] Figure 3A and Figure 3B An example diagram illustrating a performance-aware partial cache avalanche procedure according to aspects of the present disclosure.

[0015] Figure 4A and Figure 4B The example allocates cache lines that meet non-eviction criteria from a selected way to a non-selected way according to aspects of the present disclosure.

[0016] Figure 5 is a graph of memory access latency for various levels of memory.

[0017] Figure 6 is a flow diagram illustrating example operations for performing a partial cache avalanche procedure in accordance with aspects of the present disclosure.

[0018] Figure 7A processing system is illustrated that may include various components (eg, corresponding to means-plus-function components) configured to perform operations for the techniques disclosed herein.

[0019] To facilitate understanding, identical reference numerals have been used, where possible, to designate identical elements that are common to the figures. It is contemplated that elements and features of one embodiment may be beneficially incorporated in other embodiments without further recitation. DETAILED DESCRIPTION

[0020] Aspects of the present disclosure provide methods and apparatus for improving the performance of a processing device to partial buffer avalanche.

[0021] In a device that performs computer processing (e.g., a computer, a smartphone, a system on a chip (SoC), etc.), a cache memory is a supplemental memory system that temporarily stores frequently used instructions and data for faster processing by the device's processor (e.g., a central processing unit (CPU)). Using cache memory can reduce the average time and / or energy used by the processor to access data compared to the processor accessing the data from the device's main memory. In other words, when data is found in cache memory (in what is known as a cache hit), accessing the data is much faster than retrieving the data from main memory. The number of searches that result in a cache hit relative to the total number of searches is known as the cache hit rate.

[0022] Some devices may be configured to perform partial cache avalanche, which generally refers to a mechanism for saving power by selectively applying power to a portion of a shared cache (power gating). Processors based on the Advanced Reduced Instruction Set Computer (RISC) Machine (ARM) architecture are examples of devices that can perform a partial cache avalanche procedure. When a device performs a partial cache avalanche procedure, the avalanched portion of the cache is typically checked for cache lines in which a dirty bit (i.e., a bit indicating whether the corresponding cache line has been updated) is set. That is, in order to capture updated data, each dirty line of the channel being avalanched is written to main memory, and the channel is avalanched (i.e., the channel is power gated).

[0023] In a conventional partial cache avalanche procedure, the selection of the channel being avalanched and the writing of dirty cache lines to main memory is performed without regard to how recent the avalanche cache lines are relative to other cache channels. Therefore, without regard to the eviction policy (the policy applied to decide which cache entries to remove and which to keep), the number of main memory accesses at the time of avalanche is typically equal to the number of dirty lines in the avalanche channel. Unfortunately, this reduces cache hit rates and results in performance penalties.

[0024] However, aspects of the present disclosure provide techniques that can lead to improvements in some cache avalanche procedures. For example, by considering the recency of an avalanche cache line relative to other cache ways, the cache hit rate can be improved, resulting in a corresponding improvement in performance.

[0025] Memory System Overview

[0026] The following description provides examples, but does not limit the scope, applicability or implementation scheme set forth in the claims. Without departing from the scope of the present disclosure, the functions and arrangements of the elements discussed may be changed. Each example may ignore, replace or add each procedure or component as appropriate. For example, the method described may be performed in a different order than described, and various steps may be added, omitted or combined. In addition, the features described for some examples may be combined in some other examples. For example, any number of aspects set forth herein may be used to implement a device or practice method. In addition, the scope of the present disclosure is intended to cover such devices or methods practiced using other structures, functions, or structures and functions that are supplemented or substituted for the various aspects of the present disclosure set forth herein. It should be understood that any aspect of the disclosure disclosed herein may be embodied by one or more elements of the claims.

[0027] Although certain teachings of the present disclosure are exemplified with dynamic random access memory (DRAM) devices as example memory devices, the teachings are applicable to other fields, such as to other volatile memory devices (e.g., static RAM (SRAM), synchronous SRAM (SDRAM), Rambus DRAM (RDRAM), etc.). In addition, although certain teachings of the present disclosure are exemplified with system on chip (SoC), the teachings are applicable to any suitable computing device that utilizes memory. Therefore, the disclosed teachings should not be interpreted as limited to DRAM devices or SoCs or the illustrated embodiments. The illustrated embodiments are merely vehicles for describing and illustrating examples of the inventive teachings disclosed herein.

[0028] Figure 1Example components and interconnects in a system on chip (SoC) 100 coupled to a volatile memory 124 (e.g., DRAM) that may be suitable for implementing various aspects of the present disclosure are illustrated. The SoC 100 may include multiple heterogeneous processors, such as a central processing unit (CPU) 102, a modem processor 104, a graphics processor 106, and an application processor 108. Each processor 102, 104, 106, 108 may include one or more cores, and each processor / core may perform operations independently of the other processors / cores. The processors 102, 104, 106, 108 may be organized in close proximity to each other (e.g., on a single substrate, die, integrated chip, etc.) so that the processors may operate at a much higher frequency / clock rate than would be possible if the signals were propagated off-chip. The proximity of the cores may also allow for sharing of on-chip memory and resources (e.g., voltage rails), as well as allowing for more coordinated collaboration between the cores.

[0029] Processors 102, 104, 106, 108 may be interconnected to memory controller 114 and other system components (not shown) via an interconnect / bus module 122, which may include an array of reconfigurable logic gates and / or implement a bus architecture (e.g., CoreConnect, Advanced Microcontroller Bus Architecture (AMBA), etc.) Communications may also be provided by advanced interconnects such as a high-performance network-on-chip (NoC).

[0030] The memory controller 114 may include a dedicated hardware module configured to receive various memory transactions from one or more master devices and address and communicate the memory transactions to the memory 124. The multiple master devices may include one or more of the processors 102, 104, 106, 108 and / or applications operating on the processors 102, 104, 106, 108. The memory controller 114 may also manage the maintenance of the memory 124, such as scheduling and / or initiating refresh cycles, and clearing content (e.g., data and / or code) commands as described herein. In some examples, the memory controller 114 may include one or more processors configured to perform the operations disclosed herein. Examples of processors include microprocessors, microcontrollers, digital signal processors (DSPs), field programmable gate arrays (FPGAs), programmable logic devices (PLDs), state machines, gated logic, discrete hardware circuits, and other suitable hardware configured to perform various functionalities described throughout the present disclosure. Memory 124 and memory controller 114 may be on-chip components of SoC 100 (eg, on a substrate, die, integrated chip, etc.); however, it should be noted that in some examples, one or more of memory 124 and memory controller 114 may be located off-chip.

[0031] Memory 124 is a computer-readable storage medium having an interface to processors 102, 104, 106, 108 via bus module 122. As discussed, memory 124 can be an on-chip component, or alternatively (as shown) an off-chip component. Memory 124 can provide volatile storage, such as DRAM, for processors 102, 104, 106, 108 and / or other functional aspects of SoC 100. As shown, memory controller 114 includes ECC module 130. ECC module 130 is configured to implement ECC logic for detecting and correcting errors in memory 124, as discussed and known in the art. In some aspects, ECC module 130 is configured to perform inline ECC logic.

[0032] The memory 124 may also include a hierarchy of one or more rows 134 and multiple libraries 132a to 132j ​​(collectively referred to as libraries 132) in each row 134. For example, the memory 124 may include multiple rows, each of which contains multiple internal library structures. In some examples, each library structure may include multiple memory pages or "rows". In general, a row of memory can be accessed at each library at a given time. Each library in the library 132 of a given row 134 can share a bus (not shown) for reading / writing data. The memory controller 114 can support simultaneous operation of different rows 134 and libraries 132 that can be accessed independently. Because each library 132 acts as an independent entity, the library 132 can serve multiple memory requests in parallel, thereby providing library-level parallelism.

[0033] Overview of cache architecture with partial cache avalanche

[0034] Figure 2 is a diagram illustrating an example cache architecture 200 that may be configured with a conventional partial cache avalanche procedure. The cache architecture 200 may be included in the memory controller 114 of the SoC 100, or may be built into any of the CPU 102, the modem processor 104, the GPU 106, or the application processor 108, all of which are Figure 1 2. Cache 200 includes a cache controller 202 and a cache memory 220. Cache memory 220 stores cache lines, where each cache line includes a cache tag (shown at 222), a validity bit (shown at 224), a dirty bit (shown at 226), and data (shown at 228). The cache tag in each cache line indicates which memory location in the main memory the cache line was copied from. The valid bit indicates whether the cache line has been loaded with valid data.

[0035] During operation of the cache, a processor core (e.g., any of the CPU 102, modem processor 104, GPU 106, or application processor 108) issues a memory address 210 of a memory that the processor core needs to access for reading or writing. In the example cache, the cache controller compares the tag portion 212 of the memory address with the cache tag (shown at 222) of the cache line stored in the cache memory. If the cache controller finds that the tag portion matches the cache tag in the cache memory, a cache hit has occurred. However, if the cache controller does not find a cache tag in the cache memory that matches the tag portion, a cache miss has occurred. In the case of a cache hit, the cache controller immediately reads or writes the data of the corresponding cache line. In the case of a processor core issuing a read of a memory location, the cache controller delivers the data of the corresponding cache line to the processor core via the data bus 230. For the case of a cache miss, the cache controller allocates a new cache line in the cache memory and copies the data from the main memory into the new cache line, and then satisfies the request from the processor core from the contents of the new cache line.

[0036] The example cache is a four-channel cache, and therefore each main memory location corresponds to a location in each of the four channels 240, and the data of any particular main memory location can be stored in a corresponding location in each of the four channels. Each of the four cache memory locations in which the data of the main memory location can be stored (i.e., a cache memory location in each channel) can be referred to as a member in a cache memory location set, and each such set has a corresponding set index. Each channel has a corresponding channel mask 270. When a cache miss occurs, the cache controller attempts to allocate a new cache line in a currently unused location in the cache memory. Therefore, in the example four-channel cache, when the cache controller is allocating a new cache line, the cache controller checks up to four locations (one location in each channel) to determine whether any location is unused. If there is no unused location, the cache controller consults the eviction policy 260 to determine which of the four locations can have its current data evicted so that a new cache line can be allocated.

[0037] When a device including the example cache determines to perform a partial cache avalanche, one of the four channels is selected for power gating. The cache controller executes corresponding channel avalanche logic (shown at 280) when avalanching the selected channel. Each of the channel avalanche logic includes executing sequential dirty line search logic 250, which searches the selected channel for cache lines marked as dirty (i.e., cache lines for which the dirty bit 226 is set) and writes those cache lines to their corresponding main memory locations, which are known from the cache tags of the cache lines.

[0038] As previously described, in a conventional partial cache avalanche procedure, the selection of the way being avalanched and the writing of dirty cache lines to main memory is performed without regard to how recent the avalanched cache line is relative to the other cache ways. Therefore, without regard to the eviction policy (the policy applied to decide which cache entries to remove and which to keep), the number of main memory accesses at the time of avalanche is typically equal to the number of dirty lines in the avalanching way, reducing the cache hit rate and resulting in a performance penalty.

[0039] Example Technique for Performance-Aware Partial Cache Avalanche

[0040] However, aspects of the present disclosure provide techniques that can lead to improvements in partial cache avalanche procedures. For example, by considering the recency of an avalanche cache line relative to other cache ways, cache hit rates can be improved relative to systems utilizing conventional partial cache avalanche procedures.

[0041] The partial avalanche mechanism described herein can help optimize the performance of the partial cache avalanche procedure by improving the cache hit rate. This improved cache hit rate can lead to improved performance.

[0042] The operations performed during the performance-aware partial cache avalanche procedure proposed herein may be referred to herein as sequential channel processing. Figure 3A As shown, a cache architecture 300 configured to implement the performance-aware partial cache avalanche procedure proposed herein may include cache line swap logic 350 including sequential search logic, details of which are described below.

[0043] This sequential channel processing can be initiated when certain avalanche criteria are met. If such avalanche criteria are not met, the cache can behave as a regular cache (e.g., without sequential channel processing logic). Depending on the particular implementation, the avalanche criteria can be based on the number of active cores or based on a dedicated request for partial cache avalanche by a core or software. For example, the avalanche criteria can be that the number of active cores is greater than a threshold number before performing partial cache avalanche. As another example, the number of channels that are avalanched can depend on the number of active cores.

[0044] If the avalanche criteria are met, then sequential channel processing logic and additional hardware (e.g. Figure 3A Logic 350) can activate and implement the selected avalanche strategy.

[0045] In some cases, the cache architecture 300 may include logic 380 configured to count the number of cache lines that meet eviction criteria based on a deterministic cache eviction policy 360 in each cache channel in a set of cache channels. Any suitable deterministic cache eviction policy may be used. For example, a deterministic cache eviction policy may provide that the least recently used (LRU) or least frequently used (LFU) cache lines are evicted. Thus, the logic 380 may include a counter ("crit-sat") for each channel to count the number of cache lines that meet eviction criteria, such as the number of LRU or LFU cache lines for a given channel.

[0046] The cache controller may then select at least one cache way from the group for avalanche based on the number of cache lines of the at least one cache way's corresponding cache way that meet the eviction criteria (and perform a partial cache avalanche procedure based on selecting the at least one cache way from the group for avalanche).

[0047] For example, in Figure 3B In the example shown, channel 0 is selected for avalanche because this channel has the most cache lines that meet the criteria of the deterministic cache eviction policy (eg, has the most LRU lines or the most LFU lines).

[0048] The logic 350 may then sequentially check the selected avalanche cache way (or ways) for non-LRU cache lines. Once a non-LRU cache line is found, the least recently used cache line of the corresponding non-avalanche way from the same set may be evicted and replaced by a non-LRU line from the avalanche way. This approach may help avoid evicting non-LRU cache lines, resulting in improved cache hits and reduced DDR reads (and therefore, improved performance).

[0049] For reference Figure 4A and Figure 4B To understand this method. Figure 4A As shown, the channel selected for avalanche (e.g., from Figure 3B Channel 0) may have one or more non-LRU cache lines 410 (meaning it has been accessed relatively recently), while channels not selected for avalanche may have one or more LRU cache lines 420 (meaning it has not been accessed relatively recently).

[0050] like Figure 4BAs illustrated, the LRU cache line 420 from the non-avalanche channel may be evicted and replaced by the non-LRU cache line 410 from the avalanche channel. In other words, the evicted LRU cache line 420 from the non-avalanche channel is assigned to the non-LRU cache line 410 from the avalanche channel.

[0051] like Figure 4B As indicated, in some cases, when selecting which LRU cache lines to evict from the non-avalanche path, cache lines with non-dirty bits may be selected when possible. This approach may result in evicting (flushing) cache lines without requiring a write, thereby saving memory transactions and further saving time and power.

[0052] While the above examples consider avalanches of a single channel, in some cases it may be necessary (or desirable) to avalanche more than one channel (e.g., N channels). In such cases, the above techniques may be performed to select the N channels with the most rows that meet the eviction criteria. For example, the N channels with the N highest counted LRU rows may be selected and excluded from the replacement operation of the first channel avalanche. When avalanche is performed, the N channels contain LRU, LRU-1, LRU-2, ... LRU-(N-1) cache lines.

[0053] The performance-aware partial avalanche procedure described herein can have many benefits. For example, selecting the channel (or channels) with the highest LRU row for avalanche can reduce the amount of activity during avalanche. Avalanche strategies for evict available LRU rows from active channels instead of evict rows from avalanche channels can avoid local damage. Avalanche strategies for retaining MRU rows (or at least temporally important cache rows) according to implemented cache eviction strategies can help reduce potential DDR transactions by improving cache hit rates.

[0054] Considering example memory access latencies for different memory levels, potential performance improvements can be seen. Figure 5 As illustrated, the latency of memory accesses to DDR memory (510) may average 128 CPU cycles per memory access, the latency of memory accesses to level 3 (L3) cache (520) may average 26 CPU cycles per memory access, the latency of memory accesses to level 2 (L2) cache (530) may average 7 CPU cycles per memory access, and the latency of memory accesses to level 1 (L1) cache (540) may average 2 CPU cycles per memory access. Given these example values, increasing cache hit rates using the performance-aware partial avalanche procedure described herein may help avoid a potential approximately 5x time penalty for DDR accesses during an avalanche.

[0055] The sequential processing for the performance-aware partial avalanche procedure described herein may take a certain amount of time, for example, to complete the reference Figure 4A and Figure 4B In some cases, if a read or write request (to L3) arrives during this time, sequential processing may be suspended until the request is serviced.

[0056] In some cases, all channels (including the channel being considered for avalanche) can remain visible to reads. If a read request is for an index that has already been processed and results in a cache hit on a cache line in one of the channels that was not selected for partial avalanche, then the index may not need to be processed. On the other hand, if the read request hits the avalanche channel, then the index can be reprocessed.

[0057] In some cases, sequential processing can be suspended when a write request arrives. Therefore, the write request can essentially see the L3 cache with only non-avalanche channels active. In other words, the channel being considered for avalanche may not be visible to the write. If a write is to an already processed index, then because the write request evicts one of the non-avalanche channels, the evicted line can be written back to the DDR (if dirty) or swapped with the avalanche channel line (for example, if the avalanche line is non-dirty, depending on which one is prioritized). Writes to unprocessed indexes can be processed like normal L3 writes, where all channels are visible.

[0058] In some cases, the avalanche strategy can use information about speculative business to initiate sequential processing with the help of the selected avalanche strategy with the help of existing logic (such as address mode detection, random address mode detector and pre-fetch block address). In such cases, it is possible to create an address access pattern that can keep the sequential processing stopped or repeatedly process the same INDEX. In order to avoid such locks, timer-based sequential processing cancellation can be implemented. As an alternative, a limit on the number of scans for sequential processing can be set. In such cases, if the timer expires or the scan limit is met, the avalanche processing can be suspended because this can indicate that the traffic business is high, or the L3 transaction can be suspended to complete the avalanche processing.

[0059] Example Method

[0060] Figure 6 is a flow diagram illustrating example operations 600 for performing a partial cache avalanche procedure in accordance with certain aspects of the present disclosure. For example, Figure 6 The steps of the operation may be performed by a memory controller (e.g., Figure 1 The memory controller 114) or another suitable circuit may be used to perform the above operation.

[0061] Operations 600 begin at step 605 by counting the number of cache lines that meet eviction criteria based on a deterministic cache eviction policy in each cache way in a set of cache ways.

[0062] Operation 600 may continue at step 610 by selecting at least one cache way from the group for avalanche based on a number of cache lines corresponding to the at least one cache way that meet eviction criteria.

[0063] Operations 600 may continue at step 615 by performing a partial cache avalanche procedure based on selecting at least one cache way from the group for avalanche.

[0064] In certain aspects, the deterministic cache eviction policy includes at least one of: a least recently used (LRU) cache line eviction policy or a least frequently used (LFU) cache line eviction policy.

[0065] In certain aspects, the operations 600 include determining that one or more avalanche criteria are satisfied prior to executing the partial cache avalanche procedure.

[0066] In certain aspects, the avalanche criteria is based on at least one of a number of active cores or a request for partial cache avalanche.

[0067] In some aspects, performing a partial cache avalanche procedure includes: identifying one or more sets, each of the one or more sets containing at least one cache line that does not meet eviction criteria in a cache way selected from a group for avalanche; and in each of the identified sets, evicting a cache line that meets the eviction criteria from another cache way in the group of ways that is not selected for avalanche, and assigning the evicted cache line to a cache line that does not meet the eviction criteria of the cache way selected from the group for avalanche.

[0068] In some aspects, a cache line from at least one other cache way satisfies additional criteria

[0069] In some aspects, operation 600 includes selecting a cache line from one or more non-dirty cache lines of at least one other cache way that satisfies an additional criterion.

[0070] In some aspects, selecting at least one cache way from the set for avalanche includes selecting a cache way for avalanche having a highest number of cache lines that meet eviction criteria.

[0071] In some aspects, selecting at least one cache way from the set for avalanche includes selecting a plurality of cache ways having a highest number of cache lines that meet an eviction criterion.

[0072] In certain aspects, performing the partial avalanche procedure includes excluding cache lines of the plurality of cache ways that meet eviction criteria from replacement operations.

[0073] Figure 7 700 is illustrated, and the processing system may include a processor configured to perform operations for the techniques disclosed herein (such as in Figure 6 The processing system 700 includes a processor 704 coupled to a computer-readable medium / memory 712 via a bus 706. In some aspects, the computer-readable medium / memory 712 is configured to store programs that, when executed by the processor 704, cause the processor 704 to perform Figure 6 Computer executable instructions (eg, computer executable code) for performing the operations illustrated in or other operations discussed herein for performing various techniques for performing partial cache avalanche.

[0074] In some aspects, the computer-readable medium / memory 712 stores code 714 for counting a number of cache lines that meet eviction criteria based on a deterministic cache eviction policy in each cache way in a group of cache ways; code 716 for selecting at least one cache way from the group for avalanche based on the number of cache lines that meet the eviction criteria corresponding to the at least one cache way; and code 717 for performing a partial cache avalanche procedure based on selecting at least one cache way from the group for avalanche.

[0075] In certain aspects, the processor 704 has circuitry configured to implement code stored in the computer-readable medium / memory 712. The processor 704 includes circuitry 720 for counting a number of cache lines that meet eviction criteria based on a deterministic cache eviction policy in each cache way in a group of cache ways; circuitry 722 for selecting at least one cache way from the group for avalanche based on a corresponding number of cache lines that meet the eviction criteria; and circuitry 724 for performing a partial cache avalanche procedure based on selecting at least one cache way from the group for avalanche.

[0076] Sample Clauses

[0077] Specific implementation examples are described in the following numbered clauses:

[0078] Clause 1: A method for performing a partial cache avalanche procedure, the method comprising: counting a number of cache lines that meet an eviction criterion based on a deterministic cache eviction policy in each cache way in a group of cache ways; selecting at least one cache way from the group for avalanche based on a number of cache lines that meet the eviction criterion corresponding to the at least one cache way; and performing the partial cache avalanche procedure based on selecting the at least one cache way from the group for avalanche.

[0079] Clause 2: The method of clause 1, wherein the deterministic cache eviction policy comprises at least one of: a least recently used (LRU) cache line eviction policy or a least frequently used (LFU) cache line eviction policy.

[0080] Clause 3: The method of clause 1, further comprising determining that one or more avalanche criteria are satisfied prior to executing the partial cache avalanche procedure.

[0081] Clause 4: The method of clause 3, wherein the avalanche criteria is based on at least one of a number of active cores or a request for partial cache avalanche.

[0082] Clause 5: A method according to clause 1, wherein executing the partial cache avalanche procedure includes: identifying one or more sets, each of the one or more sets containing at least one cache line, the at least one cache line not satisfying the eviction criteria in the cache way selected from the group for avalanche; and in each of the identified sets, evicting a cache line satisfying the eviction criteria from another cache way in the group of ways that was not selected for avalanche, and assigning this evicted cache line to a cache line that does not satisfy the eviction criteria of the cache way selected from the group for avalanche.

[0083] Clause 6: The method of clause 5, wherein the cache line from the another cache way satisfies an additional criterion.

[0084] Clause 7: The method of clause 6, further comprising selecting the cache line that satisfies the additional criterion from one or more non-dirty cache lines of the another cache way.

[0085] Clause 8: The method of clause 1, wherein selecting at least one cache way from the set for avalanche comprises selecting a cache way having a highest number of cache lines that satisfy the eviction criteria for avalanche.

[0086] Clause 9: The method of clause 1, wherein selecting at least one cache way from the set for avalanche comprises selecting a plurality of cache ways having a highest number of cache lines that satisfy the eviction criteria.

[0087] Clause 10: The method of Clause 9, wherein performing the partial avalanche procedure comprises excluding cache lines of the plurality of cache ways that meet the eviction criteria from replacement operations.

[0088] Clause 11: An apparatus, the apparatus comprising: a memory including executable instructions; and a processor configured to execute the executable instructions and cause the apparatus to perform the method according to any one of clauses 1 to 10.

[0089] Clause 12: An apparatus comprising means for performing the method according to any one of clauses 1 to 10.

[0090] Clause 13: A non-transitory computer readable medium comprising executable instructions which, when executed by a processor of an apparatus, cause the apparatus to perform the method of any one of clauses 1 to 10.

[0091] Clause 14: A computer program product embodied on a computer readable storage medium, the computer program product comprising code for performing the method according to any of clauses 1 to 10.

[0092] Additional Information

[0093] The previous description is provided to enable any person skilled in the art to practice the various embodiments described herein. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the universal principles defined herein can be applied to other embodiments. For example, without departing from the scope of the present disclosure, the function and arrangement of the elements discussed may be changed. Each example may ignore, replace or add each procedure or component as appropriate. In addition, the features described for some examples may be combined in some other examples. For example, any number of aspects set forth herein may be used to implement a device or practice method. In addition, the scope of the present disclosure is intended to cover such devices or methods practiced using other structures, functions, or structures and functions that are supplemented or substituted for the various aspects of the present disclosure set forth herein. It should be understood that any aspect of the disclosure disclosed herein may be embodied by one or more elements of the claims.

[0094] As used herein, the word “exemplary” means “serving as an example, instance, or illustration.” Any aspect described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects.

[0095] As used herein, a phrase referring to "at least one of" a list of items refers to any combination of those items (including single members). As an example, "at least one of a, b, or c" is intended to cover a, b, c, ab, ac, bc, and abc, as well as any combination with multiple identical elements (e.g., aa, aaa, aab, aac, abb, acc, bb, bbb, bbc, cc, and ccc, or any other ordering of a, b, and c).

[0096] As used herein, the term "determining" encompasses a wide variety of actions. For example, "determining" may include calculating, computing, processing, deriving, investigating, searching (e.g., searching in a table, a database, or another data structure), ascertaining, and the like. Furthermore, "determining" may include receiving (e.g., receiving information), accessing (e.g., accessing data in a memory), and the like. In addition, "determining" may include resolving, selecting, choosing, establishing, and the like.

[0097] The method disclosed herein includes one or more steps or actions for implementing the method. The steps and / or actions of the method can be interchangeable with each other without departing from the scope of the claims. In other words, unless a specific order of steps or actions is specified, the order and / or use of specific steps and / or actions can be modified without departing from the scope of the claims. In addition, the various operations of the method described above can be performed by any appropriate component that can perform the corresponding function. The component may include various hardware and / or software components and / or modules, including but not limited to circuits, application specific integrated circuits (ASICs) or processors. Typically, in the case of operations illustrated in the accompanying drawings, those operations may have corresponding corresponding components with similar numbers plus functional components.

[0098] The various illustrative logical blocks, modules, and circuits described in conjunction with the present disclosure may be implemented or executed with a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device (PLD), discrete gate or transistor logic, discrete hardware components, or any combination thereof, designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in an alternative, the processor may be any commercially available processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP core, or any other such configuration.

[0099] The processing system can be implemented using a bus architecture. Depending on the specific application and overall design constraints of the processing system, the bus can include any number of interconnecting buses and bridges. The bus can link various circuits together, including processors, machine-readable media, and input / output devices, etc. A user interface (e.g., a keypad, a display, a mouse, a joystick, etc.) can also be coupled to the bus. The bus can also link various other circuits, such as timing sources, peripherals, voltage regulators, power management circuits, etc., which are well known in the art and will not be described further. The processor can be implemented using one or more general-purpose processors and / or special-purpose processors. Examples include microprocessors, microcontrollers, DSP processors, and other circuits that can execute software. Those skilled in the art will recognize how to best implement the functionality of the processing system depending on the specific application and the overall design constraints imposed on the entire system.

[0100] If implemented in software, each function may be stored on or sent through a computer-readable medium as one or more instructions or codes. Software should be broadly interpreted as meaning instructions, data, or any combination thereof, whether referred to as software, firmware, middleware, microcode, hardware description language, or other. Computer-readable media include both computer storage media and communication media, such as any medium that facilitates the transfer of computer programs from one place to another. The processor may be responsible for managing the bus and general processing, including executing software modules stored on a computer-readable storage medium. A computer-readable storage medium may be coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. In an alternative, the storage medium may be integral with the processor. By way of example, a computer-readable medium may include a transmission line, a carrier modulated by data, and / or a computer-readable storage medium having instructions stored thereon that is separated from a wireless node, all of which may be accessed by a processor through a bus interface. Alternatively or in addition thereto, a computer-readable medium or any part thereof may be integrated into a processor, such as in the case of having a cache and / or a general register stack. By way of example, examples of machine-readable storage media may include RAM (random access memory), flash memory, ROM (read only memory), PROM (programmable read only memory), EPROM (erasable programmable read only memory), EEPROM (electrically erasable programmable read only memory), registers, magnetic disks, optical disks, hard drives, or any other suitable storage media, or any combination thereof. The machine-readable medium may be embodied in a computer program product.

[0101] A software module may include a single instruction, perhaps multiple instructions, and may be distributed over several different code segments, between different programs, and across multiple storage media. A computer-readable medium may include multiple software modules. A software module includes instructions that, when executed by a device such as a processor, cause a processing system to perform various functions. A software module may include a sending module and a receiving module. Each software module may reside in a single storage device or may be distributed across multiple storage devices. By way of example, when a triggering event occurs, a software module may be loaded from a hard drive into a RAM. During the execution of a software module, a processor may load some of the instructions into a cache to increase access speed. One or more cache lines may then be loaded into a general register stack for execution by the processor. When referring to the functionality of a software module, it will be understood that such functionality is implemented by a processor when executing instructions from the software module.

[0102] The following claims are not intended to be limited to the embodiments shown herein, but should be granted the full scope consistent with the language of the claims. Within the claims, unless otherwise specified, the reference to the singular element is not intended to mean "one and only one", but "one or more". Unless otherwise specified, the term "some" refers to one or more. No claim element should be interpreted according to the provisions of 35 U.S.C. § 112 (f), unless the phrase "member for..." is used to expressly record the element, or in the case of a method claim, the phrase "step for..." is used to record the element. All structural and functional equivalents of the elements of various aspects described throughout the present disclosure that are known or will be known later to those of ordinary skill in the art are expressly incorporated herein by reference and are intended to be covered by the claims. In addition, nothing disclosed herein is intended to be dedicated to the public, regardless of whether such disclosure is explicitly recorded in the claims.

Claims

1. A method for executing a partial cache avalanche procedure, the method comprising: counting a number of cache lines that meet an eviction criterion based on a deterministic cache eviction policy in each cache way in a set of cache ways; selecting at least one cache way from the group for avalanche based on a number of cache lines corresponding to the at least one cache way that meet the eviction criteria; as well as The partial cache avalanche procedure is performed based on selecting the at least one cache way from the group for avalanche.

2. The method of claim 1, wherein the deterministic cache eviction policy comprises at least one of: a least recently used (LRU) cache line eviction policy or a least frequently used (LFU) cache line eviction policy. 3 . The method of claim 1 , further comprising determining that one or more avalanche criteria are satisfied prior to executing the partial cache avalanche procedure. 4 . The method of claim 3 , wherein the avalanche criteria is based on at least one of a number of active cores or a request for partial cache avalanche.

5. The method of claim 1 , wherein executing the partial cache avalanche procedure comprises: identifying one or more sets, the one or more sets each containing at least one cache line that does not satisfy the eviction criteria in the cache way selected from the group for avalanche; as well as In the set under consideration in the identified sets, a cache line satisfying an eviction criterion is evicted from another cache way in the set of cache ways that is not selected for avalanche, and the evicted cache line is assigned to a cache line that does not satisfy the eviction criterion of the cache way selected from the set for avalanche. The method of claim 5 , wherein the cache line from the another cache way satisfies an additional criterion. 7 . The method of claim 6 , further comprising selecting the cache line satisfying the additional criterion from one or more non-dirty cache lines of the another cache way.

8. The method of claim 1, wherein selecting at least one cache way from the group for avalanche comprises selecting a cache way for avalanche that has a highest number of cache lines that satisfy the eviction criteria.

9. The method of claim 1, wherein selecting at least one cache way from the group for avalanche comprises selecting a plurality of cache ways having a highest number of cache lines that satisfy the eviction criteria.

10. The method of claim 9, wherein performing the partial cache avalanche procedure comprises excluding cache lines of the plurality of cache ways that meet the eviction criteria from replacement operations.

11. An apparatus for executing a partial cache avalanche procedure, the apparatus comprising: a memory including computer executable instructions; and a processor configured to execute the computer executable instructions and cause the apparatus to: counting a number of cache lines that meet an eviction criterion based on a deterministic cache eviction policy in each cache way in a set of cache ways; selecting at least one cache way from the group for avalanche based on a number of cache lines corresponding to the at least one cache way that meet the eviction criteria; as well as The partial cache avalanche procedure is performed based on selecting the at least one cache way from the group for avalanche.

12. The apparatus of claim 11, wherein the deterministic cache eviction policy comprises at least one of: a least recently used (LRU) cache line eviction policy or a least frequently used (LFU) cache line eviction policy.

13. The apparatus of claim 11, wherein the processor is further configured to determine that one or more avalanche criteria are satisfied prior to executing the partial cache avalanche procedure.

14. The apparatus of claim 13, wherein the avalanche criteria is based on at least one of a number of active cores or a request for partial cache avalanche.

15. The apparatus of claim 11, wherein the processor being configured to execute the partial cache avalanche procedure comprises the processor being configured to: identifying one or more sets, the one or more sets each containing at least one cache line that does not satisfy the eviction criteria in selecting the cache way from the group for avalanche; and In the set under consideration in the identified sets, a cache line satisfying an eviction criterion is evicted from another cache way in the set of cache ways that is not selected for avalanche, and the evicted cache line is assigned to a cache line that does not satisfy the eviction criterion of the cache way selected from the set for avalanche.

16. The apparatus of claim 15, wherein the processor is further configured to determine that the cache line from the another cache way satisfies an additional criterion.

17. The apparatus of claim 16, wherein the processor is further configured to select the cache line satisfying the additional criterion from the one or more non-dirty cache lines of the another cache way.

18. The apparatus of claim 11, wherein the processor being configured to select at least one cache way from the group for avalanche comprises the processor being configured to select a cache way having a highest number of cache lines that satisfy the eviction criteria for avalanche.

19. The apparatus of claim 11, wherein the processor being configured to select at least one cache way from the group for avalanche comprises the processor being configured to select a plurality of cache ways having a highest number of cache lines that satisfy the eviction criteria.

20. The apparatus of claim 19, wherein the processor being configured to perform the partial cache avalanche procedure comprises the processor being configured to exclude cache lines of the plurality of cache ways that meet the eviction criteria from replacement operations.

21. A non-transitory computer readable medium comprising computer executable instructions which, when executed by a processor of a device, cause the device to perform a partial cache avalanche procedure, the partial cache avalanche procedure comprising: counting a number of cache lines that meet an eviction criterion based on a deterministic cache eviction policy in each cache way in a set of cache ways; selecting at least one cache way from the group for avalanche based on a number of cache lines corresponding to the at least one cache way that meet the eviction criteria; as well as The partial cache avalanche procedure is performed based on selecting the at least one cache way from the group for avalanche.

22. The non-transitory computer-readable medium of claim 21, wherein the deterministic cache eviction policy comprises at least one of: a least recently used (LRU) cache line eviction policy or a least frequently used (LFU) cache line eviction policy.

23. The non-transitory computer readable medium of claim 21, wherein the partial cache avalanche procedure further comprises determining that one or more avalanche criteria are satisfied prior to executing the partial cache avalanche procedure.

24. The non-transitory computer readable medium of claim 23, wherein the avalanche criteria is based on at least one of a number of active cores or a request for partial cache avalanche.

25. The non-transitory computer readable medium of claim 21 , wherein executing the partial cache avalanche procedure comprises: identifying one or more sets, the one or more sets each containing at least one cache line that does not satisfy the eviction criteria in the cache way selected from the group for avalanche; as well as In the set under consideration in the identified sets, a cache line satisfying an eviction criterion is evicted from another cache way in the set of cache ways that is not selected for avalanche, and the evicted cache line is assigned to a cache line that does not satisfy the eviction criterion of the cache way selected from the set for avalanche.

26. The non-transitory computer readable medium of claim 25, wherein the cache line from the another cache way satisfies an additional criterion.

27. The non-transitory computer-readable medium of claim 26, wherein the partial cache avalanche procedure further comprises selecting the cache line that satisfies the additional criterion from the one or more non-dirty cache lines of the another cache way.

28. The non-transitory computer readable medium of claim 21, wherein selecting at least one cache way from the set for avalanche comprises selecting a cache way having a highest number of cache lines that meet the eviction criteria for avalanche.

29. The non-transitory computer readable medium of claim 21, wherein selecting at least one cache way from the set for avalanche comprises selecting a plurality of cache ways having a highest number of cache lines that satisfy the eviction criteria.

30. An apparatus for executing a partial cache avalanche procedure, the apparatus comprising: means for counting a number of cache lines that meet eviction criteria based on a deterministic cache eviction policy in each cache way in a set of cache ways; means for selecting at least one cache way from the group for avalanche based on a number of cache lines corresponding to the at least one cache way that meet the eviction criteria; and Means for executing the partial cache avalanche procedure based on selecting the at least one cache way from the group for avalanche.

Citation Information

Patent Citations

  • Cost-aware cache replacement

    CN108885590A

  • A system and method for avoiding cache avalanche through multi-level caching in micro-service

    CN109669960A

  • Dynamic powering of cache memory by ways within multiple set groups based on utilization trends

    EP3236359A1

  • Management of caches

    US20150039833A1