WO2023133018A1 - Priority-based cache-line fitting in compressed memory systems of processor-based systems - Google Patents
Priority-based cache-line fitting in compressed memory systems of processor-based systems Download PDFInfo
- Publication number
- WO2023133018A1 WO2023133018A1 PCT/US2022/081266 US2022081266W WO2023133018A1 WO 2023133018 A1 WO2023133018 A1 WO 2023133018A1 US 2022081266 W US2022081266 W US 2022081266W WO 2023133018 A1 WO2023133018 A1 WO 2023133018A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- cache line
- compressed
- overflow
- size
- candidate
- Prior art date
Links
- 238000007906 compression Methods 0.000 claims abstract description 48
- 230000006835 compression Effects 0.000 claims abstract description 48
- 238000012856 packing Methods 0.000 claims abstract description 40
- 238000000638 solvent extraction Methods 0.000 claims abstract description 8
- 238000000034 method Methods 0.000 claims description 64
- 230000004044 response Effects 0.000 claims description 36
- 238000005192 partition Methods 0.000 claims description 6
- 230000006837 decompression Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 12
- 238000013144 data compression Methods 0.000 description 4
- 238000013459 approach Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000003116 impacting effect Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0893—Caches characterised by their organisation or structure
- G06F12/0895—Caches characterised by their organisation or structure of parts of caches, e.g. directory or tag array
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/0284—Multiple user address space allocation, e.g. using different base addresses
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0877—Cache access modes
- G06F12/0886—Variable-length word access
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1016—Performance improvement
- G06F2212/1024—Latency reduction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1041—Resource optimization
- G06F2212/1044—Space efficiency improvement
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1056—Simplification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/40—Specific encoding of data in memory or cache
- G06F2212/401—Compressed data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/65—Details of virtual memory and virtual address translation
- G06F2212/657—Virtual address space management
Definitions
- the disclosed embodiments relate generally to memory systems, and in particular, to priority-based cache-line fitting in compressed memory systems of processor-based systems.
- a data compression system can be employed in a processor-based system to store data in a compressed format, thus increasing effective memory capacity without increasing physical memory capacity.
- some conventional data compression systems provide a compression engine to compress data to be written to a main system memory.
- the compression engine After performing compression, the compression engine writes the compressed data to the system memory, along with metadata that maps a virtual address of the compressed data to a physical address in the system memory where the compressed data is actually stored.
- metadata is used for address mapping
- memory access incurs extra reads and writes that negatively impact system performance. For example, accessing a particular cache line in memory may require access to metadata in the memory and an additional layer of address computation to determine the location of the compressed cache line in memory corresponding to the particular cache line. This can increase complexity, cost, and latency to a processor-based system employing memory capacity compression.
- a method for compressing data in a compressed memory system of a processor-based system.
- the method includes partitioning a memory region into a plurality of data regions, each data region associated with a respective priority level.
- the method also includes selecting (i) a first cache line from a first data region of the plurality of data regions and (ii) a second cache line from a second data region of the plurality of data regions.
- the first data region has a higher priority level than the second data region.
- the method also includes compressing (i) the first cache line to obtain a first compressed cache line and (ii) the second cache line to obtain a second compressed cache line.
- the method includes writing (i) the first compressed cache line to a first predetermined portion of a candidate compressed cache line, and (ii) either the second cache line or a second portion of the second compressed cache line to a second predetermined portion of the candidate compressed cache line.
- the first predetermined portion is larger than the second predetermined portion.
- the method further includes, in accordance with a determination that (i) the first cache line is not compressible, (ii) the second cache line is not compressible, or (iii) the second compressed cache line does not fit within the second predetermined portion of the candidate compressed cache line, setting an overflow pointer in the candidate compressed cache line.
- the overflow pointer points to one of a plurality of overflow blocks depending on compressibility of the second cache line or a size of the second compressed cache line. Each overflow block of the plurality of overflow blocks is of a different size.
- the method further includes receiving a read request for the first cache line or the second cache line; and in response to receiving the read request: in accordance with a determination that the overflow pointer is set, retrieving data from an overflow block of the plurality of overflow blocks according to the overflow pointer.
- the method further includes, in accordance with a determination that the first cache line is compressible: setting a first compressibility control bit in the candidate compressed cache line; and in accordance with a determination that the first cache line is not compressible: writing a first portion of the first cache line to the candidate compressed cache line; writing a remaining portion of the first cache line to an overflow block; resetting the first compressibility control bit in the candidate compressed cache line; and setting an overflow pointer in the candidate compressed cache line to point to the overflow block.
- the method further includes, in response to receiving a read request for the first cache line: in accordance with a determination that the first compressibility control bit is set: retrieving the first cache line from the candidate compressed cache line; and in accordance with a determination that the first compressibility control bit is reset: retrieving the first portion of the first cache line from the candidate compressed cache line; and retrieving the second portion of the first cache line from the overflow block based on the overflow pointer.
- the method further includes, in accordance with a determination that the first cache line is not compressible: writing either the second cache line or the second compressed cache line to the overflow block depending on whether the second cache line is compressible; and resetting a second compressibility control bit in the candidate compressed cache line to indicate if the second cache line is not compressible.
- the method further includes, in response to receiving a read request for the second cache line: retrieving either the second cache line or the second compressed cache line from the overflow block, based on the second compressibility control bit.
- the method further includes: in response to receiving a cache line write request for the first cache line: compressing the first cache line to obtain a first updated cache line of a first size; in accordance with a determination that the first size is equal to or less than a first predetermined size of the candidate compressed cache line, writing the first updated cache line to the candidate compressed cache line; in accordance with a determination that the first size is more than the first predetermined size and equal to or less than a second predetermined size of the candidate compressed cache line, performing a read-modify-write operation on the candidate compressed cache line based on the first updated cache line; and in accordance with a determination that the first size is more than the second predetermined size of the candidate compressed cache line, performing a read- modify-write operation on the candidate compressed cache line and a read-modify -write operation on an overflow block of the plurality of overflow blocks, based on the first updated cache line.
- the first predetermined size is a half of size of the candidate compressed cache line.
- the method further includes, while writing either the second cache line or the second portion of the second compressed cache line to the second predetermined portion of the candidate compressed cache line, writing an ending bit index in the candidate compressed cache line to indicate where the second cache line or the second portion of the second compressed cache line was written to within the candidate compressed cache line; and computing the second predetermined size based on the ending bit index in the candidate compressed cache line.
- the method further includes, in response to receiving a cache line write request for the second cache line: compressing the second cache line to obtain a second updated cache line of a second size; in accordance with a determination that a sum of the second size and the size of the first compressed cache line is less than a first predetermined size of the candidate compressed cache line, performing a read-modify-write operation to write the second updated cache line to the candidate compressed cache line; and in accordance with a determination that the sum of the second size and the size of the first compressed cache line is not less than the first predetermined size of the candidate compressed cache line, performing (i) a first read-modify -write operation to write a first portion of the second updated cache line to the candidate compressed cache line, and (ii) a second read-modify -write operation to write a remaining portion of the second updated cache line to an overflow block pointed to by the overflow pointer.
- the method further includes, in response to receiving a cache line write request for the first cache line or the second cache line: compressing the first cache line or the second cache line to obtain an updated compressed cache line of an updated size; and in accordance with a determination that the updated size cannot fit within the overflow block pointed to by the overflow pointer, freeing the overflow pointer and updating the overflow pointer to point to a new overflow block of the plurality of overflow blocks.
- the first compressed cache line, the second compressed cache line, and the candidate compressed cache line are of equal size.
- the first data region and the second data region are of equal size.
- the second predetermined portion is less than half the size of the candidate compressed cache line.
- the first compressed cache line and the second compressed cache line are written to the candidate compressed cache line in opposite directions.
- the first compressed cache line and the second compressed cache line are separated by one or more bytes.
- a compressed memory system of a processor-based system includes a memory partitioning circuit configured to partition a memory region into a plurality of data regions. Each data region is associated with a respective priority level.
- the compressed memory system also includes a cache line selection circuit configured to select (i) a first cache line from a first data region of the plurality of data regions and (ii) a second cache line from a second data region of the plurality of data regions. The first data region has a higher priority level than the second data region.
- the compressed memory system also includes a compression circuit configured to compress (i) the first cache line to obtain a first compressed cache line and (ii) the second cache line to obtain a second compressed cache line.
- the compressed memory system also includes a cache line packing circuit configured to: in accordance with a determination that the first cache line is compressible: write (i) the first compressed cache line to a first predetermined portion of a candidate compressed cache line, and (ii) either the second cache line or a second portion of the second compressed cache line to a second predetermined portion of the candidate compressed cache line.
- the first predetermined portion is larger than the second predetermined portion.
- the cache line packing circuit is further configured to: in accordance with a determination that (i) the first cache line is not compressible, (ii) the second cache line is not compressible, or (iii) the second compressed cache line does not fit within the second predetermined portion of the candidate compressed cache line: set an overflow pointer in the candidate compressed cache line.
- the overflow pointer points to one of a plurality of overflow blocks depending on compressibility of the second cache line or a size of the second compressed cache line, and each overflow block of the plurality of overflow blocks is of a different size.
- the cache line packing circuit is further configured to: receive a read request for the first cache line or the second cache line; and in response to receiving the read request: in accordance with a determination that the overflow pointer is set, retrieve data from an overflow block of the plurality of overflow blocks according to the overflow pointer.
- the cache line packing circuit is further configured to: in accordance with a determination that the first cache line is compressible: set a first compressibility control bit in the candidate compressed cache line; and in accordance with a determination that the first cache line is not compressible: write a first portion of the first cache line to the candidate compressed cache line; write a remaining portion of the first cache line to an overflow block; reset the first compressibility control bit in the candidate compressed cache line; and set an overflow pointer in the candidate compressed cache line to point to the overflow block.
- the cache line packing circuit is further configured to: in response to receiving a read request for the first cache line: in accordance with a determination that the first compressibility control bit is set: retrieve the first cache line from the candidate compressed cache line; and in accordance with a determination that the first compressibility control bit is reset: retrieve the first portion of the first cache line from the candidate compressed cache line; and retrieve the second portion of the first cache line from the overflow block based on the overflow pointer.
- the cache line packing circuit is further configured to: in accordance with a determination that the first cache line is not compressible: write either the second cache line or the second compressed cache line to the overflow block depending on whether the second cache line is compressible; and reset a second compressibility control bit in the candidate compressed cache line to indicate if the second cache line is not compressible.
- the cache line packing circuit is further configured to: in response to receiving a read request for the second cache line: retrieve either the second cache line or the second compressed cache line from the overflow block, based on the second compressibility control bit.
- the cache line packing circuit is further configured to: in response to receiving a cache line write request for the first cache line: compress the first cache line to obtain a first updated cache line of a first size; in accordance with a determination that the first size is equal to or less than a first predetermined size of the candidate compressed cache line, write the first updated cache line to the candidate compressed cache line; in accordance with a determination that the first size is more than the first predetermined size and equal to or less than a second predetermined size of the candidate compressed cache line, perform a read-modify-write operation on the candidate compressed cache line based on the first updated cache line; and in accordance with a determination that the first size is more than the second predetermined size of the candidate compressed cache line, perform a read-modify -write operation on the candidate compressed cache line and a read-modify -write operation on an overflow block of the plurality of overflow blocks, based on the first updated cache line.
- the first predetermined size is a half of size of the candidate compressed cache line.
- the cache line packing circuit is further configured to: while writing either the second cache line or the second portion of the second compressed cache line to the second predetermined portion of the candidate compressed cache line, write an ending bit index in the candidate compressed cache line to indicate where the second cache line or the second portion of the second compressed cache line was written to within the candidate compressed cache line; and compute the second predetermined size based on the ending bit index in the candidate compressed cache line.
- the cache line packing circuit is further configured to: in response to receiving a cache line write request for the second cache line: compress the second cache line to obtain a second updated cache line of a second size; in accordance with a determination that a sum of the second size and the size of the first compressed cache line is less than a first predetermined size of the candidate compressed cache line, perform a read- modify-write operation to write the second updated cache line to the candidate compressed cache line; and in accordance with a determination that the sum of the second size and the size of the first compressed cache line is not less than the first predetermined size of the candidate compressed cache line, perform (i) a first read-modify -write operation to write a first portion of the second updated cache line to the candidate compressed cache line, and (ii) a second read-modify -write operation to write a remaining portion of the second updated cache line to the overflow block pointed to by the overflow pointer.
- the cache line packing circuit is further configured to: in response to receiving a cache line write request for the first cache line or the second cache line: compress the first cache line or the second cache line to obtain an updated compressed cache line of an updated size; and in accordance with a determination that the updated size cannot fit within the overflow block pointed to by the overflow pointer, free the overflow pointer and updating the overflow pointer to point to a new overflow block of the plurality of overflow blocks.
- the first compressed cache line, the second compressed cache line, and the candidate compressed cache line are of equal size.
- the first data region and the second data region are of equal size.
- the second predetermined portion is less than half the size of the candidate compressed cache line.
- the cache line packing circuit is further configured to: write the first compressed cache line and the second compressed cache line to the candidate compressed cache line in opposite directions. The first compressed cache line and the second compressed cache line are separated by one or more bytes.
- a compressed memory system of a processor-based system includes a memory region comprising a plurality of cache lines. Each cache line has one of a plurality of priority levels.
- the compressed memory system also includes a compressed memory region comprising a plurality of compressed cache lines. Each compressed cache line includes a first set of data bits configured to hold, in a first direction, either a portion of a first cache line or a portion of the first cache line after compression, the first cache line having a first priority level.
- Each compressed cache line also includes a second set of data bits configured to hold, in a second direction opposite to the first direction, either a portion of a second cache line or a portion of the second cache line after compression, the second cache line having a second priority level lower than the first priority level.
- the first set of data bits includes a greater number of bits than the second set of data bits.
- the compressed memory system further includes an overflow memory region including a plurality of overflow bins.
- Each overflow bin is configured to hold a distinct number of bytes.
- Each compressed cache line further includes a set of overflow pointer bits configured to hold a pointer to an overflow bin of the plurality of overflow bins.
- each compressed cache line further includes: a first control bit to indicate a compressibility of the first cache line; and a second control bit to indicate a compressibility of the second cache line.
- the compressed memory system further includes an overflow memory region including a plurality of overflow bins, wherein each overflow bin is configured to hold a distinct number of bytes.
- Each compressed cache line further includes a set of bits configured to hold a size of an overflow bin of the plurality of overflow bins.
- each compressed cache line further includes an ending bit index indicating an end of the second set of data bits.
- each overflow bin is configured to hold bits of the first cache line, and/or bits of the second cache line or the second cache line after compression, in the first direction.
- the first set of data bits is separated by one or more bytes from the second set of data bits.
- each cache line and each compressed cache line are of a same size.
- each compressed cache line when the first cache line after compression or the second cache line after compression does not fit in the compressed cache line then each compressed cache line further includes a set of overflow pointer bits configured to hold a pointer to an overflow bin of the plurality of overflow bins.
- the overflow bin is configured to hold bits of the first cache line, the first cache line after compression, the second cache line, and/or the second cache line after compression.
- the second set of data bits is further configured to hold a plurality of control bits that indicate overflow and an end of the second set of data bits in a compressed cache line.
- a non-transitory computer-readable medium stores thereon computer-executable instructions which, when executed by a processor, cause the processor to perform any of the methods described herein.
- Figure l is a schematic diagram of an example system with a cache line compression/decompression hardware engine, according to some implementations.
- Figure 2A is a schematic diagram of a compressed memory system 200, according to some implementations.
- Figure 2B is a sequence diagram illustrating a method for reading cache lines using the compressed memory system shown in Figure 2A, according to some implementations.
- Figure 2C is a sequence diagram illustrating a method for writing cache lines using the compressed memory system shown in Figure 2A, according to some implementations.
- Figure 3 is a schematic diagram of a packing scheme for compressed memory systems, according to some implementations.
- Figures 4-9 show example compressed line layouts, according to some implementations.
- Figure 10 shows a flowchart for an example method for reading high priority cache lines, according to some implementations.
- Figure 11 shows a flowchart for an example method for reading low priority cache lines, according to some implementations.
- Figure 12 shows a flowchart for an example method for writing high priority cache lines, according to some implementations.
- Figure 13 shows a flowchart for an example method for writing low priority cache lines, according to some implementations.
- Figure 14 is a block diagram of an example compressed memory system of a processor-based system, according to some implementations.
- FIG. 1 is a schematic diagram of an example system 100 with a cache line compression/decompression hardware engine 110, according to some implementations.
- the system 100 includes a chip 102 that in turn includes a processor 104, a level 2 (L2) cache or L2 tightly coupled memory (TCM) 106, and a compression/decompression hardware engine 110.
- the processor 104 includes a memory management unit (MMU), a data cache, and an instruction cache.
- the data cache and the instruction cache constitute a level 1 (LI) cache.
- the L2 cache or L2 TCM 106 includes a L2 control and L2 cache tag or state module 108.
- the system also includes a memory controller 114 for accessing a main, external memory (e.g., double rate dynamic random access memory (DRAM), sometimes called DDR).
- main, external memory e.g., double rate dynamic random access memory (DRAM), sometimes called DDR.
- DRAM double rate dynamic random access memory
- some implementations may include conventional peripherals, other storage, an express peripheral component interconnect (PCI) interface, a direct memory access (DMA) controller, and/or an integrated memory controller (IMC).
- Some implementations may include two or more processors or processor blocks, and/or a shared level 3 (L3) cache for storing cache data that is used by any of, or shared among, each of the processor blocks.
- L3 cache shared level 3
- Some implementations include an internal system bus that allows each of the processor blocks to access the shared L3 cache and/or other shared resources including the memory controller 114.
- the processor-based system 100 is configured to store cache data in uncompressed form in cache entries in a cache memory.
- the cache entries may be cache lines.
- the cache memory may be a L2 cache memory (e.g., the L2 cache 106).
- the cache memory may be private to a processor core in the processor 104 or shared between multiple processor cores.
- the processor-based system 100 includes a system memory 112 that includes a compressed data region configured to store data in memory entries (which may be memory lines) in compressed form.
- the system memory 112 may include a double data rate (DDR) static random access memory (SRAM).
- DDR double data rate
- SRAM static random access memory
- the processor 104 is configured to access the system memory 112 during read and write operations to execute software instructions and perform other processor operations.
- Figure 2A is a schematic diagram of a compressed memory system 200, according to some implementations.
- the compressed memory system is configured to compress cache data from an evicted cache entry in a cache memory and read metadata used to access a physical address in the compressed system memory to write the compressed cache data.
- Providing the ability to store compressed data in a compressed data region e.g., blocks 202, 204, 206) increases memory capacity of the processor-based system 100 over physical memory size of the system memory 112.
- the processor 104 uses virtual addressing. A virtual-to-physical address translation is performed to effectively address the compressed data region without being aware of the compression system and compression size of the compressed data region.
- a compression or decompression engine 212 is provided in the compressed memory system 200 to compress uncompressed data from the processor 104 to be written into the compressed data region, and to decompress compressed data received from the compressed data region to provide such data in uncompressed form to the processor 104.
- the compression or decompression engine 212 may include a compress circuit configured to compress data from the processor 104 to be written into the compressed data region.
- the compress circuit may be configured to compress 64-byte (64B) data words down to 48-byte (48B) compressed data words, 32-byte (32B) compressed data words, or 16-byte (16B) compressed data words, which can be stored in respective memory blocks 202(64B), 204(48B), 206(32B), and 204(16B), each having a smaller size than each of the entire memory entries of the system memory 112. If uncompressed data from the processor 104 cannot be compressed down to the next smaller-sized memory block 125 configured for the compressed memory system 102, such uncompressed data is stored uncompressed over the entire width of one of the memory entries.
- the width of the one of the memory entries may be 64B, and thus can store 64B memory blocks, such as the memory block 202(64B).
- the compression or decompression engine 212 also includes a decompress circuit configured to decompress compressed data from the compressed data region to be provided to the processor 104.
- cache memory 214 (e.g., the L2 cache 106) is provided.
- Cache entries in the cache memory 214 are configured to store the cache data in uncompressed form.
- Each of the cache entries may be the same width as each of the memory entries for performing efficient memory read and write operations.
- the cache entries are accessed by respective virtual address (“VA”) tags (e.g., tags stored in the L2 cache tag 108), because as discussed above, the compressed memory system 200 provides more addressable memory space to the processor 104 than physical address space provided in the compressed data region.
- VA virtual address
- a virtual address of the memory read request is used to search the cache memory 214 to determine if the virtual address matches one of the virtual address tags of the cache entries. If so, a cache hit occurs, and the cache data in the hit cache entry of the cache entries is returned to the processor 104 without the need to decompress the cache data. However, because the number of the cache entries is less than the number of the memory entries, a cache miss can occur where the cache data for the memory read request is not contained in the cache memory 214.
- the cache memory 214 is configured to provide the virtual address of the memory read request to the compression circuit to retrieve data from the compressed data region.
- the compression circuit may first consult a metadata cache that contains metadata cache entries each containing metadata indexed by a virtual address.
- the metadata cache is faster to access than the compressed data region.
- the metadata is data, such as a pointer, used to access a physical address (PA) in the compressed data region to access the memory entries containing the compressed data for the virtual address. If the metadata cache contains the metadata for the memory read request, the compression circuit uses the metadata to access the correct memory entry of the memory entries in the compressed data region to provide the corresponding compressed data region to the decompress circuit.
- PA physical address
- the compression circuit provides the virtual address for the memory read request to a metadata circuit 210 that contains metadata in corresponding metadata entries for all virtual address space in the processor-based system 100.
- the metadata circuit 210 can be linearly addressed by the virtual address of the memory read request.
- the metadata is used to access the correct memory entry of the memory entries in the compressed data region for the memory read request to provide the corresponding compressed data region to the decompress circuit.
- the decompress circuit receives the compressed data region in response to the memory read request.
- the decompress circuit decompresses the compressed data region into uncompressed data, which can then be provided to the processor 104.
- the uncompressed data is also stored in the cache memory 214. However, if the cache memory 214 does not have an available cache entry of the cache entries, the cache memory 214 may evict one of the existing cache entries to the compressed data region to make room for storing the uncompressed data.
- the cache memory 214 first sends the virtual address and uncompressed cache data of the evicted cache entry to the compress circuit.
- the compress circuit receives the virtual address and the uncompressed cache data for the evicted cache entry.
- the compress circuit initiates a metadata read operation to the metadata cache to obtain metadata associated with the virtual address.
- the compress circuit compresses the uncompressed cache data into compressed data to be stored in the compressed data region. If the metadata read operation to the metadata cache results in a cache miss, the metadata cache issues a metadata read operation to the metadata circuit 210 in the system memory 112 to obtain metadata associated with the virtual address.
- the metadata cache is then stalled. Because accesses to the compressed data region can take much longer than the processor 104 can issue memory access operations, uncompressed data received from the processor 104 for subsequent memory write requests may be buffered in a memory request buffer.
- the metadata cache After the metadata comes back from the compressed data region to update the metadata cache, the metadata cache provides the metadata as the metadata to the compress circuit.
- the compress circuit determines whether the new compression size of the compressed data region fits into the same memory block size in the compressed data region as used to previously store data for the virtual address of the evicted cache entry. For example, the processor 104 may have updated the cache data in the evicted cache entry since being last stored in the compressed data region.
- the compress circuit recycles a pointer to the current memory block in the compressed memory system 200 associated with the virtual address of the evicted cache entry to one of free memory lists (e.g., list of free 64B blocks 216, list of free 48B blocks 218, list of free 32B blocks 220, and list of free 16B blocks 222) of pointers to available memory blocks in the compressed data region.
- the compress circuit obtains the pointer from one of the free memory lists to the new, available memory block of desired memory block size in the compressed data region to store the compressed data region for the evicted cache entry.
- the compress circuit then stores the compressed data region for the evicted cache entry in the memory block in the compressed data region associated with the virtual address for the evicted cache entry determined from the metadata.
- the metadata in the metadata cache entry of the metadata cache entries corresponding to the virtual address tag of the virtual address tags of the evicted cache entry is updated based on the pointer to the new memory block.
- the metadata cache then updates the metadata in the metadata entry of the metadata entries corresponding to the virtual address in the metadata cache based on the pointer to the new memory block 125.
- the metadata circuit 210 may consume an excessive amount of the system memory 112, thus negatively impacting system performance. Accordingly, it is desirable to minimize the amount of the system memory 112 that is required to store the metadata, while still providing effective data compression. In this regard, some implementations of the compressed memory system 200 reduce metadata size. The techniques described herein can be used to
- Figure 2A shows the uncompressed data indexed linearly through meta data, according to some implementations.
- An uncompressed cache line is represented by 3 bytes of meta data and the meta data points to a compressed block with size 16, 32, 48 or 64 bytes (e.g., the blocks 202, 204, and 206).
- the meta data circuit 210 flags that without pointing to any compressed block.
- the compressed memory system 200 includes a register file 208 that holds base pointers for the blocks 202, 204, and 206, and the metadata circuit 210 provides offsets from the base pointers for the blocks.
- FIG. 2B is a sequence diagram illustrating a method for reading cache lines using the compressed memory system shown in Figure 2A, according to some implementations.
- a read address for the external memory is sent to the compression or decompression engine 212 which fetches cached L2 metadata if it is available. If the metadata is not available in the cache, the metadata is read from the external memory (e.g., DDR). Based on the metadata, compressed data is fetched from the external memory from a block of the compressed data region. The compressed data is then decompressed by the decompression circuit and the uncompressed data is returned to the processor.
- a 0 cache line e.g., 64 bytes of Os
- other cache lines require two reads - one read for the metadata and one read for the compressed block.
- Figure 2C is a sequence diagram illustrating a method for writing cache lines using the compressed memory system shown in Figure 2A, according to some implementations.
- uncompressed data is sent to the compression or decompression engine 212, and the compression circuit compresses the data to a new size.
- the metadata is retrieved from the external memory. If the metadata is available in the metadata cache, the metadata is retrieved from the metadata cache.
- a new index for the new size may be retrieved from the free list (e.g., one of the lists 216, 218, 220, 222) depending on the size of the compressed data, and the compressed data is written to the compressed data region.
- old index may be recycled, and metadata is updated in the external memory.
- this methodology for cache line writes, if cache line is all 0s, the write requires one read-modified-write for meta data, other cache lines require one read-modified-write for meta data, and one write or one read-modified-write for compressed data depending on the size of the compressed block.
- Figure 3 is a schematic diagram of a packing scheme 300 for compressed memory systems that help avoid the extra reads and writes of metadata described above, according to some implementations.
- Figure 3 shows a memory region (e.g., a compression data candidate) partitioned into high and low priority parts 302 and 304 with equal size.
- the memory region may be partitioned into any number of partitions with different priority levels, and/or the partitions may have unequal amount of data.
- One high priority cache line and one low priority cache line are selected and compressed to fit in a compressed cache line 306.
- an overflow pointer is reserved in the compressed line that points to an overflow block (e.g., overflow bins 308, 310, or 312, each bin having a different size).
- an overflow block e.g., overflow bins 308, 310, or 312, each bin having a different size.
- some implementations use a plurality of overflow blocks (e.g., the overflow bin holds 32 bytes of data, the overflow bin 310 holds 64 bytes of data, and the overflow bin 312 holds 96 bytes of data).
- the compressed low priority line only occupies the lower half of the compressed line.
- a compressed line (CL) 400 may include: (i) HP 402 which indicates compressed data for a high priority cache line; (ii) LP 404 which indicates compressed data for a low priority cache line; (iii) HPC 406 which is a flag that indicates whether the high priority cache line is compressed. For example, 1 indicates compressed, 0 indicates not compressed; (iv) LPC 408 which is a flag that indicates whether the low priority cache line is compressed.
- 1 indicates compressed, 0 indicates not compressed;
- OFB 410 which indicates overflow bin size. For example, 0 indicates 32 bytes, 1 indicates 64 bytes, 2 indicates 96 bytes, and 3 indicates no overflow;
- OFP 412 which indicates an overflow pointer index; and/or
- LPE 414 which indicates a low priority ending bit index, indicating where the low priority compressed data ends.
- This information can be used to expand the high priority cache line on the write path. Value may be between 11 and 255. 0 may mean no space left for HP to expand. Implementations may use any number of these fields.
- high priority compression or decompression starts from HPC bit towards the OFP, as indicated by the arrow 416.
- low priority compression or decompression starts from the OFP towards where LPE points (as indicated by the arrow 418), and it continues from right to left in the overflow region if it has an overflow (as indicate by the arrow 420).
- Region 420 of the CL is unused by CL, and/or the HP 402 and LP 404 are separated bv a gap 422, according to some implementations.
- 32 bytes are dedicated for HP, and 32 bytes can be used by either HP/LP, and there are 31 control bits including the OFP 412, LPE 414, OFB 410, and LPC 408.
- the compressed line may have slightly different layout as further described below in reference to Figures 5-10, according to some implementations.
- the number of control bits may be reduced (e.g., because there is no overflow, there is no need for an OFP, and the bits are instead consumed by LP).
- Figure 5 shows an example compressed line layout 500 when HP is less than 256 bits and low priority lines fit in a CL, according to some implementations.
- HPC is set to 1
- OFB is set to 0x11
- LPC is set to 1, according to some implementations.
- Figure 6 shows an example compressed line layout 600 when both HP and LP fit in one CL, and HP is greater than 255 bits, according to some implementations.
- HPC is set to 1
- OFB is set to 0x11
- LPC is set to 1, according to some implementations.
- HP has expanded into the lower half of the CL, in this example.
- Figure 7 shows an example compressed line layout 700 when HP is less than 256 bits, and LP has overflow, according to some implementations.
- HPC is set to 1
- OFB is any value between 0x0 and 0x2
- LPC is set to either 1 or 0, and OFP points to an overflow block 424, according to some implementations.
- Figure 8 shows an example compressed line layout 800 when HP is greater than 255 bits but less than 480 bits, and LP has overflow, according to some implementations.
- HPC is set to 1
- OFB is set to a value between 0 and 2
- LPC is either 1 or 0, and OFP points to an overflow block 426, according to some implementations.
- Figure 9 shows an example compressed line layout 900 when HP is equal to 512 (not compressible), and LP has overflow, according to some implementations.
- HPC is set to 0
- OFB is set to a value between 0 and 2
- LPC is set to 0 or 1
- OFP points to an overflow block 428, according to some implementations.
- the overflow block 428 includes the remaining 32 bits of HP 430, a gap 432 and the LP 404.
- high and low priority cache line fitting in one compressed cache line require one read, and other cache lines require two reads, one for compressed line and one for overflow block.
- compressed high priority cache line fitting in 255 bits requires one write
- compressed high priority cache line fitting in 256-480 bits requires one read-modified-write
- other non-compressible high priority cache lines (> 480 bits) require one read-modified-write to a compressed line and one read-modified-write to an overflow block
- low priority cache line fitting in the compressed line requires one read- modified-write
- low priority cache line not fitting in the compressed line requires one read- modified-write to compressed line and one read-modified-write to an overflow block.
- FIG 10 shows a flowchart for an example method 1000 for reading high priority cache lines, according to some implementations.
- the method 1000 includes receiving (1002) a request for a HP read, and reading (1004) a CL.
- the method also includes determining (1006) if HPC is equal to 1. If HPC is 1, the HP is decompressed. If HPC is not 1, then an overflow block pointed to by OFP is read (1010), and 480 bits are copied (1012) from compress line and 32 bits are copied from OFP block.
- FIG 11 shows a flowchart for an example method 1100 for reading low priority cache lines, according to some implementations.
- the method 1100 includes receiving (1102) a request for a LP read, and reading (1104) a CL.
- the method also includes determining (1106) if OFB is set to 3 (hexadecimal value 0x11). If OFB is set to 3, the LP is decompressed (1108) from 11 th to LPE bits. If OFB is not set to 3, then the OFP is read (1110) and bits from 32 nd to LPE of CL is decompressed and bits from overflow block pointed to by OFP are added (1112).
- Figure 12 shows a flowchart for an example method 1200 for writing high priority cache lines, according to some implementations.
- the method includes receiving (1202) a HP write request and compressing (1204) HP line to HPSZ bits.
- the method also includes determining (1206) if HPSZ is less than 256 bits. If HPSZ is less than 256 bits, then HPC is set to 1 and 32 bytes of HP are written (1210).
- the path through blocks 1202, 1204, 1206, and 1210 forms a short path, and leads to fast write accesses for high priority cache lines.
- a CL is read (1208). Then it is determined (1212) if HPSZ is less than 511 - LPE.
- CL is updated (1214) with HP and HPC is set to 1, and the CL is written (1216). If HPSZ is not less than 511 - LPE, then it is further determined (1218) if OFP is set (or it is checked if the CL has an OFP). If there is an OFP, then the OFP is read (1220). If there is no OFP, then LP contents are read and OFP is freed (1222). Furthermore, it is determined (1224) if HP is compressible (1224). If HP is compressible, then new OFP block with bit size greater than LPSZ - (480 - HPSZ) is obtained (1232), new OFP with LP is updated (1234), and CL is filled with HP and HPC is set to 1 (1236).
- new OFP block with bit size greater than LPSZ + 32 is obtained (1226), 32 bits of HP overflow are copied and new OFP is updated with LP (1228), and CL is filled with HP and HPC is set to 0 (1230). Subsequently, OFP is written (1238) and CL is written (1240).
- FIG. 13 shows a flowchart for an example method 1300 for writing low priority cache lines, according to some implementations.
- the method 1300 includes receiving (1302) a LP write request and compressing line to LPSZ bits and setting LPC to 1 (1304).
- the method also includes determining (1306) if LPSZ is greater than 480 bits. If LPSZ is greater than 480 bits, then LPSZ is set to 512 (to indicate no compression) and LPS is set to 0 (1308). If LPSZ is not greater than 480 bits, compress line is read (1310). It is further determined (1312) if HPC is set to 0. If HPC is set to 0, then OFP line is read (1314). It is further determined if current block is greater than LPSZ plus 32.
- OFP is updated (1324). If current block is not greater than LPSZ plus 32, the new OFP block with bit size greater than LPSZ + 32 is obtained (1318), 32 bits of HP is copied and new OFP is updated (1320), and old OFP is pushed to a free list (1322). Subsequently, OFP is written (1326), compress line is updated (1328) for OFP, OFB, and LPC, and CL is written (1330). If HPC is not equal to 0 (block 1312), then it is further determined (1332) if OFP is not set to OxFF. If it is not, then OFL is freed (1334). If OFP is set to OxFF, HP is decompressed (1336) to find HP end bit.
- HP exceeds 32 bytes. If it is LPSPACE is set to HP end bit - 11. If not, LPSPACE is set to 256 - 11. In either case, it is further determined (1344) if LPSZ is less than LPSPACE. If so, LP is packed (1346) into CL, compress line is updated (1348) for (OFP set to 0x11, LPC, and LPE), and CL is written (1350).
- LPSZ is not less than LPSPACE
- an OFP block with bit size greater than LPSZ - LPSPACE - 20 is obtained (1352)
- LP is packed (1354) into OFP and CL
- CL is updated (1356) for (OFP, OFB, LPC, and LPE)
- CL is written (1358)
- OFP is written (1360).
- FIG 14 is a block diagram of an example compressed memory system 1400 of a processor-based system, according to some implementations.
- the system 1400 includes a memory partitioning circuit 1402 configured to partition a memory region into a plurality of data regions. Each data region is associated with a respective priority level.
- Memory regions include compression data candidates and may include data and/or instructions. For example, a software image can be linked with different sections. Each section can have a different address range.
- the memory partitioning circuit 1402 may be configured to distinguish different data regions based on address range.
- a memory region is shown partitioned into a high-priority aperture 302 and a low-priority aperture 304, according to some implementations.
- more than two apertures (sometimes called data regions) and/or more than two priority levels may be used in some implementations.
- the compressed memory system 1400 also includes a cache line selection circuit 1404 configured to select (i) a first cache line from a first data region of the plurality of data regions and (ii) a second cache line from a second data region of the plurality of data regions.
- a cache line’s address may be used by the cache line selection circuit 1404 to determine whether the cache line belongs to a first data region or a second data region. In accordance with that determination, the cache line selection circuit 1404 may select the first cache line and the second cache line.
- the first data region has a higher priority level than the second data region. For example, in Figure 3, a cache line from the high-priority aperture 302 and a cache line from the low-priority aperture 304 are selected to form a compressed cache line 306.
- the compressed memory system 1400 also includes a compression circuit 1406 configured to compress (i) the first cache line to obtain a first compressed cache line and (ii) the second cache line to obtain a second compressed cache line. Examples of compression circuits are described above in reference to Figures 1, 2 A, 2B and 2C, according to some implementations.
- the compressed memory system 1400 also includes a cache line packing circuit 1408 configured to: in accordance with a determination that the first cache line is compressible, write (i) the first compressed cache line to a first predetermined portion of a candidate compressed cache line, and (ii) either the second cache line or a second portion of the second compressed cache line to a second predetermined portion of the candidate compressed cache line.
- the first predetermined portion is larger than the second predetermined portion.
- Figure 5 shows a high-priority cache line that is compressed and written to HP 402 which indicates a first predetermined portion.
- Figure 5 also shows a low-priority cache line that is compressed and written to LP 404, a second predetermined portion.
- the first and second predetermined portions can correspond to two distinct portions of a compressed cache line.
- the first predetermined portion is filled first with high priority compressed data
- the second predetermined portion can be filled next with low priority data. High priority data can overflow into the second predetermined portion, but the low priority data cannot overflow into the first predetermined portion.
- the second predetermined portion includes control bits and the first predetermined portion does not.
- the compressed data is written in different directions (e.g., towards the intersection of the two portions).
- the cache line packing circuit 1408 is further configured to: in accordance with a determination that (i) the first cache line is not compressible, (ii) the second cache line is not compressible, or (iii) the second compressed cache line does not fit within the second predetermined portion of the candidate compressed cache line: set an overflow pointer (e.g., the OFP 412 in Figure 4) in the candidate compressed cache line.
- the overflow pointer points to one of a plurality of overflow blocks (e.g., one of the overflow bins 308, 310, or 312) depending on compressibility of the second cache line or a size of the second compressed cache line. Each overflow block of the plurality of overflow blocks is of a different size.
- the overflow bins 308, 310, and 312 hold different sizes of data.
- the cache line packing circuit 1408 is further configured to: receive a read request for the first cache line or the second cache line; and in response to receiving the read request: in accordance with a determination that the overflow pointer is set, retrieve data from an overflow block of the plurality of overflow blocks according to the overflow pointer. Examples of overflow blocks and overflow logic are described above in reference to Figures 3, 4, 7, 8, and 9, according to some implementations. Example methods for reading are described above in reference to Figures 10 and 11, according to some implementations.
- the cache line packing circuit 1408 is further configured to: in accordance with a determination that the first cache line is compressible, set a first compressibility control bit (e.g., HPC 406) in the candidate compressed cache line; and in accordance with a determination that the first cache line is not compressible: write a first portion of the first cache line to the candidate compressed cache line; write a remaining portion of the first cache line to an overflow block; reset the first compressibility control bit in the candidate compressed cache line; and set an overflow pointer in the candidate compressed cache line to point to the overflow block.
- a first compressibility control bit e.g., HPC 406
- the cache line packing circuit 1408 is further configured to: in response to receiving a read request for the first cache line: in accordance with a determination that the first compressibility control bit is set: retrieve the first cache line from the candidate compressed cache line; and in accordance with a determination that the first compressibility control bit is reset: retrieve the first portion of the first cache line from the candidate compressed cache line; and retrieve the second portion of the first cache line from the overflow block based on the overflow pointer.
- the cache line packing circuit 1408 is further configured to: in accordance with a determination that the first cache line is not compressible: write either the second cache line or the second compressed cache line to the overflow block depending on whether the second cache line is compressible; and reset a second compressibility control bit (e.g., LPC 408) in the candidate compressed cache line to indicate if the second cache line is not compressible.
- the cache line packing circuit 1408 is further configured to: in response to receiving a read request for the second cache line: retrieve either the second cache line or the second compressed cache line from the overflow block, based on the second compressibility control bit. Example methods for reading high priority cache lines and low priority cache lines are described above in reference to Figures 10 and 11, respectively, according to some implementations.
- the cache line packing circuit 1408 is further configured to: in response to receiving a cache line write request for the first cache line: compress the first cache line (e.g., using the compression circuit 1406) to obtain a first updated cache line of a first size; in accordance with a determination that the first size is equal to or less than a first predetermined size of the candidate compressed cache line, write the first updated cache line to the candidate compressed cache line; in accordance with a determination that the first size is more than the first predetermined size and equal to or less than a second predetermined size of the candidate compressed cache line, perform a read-modify-write operation on the candidate compressed cache line based on the first updated cache line; and in accordance with a determination that the first size is more than the second predetermined size of the candidate compressed cache line, perform a read-modify -write operation on the candidate compressed cache line and a read-modify -write operation on an overflow block of the plurality of overflow blocks, based on the first updated cache line.
- compress the first cache line e.g
- the first predetermined size is a half of size of the candidate compressed cache line.
- the cache line packing circuit 1408 is further configured to: while writing either the second cache line or the second portion of the second compressed cache line to the second predetermined portion of the candidate compressed cache line, write an ending bit index (e.g., LPE 414) in the candidate compressed cache line to indicate where the second cache line or the second portion of the second compressed cache line was written to within the candidate compressed cache line; and compute the second predetermined size based on the ending bit index in the candidate compressed cache line.
- an ending bit index e.g., LPE 414
- the cache line packing circuit 1408 is further configured to: in response to receiving a cache line write request for the second cache line: compress the second cache line to obtain a second updated cache line of a second size; in accordance with a determination that a sum of the second size and the size of the first compressed cache line is less than a first predetermined size of the candidate compressed cache line, perform a read- modify-write operation to write the second updated cache line to the candidate compressed cache line; and in accordance with a determination that the sum of the second size and the size of the first compressed cache line is not less than the first predetermined size of the candidate compressed cache line, perform (i) a first read-modify -write operation to write a first portion of the second updated cache line to the candidate compressed cache line, and (ii) a second read-modify -write operation to write a remaining portion of the second updated cache line to the overflow block pointed to by the overflow pointer.
- HP ends there are no control bits to indicate where HP ends.
- the system decompresses the HP part to determine that information. In some implementations, this is not a true decompression, rather it is a scan through the HP compressed bits (the process is very similar to decompression) to determine the end.
- Some implementations reserve 8-9 bits to indicate the end of HP just like the LP side.
- the cache line packing circuit 1408 is further configured to: in response to receiving a cache line write request for the first cache line or the second cache line: compress the first cache line or the second cache line to obtain an updated compressed cache line of an updated size; and in accordance with a determination that the updated size cannot fit within the overflow block pointed to by the overflow pointer, free the overflow pointer and updating the overflow pointer to point to a new overflow block of the plurality of overflow blocks. Examples for manipulation of free lists are described above in reference to Figures 12 and 13, according to some implementations.
- the first compressed cache line, the second compressed cache line, and the candidate compressed cache line are of equal size.
- each cache line from the region 302, 304, and the compressed cache lines 306 are of 64 bytes.
- the first data region and the second data region are of equal size.
- the regions 302 and 304 are of equal size (e.g., the regions have equal number of cache lines).
- the second predetermined portion is less than half the size of the candidate compressed cache line. Examples of layouts are described above in reference to Figures 4-9, according to some implementations.
- the cache line packing circuit 1408 is further configured to: write the first compressed cache line and the second compressed cache line to the candidate compressed cache line in opposite directions.
- the first compressed cache line and the second compressed cache line are separated by one or more bytes.
- a compressed memory system of a processor-based system includes a memory region comprising a plurality of cache lines.
- Figure 3 shows two memory regions 302 and 304.
- Each cache line has one of a plurality of priority levels.
- the cache lines in the region 302 are of a higher priority than the cache lines in the region 304.
- the compressed memory system also includes a compressed memory region (e.g., region including the compressed cache lines 306) comprising a plurality of compressed cache lines.
- Each compressed cache line includes a first set of data bits configured to hold, in a first direction, either a portion of a first cache line or a portion of the first cache line after compression, the first cache line having a first priority level.
- the layout shown in Figure 4 shows a compressed cache line including HP 402 for storing bits of a high priority cache line, according to some implementations.
- Each compressed cache line also includes a second set of data bits configured to hold, in a second direction opposite to the first direction, either a portion of a second cache line or a portion of the second cache line after compression, the second cache line having a second priority level lower than the first priority level.
- the layout shown in Figure 4 shows a compressed cache line including LP 404 for storing bits for a low priority cache line, according to some implementations.
- the first set of data bits includes a greater number of bits than the second set of data bits.
- HP 402 stores compressed bits in a direction opposite to that of LP 404.
- the compressed memory system further includes an overflow memory region including a plurality of overflow bins (e.g., the overflow block 426).
- Each overflow bin is configured to hold a distinct number of bytes.
- the overflow blocks 308, 310, and 312 each include different number of bytes.
- Each compressed cache line further includes a set of overflow pointer bits (e.g., OFP 412) configured to hold a pointer to an overflow bin of the plurality of overflow bins.
- each compressed cache line further includes: a first control bit (e.g., HPC 406) to indicate a compressibility of the first cache line; and a second control bit (e.g., LPC 408) to indicate a compressibility of the second cache line.
- a first control bit e.g., HPC 406
- a second control bit e.g., LPC 408
- the compressed memory system further includes an overflow memory region including a plurality of overflow bins.
- Each overflow bin is configured to hold a distinct number of bytes.
- Each compressed cache line further includes a set of bits (e.g., OFB 410) configured to hold a size of an overflow bin of the plurality of overflow bins.
- each compressed cache line further includes an ending bit index (e.g., LPE 414) indicating an end of the second set of data bits.
- each overflow bin is configured to hold bits of the first cache line, and/or bits of the second cache line or the second cache line after compression, in the first direction.
- the overflow bin 420 holds bits in the same direction as HP 402.
- the first set of data bits is separated by one or more bytes from the second set of data bits.
- HP 402 and LP 404 are separated by the gap 422.
- each cache line and each compressed cache line are of a same size.
- each cache line 302 and 304, each compressed cache line 306 includes 64 bytes.
- each compressed cache line when the first cache line after compression or the second cache line after compression does not fit in the compressed cache line then each compressed cache line further includes a set of overflow pointer bits configured to hold a pointer to an overflow bin of the plurality of overflow bins.
- the overflow bin is configured to hold bits of the first cache line, the first cache line after compression, the second cache line, and/or the second cache line after compression.
- the OFP 412 is optional, and used only when there is an overflow. When both cache lines after compression fit in the compressed cache line, the OFP bits are not used.
- the second set of data bits is further configured to hold a plurality of control bits that indicate overflow (e.g., OFP 412, OFB 410) and an end of the second set of data bits (e.g., LPE 414) in a compressed cache line.
- a plurality of control bits that indicate overflow e.g., OFP 412, OFB 410
- an end of the second set of data bits e.g., LPE 414
- the term “if’ may be construed to mean “when” or “upon” or “in response to determining” or “in accordance with a determination” or “in response to detecting,” that a stated condition precedent is true, depending on the context.
- the phrase “if it is determined [that a stated condition precedent is true]” or “if [a stated condition precedent is true]” or “when [a stated condition precedent is true]” may be construed to mean “upon determining” or “in response to determining” or “in accordance with a determination” or “upon detecting” or “in response to detecting” that the stated condition precedent is true, depending on the context.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
Claims
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202280081645.5A CN118369652A (en) | 2022-01-10 | 2022-12-09 | Priority-based cache line fitting in a compressed memory system of a processor-based system |
KR1020247022338A KR20240112956A (en) | 2022-01-10 | 2022-12-09 | Priority-based cache line fitting in compressed memory systems in processor-based systems. |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US17/572,472 US11829292B1 (en) | 2022-01-10 | 2022-01-10 | Priority-based cache-line fitting in compressed memory systems of processor-based systems |
US17/572,471 | 2022-01-10 | ||
US17/572,471 US11868244B2 (en) | 2022-01-10 | 2022-01-10 | Priority-based cache-line fitting in compressed memory systems of processor-based systems |
US17/572,472 | 2022-01-10 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023133018A1 true WO2023133018A1 (en) | 2023-07-13 |
Family
ID=85157135
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/US2022/081270 WO2023133019A1 (en) | 2022-01-10 | 2022-12-09 | Priority-based cache-line fitting in compressed memory systems of processor-based systems |
PCT/US2022/081266 WO2023133018A1 (en) | 2022-01-10 | 2022-12-09 | Priority-based cache-line fitting in compressed memory systems of processor-based systems |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/US2022/081270 WO2023133019A1 (en) | 2022-01-10 | 2022-12-09 | Priority-based cache-line fitting in compressed memory systems of processor-based systems |
Country Status (3)
Country | Link |
---|---|
KR (2) | KR20240112956A (en) |
TW (2) | TW202331494A (en) |
WO (2) | WO2023133019A1 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170269851A1 (en) * | 2016-03-18 | 2017-09-21 | Qualcomm Incorporated | Priority-based access of compressed memory lines in memory in a processor-based system |
US20170371797A1 (en) * | 2016-06-24 | 2017-12-28 | Qualcomm Incorporated | Pre-fetch mechanism for compressed memory lines in a processor-based system |
US20170371792A1 (en) * | 2016-06-24 | 2017-12-28 | Qualcomm Incorporated | Priority-based storage and access of compressed memory lines in memory in a processor-based system |
US20170371793A1 (en) * | 2016-06-28 | 2017-12-28 | Arm Limited | Cache with compressed data and tag |
-
2022
- 2022-12-09 KR KR1020247022338A patent/KR20240112956A/en active IP Right Grant
- 2022-12-09 WO PCT/US2022/081270 patent/WO2023133019A1/en active Application Filing
- 2022-12-09 KR KR1020247020390A patent/KR20240100461A/en active IP Right Grant
- 2022-12-09 TW TW111147412A patent/TW202331494A/en unknown
- 2022-12-09 TW TW111147366A patent/TW202331522A/en unknown
- 2022-12-09 WO PCT/US2022/081266 patent/WO2023133018A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170269851A1 (en) * | 2016-03-18 | 2017-09-21 | Qualcomm Incorporated | Priority-based access of compressed memory lines in memory in a processor-based system |
US20170371797A1 (en) * | 2016-06-24 | 2017-12-28 | Qualcomm Incorporated | Pre-fetch mechanism for compressed memory lines in a processor-based system |
US20170371792A1 (en) * | 2016-06-24 | 2017-12-28 | Qualcomm Incorporated | Priority-based storage and access of compressed memory lines in memory in a processor-based system |
US20170371793A1 (en) * | 2016-06-28 | 2017-12-28 | Arm Limited | Cache with compressed data and tag |
Also Published As
Publication number | Publication date |
---|---|
KR20240100461A (en) | 2024-07-01 |
TW202331494A (en) | 2023-08-01 |
KR20240112956A (en) | 2024-07-19 |
WO2023133019A1 (en) | 2023-07-13 |
TW202331522A (en) | 2023-08-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10474580B2 (en) | Memory management supporting huge pages | |
US6795897B2 (en) | Selective memory controller access path for directory caching | |
USRE43483E1 (en) | System and method for managing compression and decompression of system memory in a computer system | |
KR102459964B1 (en) | Memory module providing virtual memory capacity and operating method thereof | |
US11829292B1 (en) | Priority-based cache-line fitting in compressed memory systems of processor-based systems | |
KR20170112952A (en) | Optimized hopscotch multiple hash tables for efficient memory in-line deduplication application | |
US9678872B2 (en) | Memory paging for processors using physical addresses | |
US11341042B2 (en) | Storage apparatus configured to manage a conversion table according to a request from a host | |
US10642740B2 (en) | Methods for performing a memory resource retry | |
WO2017160480A1 (en) | Priority-based access of compressed memory lines in memory in a processor-based system | |
US10198362B2 (en) | Reducing bandwidth consumption when performing free memory list cache maintenance in compressed memory schemes of processor-based systems | |
US11188467B2 (en) | Multi-level system memory with near memory capable of storing compressed cache lines | |
US11868244B2 (en) | Priority-based cache-line fitting in compressed memory systems of processor-based systems | |
US10061698B2 (en) | Reducing or avoiding buffering of evicted cache data from an uncompressed cache memory in a compression memory system when stalled write operations occur | |
WO2023133019A1 (en) | Priority-based cache-line fitting in compressed memory systems of processor-based systems | |
EP3916567B1 (en) | Method for processing page fault by processor | |
US12008261B2 (en) | Method and device for accessing memory | |
CN117472791A (en) | Data access method and data access system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22851275 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 202447038451 Country of ref document: IN |
|
ENP | Entry into the national phase |
Ref document number: 20247022338 Country of ref document: KR Kind code of ref document: A |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2022851275 Country of ref document: EP |
|
ENP | Entry into the national phase |
Ref document number: 2022851275 Country of ref document: EP Effective date: 20240812 |