# US 2015/0039938 A1 · Systems and Methods for Retiring and Unretiring Cache Lines

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

- Number: US 2015/0039938 A1
- Document ID: US20150039938A1
- Status: Published application
- Kind: A1
- Application number: 14/486,776
- Filed: 2014-09-15
- Published: 2015-02-05
- Earliest claimed: 2011-09-30
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Ramaswamy Sivaramakrishnan; Ali Vahidsafa; Aaron S. Wynn; Connie W. Cheung
- Web page: https://patentgrep.com/patent/US20150039938A1

## CPC

- G06F 11/0793: {Remedial or corrective actions (recovery from an exception in an instruction pipeline G06F9/3861; by retry G06F11/1402; for recovering from a failure of a protocol instance or entity H04L69/40)}
- G06F 9/30: Arrangements for executing machine instructions, e.g. instruction decode (for executing microinstructions G06F9/22)
- G06F 9/30047: {Prefetch instructions; cache control instructions}
- G06F 11/073: {in a memory management context, e.g. virtual memory or cache management (memory management G06F12/00; testing of static memory units G11C29/00)}
- G06F 11/1666: {where the redundant component is memory or memory area}
- G06F 12/0804: with main memory updating (G06F12/0806 takes precedence)
- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 12/126: with special data handling, e.g. priority of data or instructions, handling errors or pinning
- G06F 11/20: using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F 12/0844: Multiple simultaneous or quasi-simultaneous cache accessing
- G06F 2212/1008: Correctness of operation, e.g. memory ordering
- G06F 2212/1032: Reliability improvement, data loss prevention, degraded operation etc
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The systems and methods described herein may provide a flush-retire instruction for retiring “bad” cache locations (e.g., locations associated with persistent errors) to prevent their allocation for any further accesses, and a flush-unretire instruction for unretiring cache locations previously retired. These instructions may be implemented as hardware instructions of a processor. They may be executable by processes executing in a hyper-privileged state, without the need to quiesce any other processes. The flush-retire instruction may atomically flush a cache line implicated by a detected cache error and set a lock bit to disable subsequent allocation of the corresponding cache location. The flush-unretire instruction may atomically flush an identified cache line (if valid) and clear the lock bit to re-enable subsequent allocation of the cache location. Various bits in the encodings of these instructions may identify the cache location to be retired or unretired in terms of the physical cache structure.

## Claims

### Claim 1

A method, comprising:
performing, by a computer:
detecting an error in a cache, wherein the error is associated with a particular cache line; and
in response to said detecting, executing a flush-retire instruction, wherein the flush-retire instruction is a single hardware instruction, and wherein said executing causes the computer to atomically perform:
flushing the cache line to memory; and
disabling subsequent allocation of a cache location that held the cache line.

### Claim 2 (depends on 1)

The method of claim 1, wherein the error comprises an error in one or more of data stored in the cache location, a tag associated with the cache location, a state of the cache location, or a state of the cache line.

### Claim 3 (depends on 1)

The method of claim 1, further comprising, subsequent to said executing, executing a flush-unretire instruction, wherein the flush-unretire instruction is a single hardware instruction, and wherein executing the flush-unretire instruction causes the computer to perform re-enabling subsequent allocation of the cache location.

### Claim 4 (depends on 1)

The method of claim 1, wherein one or more fields in an encoding of the flush-retire instruction comprise data usable to identify the cache location in terms of its location within the physical structure of a targeted cache.

### Claim 5 (depends on 1)

The method of claim 1, wherein the flush-retire instruction is executable only by processes executing in a hyper-privileged state.

### Claim 6 (depends on 1)

The method of claim 1, wherein said flushing and said disabling are performed without quiescing any processes executing on the computer.

### Claim 7 (depends on 1)

The method of claim 1, wherein said disabling comprises setting a lock bit associated with the cache location.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
analyzing data representing the error and one or more other detected cache errors; and
determining whether the error is a persistent error; and
wherein said disabling is performed in response to determining that the error is a persistent error.

### Claim 9

A system comprising:
a processor; and
memory coupled to the processor and storing program instructions that when executed by the processor cause the processor to perform:
detecting an error in a cache, wherein the error is associated with a particular cache line; and
in response to said detecting, executing a flush-retire instruction, wherein the flush-retire instruction is a single hardware instruction of the processor, and wherein said executing causes the processor to atomically perform:
flushing the cache line to the memory; and
disabling subsequent allocation of a cache location that held the cache line.

### Claim 10 (depends on 9)

The system of claim 9, wherein when executed by the processor, the program instructions further cause the processor to perform, subsequent to said executing, executing a flush-unretire instruction, wherein the flush-unretire instruction is a single hardware instruction of the processor, and wherein executing the flush-unretire instruction causes the processor to perform re-enabling subsequent allocation of the cache location.

### Claim 11 (depends on 9)

The system of claim 9, wherein the flush-retire instruction is executable only by processes executing in a hyper-privileged state.

### Claim 12 (depends on 9)

The system of claim 9, wherein said flushing and said disabling are performed without quiescing any processes executing in the system.

### Claim 13 (depends on 9)

The system of claim 9, wherein said disabling comprises setting a lock bit associated with the cache location.

### Claim 14 (depends on 9)

The system of claim 9, wherein when executed by the processor, the program instructions further cause the processor to perform:
analyzing data representing the error and one or more other detected cache errors; and
determining whether the error is a persistent error; and
wherein said disabling is performed in response to determining that the error is a persistent error.

### Claim 15

A non-transitory, computer readable storage medium storing program instructions that when executed by a computer that comprises a processor cause the computer to perform:
detecting an error in a cache, wherein the error is associated with a particular cache line; and
in response to said detecting, executing a flush-retire instruction, wherein the flush-retire instruction is a single hardware instruction of the processor, and wherein said executing causes the computer to atomically perform:
flushing the cache line to memory; and
disabling subsequent allocation of a cache location that held the cache line.

### Claim 16 (depends on 15)

The storage medium of claim 15, wherein when executed by the computer, the program instructions further cause the computer to perform, subsequent to said executing, executing a flush-unretire instruction, wherein the flush-unretire instruction is a single hardware instruction of the processor, and wherein executing the flush-unretire instruction causes the computer to perform re-enabling subsequent allocation of the cache location.

### Claim 17 (depends on 15)

The storage medium of claim 15, wherein the flush-retire instruction is executable only by processes executing in a hyper-privileged state.

### Claim 18 (depends on 15)

The storage medium of claim 15, wherein said flushing and said disabling are performed without quiescing any processes executing on the computer.

### Claim 19 (depends on 15)

The storage medium of claim 15, wherein said disabling comprises setting a lock bit associated with the cache location.

### Claim 20 (depends on 15)

The storage medium of claim 15, wherein when executed by the computer, the program instructions further cause the computer to perform:
analyzing data representing the error and one or more other detected cache errors; and
determining whether the error is a persistent error; and
wherein said disabling is performed in response to determining that the error is a persistent error.
