US 11,868,244 B2
Priority-based cache-line fitting in compressed memory systems of processor-based systems
Norris Geng, San Diego, CA (US); Richard Senior, San Diego, CA (US); Gurvinder Singh Chhabra, San Diego, CA (US); and Kan Wang, San Diego, CA (US)
Assigned to QUALCOMM Incorporated, San Diego, CA (US)
Filed by QUALCOMM Incorporated, San Diego, CA (US)
Filed on Jan. 10, 2022, as Appl. No. 17/572,471.
Prior Publication US 2023/0236961 A1, Jul. 27, 2023
Int. Cl. G06F 12/02 (2006.01)
CPC G06F 12/023 (2013.01) [G06F 2212/401 (2013.01)] 31 Claims
OG exemplary drawing
 
1. A method for compressing data in a compressed memory system of a processor-based system, comprising:
partitioning a memory region into a plurality of data regions, each data region associated with a respective priority level;
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, wherein the first data region has a higher priority level than the second data region;
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;
in accordance with a determination that the first cache line is compressible:
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, wherein the first predetermined portion is larger than the second predetermined portion; and
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, wherein 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 wherein each overflow block of the plurality of overflow blocks is of a different size.