# US 2017/0286294 A1 · Apparatus, system and method for caching compressed data

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0286294 A1
- Document ID: US20170286294A1
- Status: Published application
- Kind: A1
- Application number: 15/488,324
- Filed: 2017-04-14
- Published: 2017-10-05
- Earliest claimed: 2014-12-16
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Sanjeev N. Trika; Rowel S. Garcia
- Web page: https://patentgrep.com/patent/US20170286294A1

## CPC

- G06F 12/0802: Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F 12/0871: Allocation or management of cache space
- G06F 12/0886: Variable-length word access
- G06F 2212/1016: Performance improvement
- G06F 2212/1044: Space efficiency improvement
- G06F 2212/222: Non-volatile memory
- G06F 2212/401: Compressed data
- G06F 2212/7201: Logical to physical mapping or translation of blocks or pages
- G06F 2212/7203: Temporary buffering, e.g. using volatile buffer or dedicated buffer blocks
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques and mechanisms to efficiently cache data based on compression of such data. The technologies of the present disclosure include cache systems, methods, and computer readable media to support operations performed with data that is compressed prior to being written as a cache line in a cache memory. In some embodiments, a cache controller determines the size of compressed data to be stored as a cache line. The cache controller identifies a logical block address (LBA) range to cache the compressed data, where such identifying is based on the size of the compressed data and on reference information describing multiple LBA ranges of the cache memory. One or more such LBA ranges are of different respective sizes. In other embodiments, LBA ranges of the cache memory concurrently store respective compressed cache lines, wherein the LBA ranges and are of different respective sizes.

## Claims

### Claim 1

A device comprising:
a cache controller including logic, at least a portion of which is in hardware, the logic to:
send a first command to cause a compression operation for first data to produce first compressed data;
determine a size of the first compressed data;
identify a first logical block address (LBA) range of a cache memory, the first LBA range is identified based on the size of the first compressed data and reference information, the reference information to specify a plurality of LBA ranges of the cache memory, the plurality of LBA ranges including LBA ranges of different respective sizes; and
based on identification of the first LBA range, the logic to:
update the reference information to indicate that the first LBA range is allocated to the first compressed data; and
cause the first compressed data is to be written to the first LBA range.

### Claim 2 (depends on 1)

The device of claim 1, the logic to:
determine a size of second compressed data other than any compressed data generated based on the first command, the size of the second compressed data to differ from the size of the first compressed data;
identify a second LBA range of the cache memory, the second LBA range is identified based on the size of the second compressed data and the reference information; and
based on identification of the second LBA range, the logic to:
update the reference information to indicate that the second LBA range is allocated to the second compressed data; and
cause the second compressed data to be written to the second LBA range;
wherein the first LBA range stores the first compressed data while the second LBA range stores the second compressed data.

### Claim 3 (depends on 1)

The device of claim 1, the the logic to:
associate the first data with a first tag and to include the first tag in the first command.

### Claim 4 (depends on 3)

The device of claim 3, the logic to cause the first compressed data is to be written to the first LBA range includes the logic to issues a write command to include the first tag and the first LBA range to the cache memory.

### Claim 5 (depends on 1)

The device of claim 1, wherein the logic to identify the first LBA range includes the logic to identify second compressed data to evict from the cache memory.

### Claim 6 (depends on 1)

The device of claim 1, a storage memory separate from the cache memory is to store a version of the first data while the first LBA range is to store the first compressed data, for separate LBA ranges included in the plurality of LBA ranges, the reference information specifies:
an LBA range size for the separate LBA ranges included in the plurality of LBA ranges; and
a different respective LBA of the storage memory is mapped to the first LBA range.

### Claim 7 (depends on 1)

The device of claim 1, the reference information to identify one or more LBA ranges other than any LBA ranges of the cache memory that currently store valid data, the reference information to further identify a respective size of the LBA range for each of the one or more LBA ranges.

### Claim 8 (depends on 1)

The device of claim 1, the reference information specifies, for separate LBA ranges from among the plurality of LBA ranges, a recency of use of the separate LBA ranges, the logic to identify the first LBA range based on a recency of use of the first LBA range.

### Claim 9 (depends on 1)

The device of claim 1, the logic to identify the first LBA range includes the logic to:
identify a subset of the plurality of LBA ranges based on the LBA ranges of the subset separately having a total number of sectors of the LBA range that is equal to a minimum number of sectors sufficient to store the first compressed data; and
select the first LBA range from among the subset.

### Claim 10 (depends on 9)

The device of claim 9, the logic to select the first LBA range from among the subset based on the first LBA range being a least recently used LBA range of the subset.

### Claim 11 (depends on 1)

The device of claim 1, the logic to identify the first LBA range includes the logic to:
identify a subset of the plurality of LBA ranges based on the LBA ranges of the subset separately having a total number of sectors of the LBA range that is closest to a minimum number of sectors sufficient to store the first compressed data; and
the logic to select the first LBA range from among the subset.

### Claim 12

A method at a cache controller, the method comprising:
sending a first command to cause a compression operation for first data, to produce first compressed data;
determining a size of the first compressed data;
identifying a first logical block address (LBA) range of a cache memory, the first LBA range is identified based on the size of the first compressed data and reference information, the reference information specifying a plurality of LBA ranges of the cache memory, the plurality of LBA ranges including LBA ranges of different respective sizes; and
based on identification of the first LBA range:
updating the reference information to indicate that the first LBA range is allocated to the first compressed data; and
causing the first compressed data is to be written to the first LBA range.

### Claim 13 (depends on 12)

The method of claim 12, comprising:
determining a size of second compressed data other than any compressed data generated based on the first command, the size of the second compressed data to differ from the size of the first compressed data;
identifying a second LBA range of the cache, the second LBA range is identified based on the size of the second compressed data and the reference information; and
based on identification of the second LBA range:
updating the reference information to indicate that the second LBA range is allocated to the second compressed data; and
causing the second compressed data is to be written to the second LBA range;
wherein the first LBA range stores the first compressed data while the second LBA range stores the second compressed data.

### Claim 14 (depends on 12)

The method of claim 12, the reference information specifies, for separate LBA ranges from among the plurality of LBA ranges, a recency of use of the separate LBA ranges, identifying the first LBA range is based on a recency of use of the first LBA range.

### Claim 15 (depends on 12)

The method of claim 12, wherein identifying the first LBA range includes:
identifying a subset of the plurality of LBA ranges based on the LBA ranges of the subset separately having a total number of sectors of the LBA range that is closest to a minimum number of sectors sufficient to store the first compressed data; and
selecting the first LBA range from among the subset.

### Claim 16

A computer-readable storage medium having stored thereon instructions which, when executed by one or more processing units of a system, cause a the system to:
send a first command to cause a compression operation for first data, to produce first compressed data;
determine a size of the first compressed data;
identify a first logical block address (LBA) range of a cache memory, the first LBA range is identified based on the size of the first compressed data and reference information, the reference information specifying a plurality of LBA ranges of the cache memory, the plurality of LBA ranges including LBA ranges of different respective sizes; and
based on identification of the first LBA range:
update the reference information to indicate that the first LBA range is allocated to the first compressed data; and
cause the first compressed data is to be written to the first LBA range.

### Claim 17 (depends on 16)

The computer-readable storage medium of claim 16, comprising the instructions to further cause the system to:
determine a size of second compressed data other than any compressed data generated based on the first command, the size of the second compressed data to differ from the size of the first compressed data;
identify a second LBA range of the cache, the second LBA range is identified based on the size of the second compressed data and the reference information; and
based on identification of the second LBA range:
update the reference information to indicate that the second LBA range is allocated to the second compressed data; and
cause the second compressed data is to be written to the second LBA range;
wherein the first LBA range stores the first compressed data while the second LBA range stores the second compressed data.

### Claim 18 (depends on 16)

The computer-readable storage medium of claim 16, wherein the reference information identifies one or more LBA ranges other than any LBA ranges of the cache memory that currently store valid data, and the reference information further identifies a respective size of an LBA range for the one or more LBA ranges.

### Claim 19 (depends on 16)

The computer-readable storage medium of claim 16, the reference information specifies, for separate LBA ranges from among the plurality of LBA ranges, a recency of use of the separate LBA ranges, the first LBA range identified based on a recency of use of the first LBA range.

### Claim 20 (depends on 16)

The computer-readable storage medium of claim 16, the instructions to cause the system to identify the first LBA range includes the system to:
identify a subset of the plurality of LBA ranges based on the LBA ranges of the subset separately having a total number of sectors of the LBA range that is equal to a minimum number of sectors sufficient to store the first compressed data; and
select the first LBA range from among the subset.

### Claim 21 (depends on 20)

The computer-readable storage medium of claim 20, the instructions to cause the system to select the first LBA range from among only the subset is based on the first LBA range being a least recently used LBA range of the subset.

### Claim 22

A system comprising:
a cache device including a cache memory;
a cache controller coupled to the cache device, the cache controller including logic, at least a portion of which is in hardware, the logic to:
send a first command to cause a compression operation for first data to produce first compressed data;
determine a size of the first compressed data;
identify a first logical block address (LBA) range of a cache memory, the first LBA range is identified based on the size of the first compressed data and reference information, the reference information to specify a plurality of LBA ranges of the cache memory, the plurality of LBA ranges including LBA ranges of different respective sizes; and
based on identification of the first LBA range, the logic to:
update the reference information to indicate that the first LBA range is allocated to the first compressed data; and
cause the first compressed data to be written to the first LBA range.

### Claim 23 (depends on 22)

The system of claim 22, the logic of the cache controller further to:
determine a size of second compressed data other than any compressed data generated based on the first command, the size of the second compressed data to differ from the size of the first compressed data;
identify a second LBA range of the cache memory, the second LBA range identified based on the size of the second compressed data and the reference information; and
based on identification of the second LBA range, the logic to:
update the reference information to indicate that the second LBA range is allocated to the second compressed data; and
cause the second compressed data to be written to the second LBA range;
wherein the first LBA range stores the first compressed data while the second LBA range stores the second compressed data.

### Claim 24 (depends on 22)

The system of claim 22, the reference information specifies, for separate LBA ranges from among the plurality of LBA ranges, a recency of use of the separate LBA ranges, the logic to identify the first LBA range based on a recency of use of the first LBA range.

### Claim 25 (depends on 22)

The system of claim 22, the logic of the cache controller to identify the first LBA range includes the logic to:
identify a subset of the plurality of LBA ranges based on the LBA ranges of the subset separately having a total number of sectors of the LBA range that is equal to a minimum number of sectors sufficient to store the first compressed data; and select the first LBA range from among the subset.
