# US 2012/0254548 A1 · Allocating cache for use as a dedicated local storage

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

- Number: US 2012/0254548 A1
- Document ID: US20120254548A1
- Status: Published application
- Kind: A1
- Application number: 13/079,520
- Filed: 2011-04-04
- Published: 2012-10-04
- Earliest claimed: 2011-04-04
- Assignees: International Business Machines Corporation
- Inventors: Miguel Comparan; Russell D. Hoover; Robert A. Shearer; Alfred T. Watson, III
- Web page: https://patentgrep.com/patent/US20120254548A1

## CPC

- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 12/0815: Cache consistency protocols
- G06F 12/0871: Allocation or management of cache space
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method and apparatus dynamically allocates and deallocates a portion of a cache for use as a dedicated local storage. Cache lines may be dynamically allocated and deallocated for inclusion in the dedicated local storage. Cache entries that are included in the dedicated local storage may not be evicted or invalidated. Additionally, coherence is not maintained between the cache entries that are included in the dedicated local storage and the backing memory. A load instruction may be configured to allocate, e.g., lock, a portion of the data cache for inclusion in the dedicated local storage and load data into the dedicated local storage. A load instruction may be configured to read data from the dedicated local storage and to deallocate, e.g., unlock, a portion of the data cache that was included in the dedicated local storage.

## Claims

### Claim 1

A method of dynamically allocating a portion of a cache for use as a dedicated local storage, comprising:
receiving a first instruction defining the portion of the cache;
evicting existing data stored in the portion of the cache;
updating a setting indicating that entries in the portion of the cache should not be evicted or invalidated and that coherency should not be maintained between entries in the portion of the cache and a backing memory.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
receiving a second instruction; and
updating the setting to free the portion of the cache for storing data in the entries in the portion and maintaining coherency between the entries and the backing memory.

### Claim 3 (depends on 2)

The method of claim 2, wherein the second instruction is a load and destroy function and further comprising reading the entries in the portion of the cache before updating the setting to free the portion of the cache.

### Claim 4 (depends on 1)

The method of claim 1, wherein the first instruction is a push context instruction and further comprising storing state for a first thread in the entries in the portion of the cache.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
receiving a second instruction that is a pop context instruction;
reading the state for the first thread from the entries in the portion of the cache; and
updating the setting to free the portion of the cache for storing data in the entries in the portion and maintaining coherency between the entries and the backing memory.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
storing data to an entry in the portion of the cache by a first thread; and
reading the data from the entry in the portion of the cache by a second thread.

### Claim 7 (depends on 1)

The method of claim 1, wherein the first instruction is a load instruction and further comprising:
storing data to an entry in the portion of the cache by a first thread; and
reading the data from the entry in the portion of the cache by a second thread receiving a second instruction.

### Claim 8 (depends on 1)

The method of claim 1, wherein the first instruction specifies an address range defining the portion of the cache.

### Claim 9 (depends on 1)

The method of claim 1, wherein the cache includes multiple ways and the first instruction specifies at least one of the ways defining the portion of the cache.

### Claim 10 (depends on 1)

The method of claim 1, wherein the first instruction specifies a cache line defining the portion of the cache.

### Claim 11 (depends on 1)

The method of claim 1, wherein the setting includes a lock bit associated with a cache line and a valid bit associated with the same cache line.

### Claim 12

A system, comprising:
a processor that is coupled to a backing memory and includes a cache that is configured to:
receive a first instruction defining a portion of the cache that is allocated for use as a dedicated local storage;
evict existing data stored in the portion of the cache;
update a setting indicating that entries in the portion of the cache should not be evicted or invalidated and that coherency should not be maintained between entries in the portion of the cache and the backing memory.

### Claim 13 (depends on 12)

The system of claim 12, wherein the cache is further configured to update the setting to free the portion of the cache for storing data in the entries in the portion and maintaining coherency between the entries and the backing memory when a second instruction is received.

### Claim 14 (depends on 13)

The system of claim 13, wherein the second instruction is a load and destroy function and further comprising reading the entries in the portion of the cache before updating the setting to free the portion of the cache.

### Claim 15 (depends on 12)

The system of claim 12, wherein the first instruction is a push context instruction and further comprising storing state for a first thread in the entries in the portion of the cache.

### Claim 16 (depends on 12)

The system of claim 12, wherein the cache is further configured to:
read the state for the first thread from the entries in the portion of the cache, and
update the setting to free the portion of the cache for storing data in the entries in the portion and maintaining coherency between the entries and the backing memory, when a second instruction that is a pop context instruction is received.

### Claim 17 (depends on 12)

The system of claim 12, wherein data is stored to an entry in the portion of the cache by a first thread and the data is read from the entry in the portion of the cache by a second thread.

### Claim 18 (depends on 12)

The system of claim 12, wherein the cache comprises multiple ways and the first instruction specifies at least one of the ways defining the portion of the cache.

### Claim 19 (depends on 12)

The system of claim 12, wherein the first instruction specifies a cache line defining the portion of the cache.

### Claim 20 (depends on 12)

The system of claim 12, wherein the setting includes a lock bit associated with a cache line and a valid bit associated with the same cache line.
