# US 2013/0297876 A1 · Cache control to reduce transaction roll back

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

- Number: US 2013/0297876 A1
- Document ID: US20130297876A1
- Status: Published application
- Kind: A1
- Application number: 13/461,458
- Filed: 2012-05-01
- Published: 2013-11-07
- Earliest claimed: 2012-05-01
- Assignees: NVIDIA Corporation
- Inventors: Meng-Bing Yu
- Web page: https://patentgrep.com/patent/US20130297876A1

## CPC

- G06F 12/122: of the least frequently used [LFU] type, e.g. with individual count value
- G06F 12/126: with special data handling, e.g. priority of data or instructions, handling errors or pinning
- G06F 9/467: {Transactional memory (G06F9/528 takes precedence)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In one embodiment, a microprocessor is provided. The microprocessor includes a cache that is controlled by a cache controller. The cache controller is configured to replace cachelines in the cache based on a replacement scheme that prioritizes the replacement of cachelines that are less likely to cause roll back of a transaction of the microprocessor.

## Claims

### Claim 1

A microprocessing system comprising:
a cache comprising:
a plurality of cachelines each being characterized by a replacement priority level selected from a plurality of replacement priority levels; and
a cache controller configured to (1) select a least-recently-used cacheline of the plurality of cachelines having a highest available replacement priority level, and (2) replace the least-recently-used cacheline having the highest available replacement priority level according to a replacement scheme.

### Claim 2 (depends on 1)

The microprocessing system of claim 1, where the replacement scheme includes one of a perfect least-recently-used cacheline replacement scheme, a tree least-recently-used cacheline replacement scheme, and a first-in-first-out cacheline replacement scheme.

### Claim 3 (depends on 1)

The microprocessing system of claim 1, where the replacement scheme is a tree least-recently-used cacheline replacement scheme.

### Claim 4 (depends on 1)

The microprocessing system of claim 1, where the microprocessor includes a plurality of different level caches, and at least some of the different level caches report eviction and/or replacement of a cacheline to at least one other different level cache.

### Claim 5 (depends on 4)

The microprocessing system of claim 4, where the at least some of the different level caches are inclusive caches that allocate cachelines for duplication of data from at least one lower level cache.

### Claim 6 (depends on 4)

The microprocessing system of claim 4, where the cache is a L2 unified cache that is an inclusive cache that allocates cachelines for duplication of data from a L1 instruction cache and a L1 data cache.

### Claim 7 (depends on 1)

The microprocessing system of claim 1, where the microprocessor is a transaction-based microprocessor.

### Claim 8 (depends on 7)

The microprocessing system of claim 7, where the plurality of replacement priority levels are prioritized by a likelihood of affecting a lower level cache, where replacement of a cacheline having a higher replacement priority level would have a lower likelihood of affecting the lower level cache and causing rollback of a transaction than replacement of a cacheline having a lower replacement priority level.

### Claim 9 (depends on 1)

The microprocessing system of claim 1, where the plurality of replacement priority levels include, ranking from a highest priority level to a lowest priority level, (1) invalid cachelines, (2) cachelines that are pending eviction, (3) valid cachelines that are not owned by another cache, (4) cachelines owned by a L1 instruction cache and not owned by a L1 data cache, and (5) cachelines owned by the L1 data cache.

### Claim 10 (depends on 1)

The microprocessing system of claim 1, where each cacheline includes priority bits that indicate a replacement priority level that characterizes that cacheline.

### Claim 11

Within a microprocessing system, a method for controlling a cache comprising a plurality of cachelines, each of the plurality of cachelines being characterized by a replacement priority level selected from a plurality of replacement priority levels, the method comprising:
selecting a least-recently-used cacheline in the cache having a highest available replacement priority level; and
replacing the least-recently-used cacheline having the highest available replacement priority level according to a replacement scheme.

### Claim 12 (depends on 11)

The method of claim 11, where the replacement scheme is a tree least-recently-used cacheline replacement scheme.

### Claim 13 (depends on 11)

The method of claim 11, where the microprocessor includes a plurality of different level caches, and at least some of the different level caches report eviction and/or replacement of a cacheline to at least one other different level cache.

### Claim 14 (depends on 13)

The method of claim 13, where the at least some of the different level caches are inclusive caches that allocate cachelines for duplication of data from at least one lower level cache.

### Claim 15 (depends on 13)

The method of claim 13, where the cache is a L2 unified cache that is an inclusive cache that allocates cachelines for duplication of data from a L1 instruction cache and a L1 data cache.

### Claim 16 (depends on 11)

The method of claim 11, where the microprocessor is a transaction-based microprocessor, and the plurality of replacement priority levels are prioritized by a likelihood of affecting a lower level cache, where replacement of a cacheline having a higher replacement priority level would have a lower likelihood of affecting the lower level cache and causing rollback of a transaction than replacement of a cacheline having a lower replacement priority level.

### Claim 17 (depends on 11)

The method of claim 11, where the plurality of replacement priority levels include, ranking from a highest priority level to a lowest priority level, (1) invalid cachelines, (2) cachelines that are pending eviction, (3) valid cachelines that are not owned by another cache, (4) cachelines owned by a L1 instruction cache and not owned by a L1 data cache, and (5) cachelines owned by the L1 data cache.

### Claim 18

A microprocessing system comprising:
a L1 instruction cache;
a L1 data cache;
a unified set-associative L2 cache comprising:
a plurality of cacheline sets comprising a plurality of cachelines, each of the plurality of cachelines being characterized by a replacement priority level selected from a plurality of replacement priority levels; and
a cache controller configured to (1) select a least-recently-used cacheline in a designated cacheline set of the plurality of cacheline sets having a highest available replacement priority level, (2) replace the least-recently-used cacheline having the highest available replacement priority level according to a replacement scheme.

### Claim 19 (depends on 18)

The microprocessing system of claim 18, where some of the cachelines are allocated for duplication of data from the L1 instruction cache and the L1 data cache, and the L1 instruction cache and the L1 data cache report eviction and/or replacement of a cacheline to the unified set-associative L2 cache

### Claim 20 (depends on 18)

The microprocessing system of claim 18, where the microprocessor is a transaction-based microprocessor, the plurality of replacement priority levels are prioritized by a likelihood of affecting a lower level cache, where replacement of a cacheline having a higher replacement priority level would have a lower likelihood of affecting the lower level cache and causing rollback of a transaction than replacement of a cacheline having a lower replacement priority level, and the plurality of replacement priority levels include, ranking from a highest priority level to a lowest priority level, (1) invalid cachelines, (2) cachelines that are pending eviction, (3) valid cachelines that are not owned by another cache, (4) cachelines owned by the L1 instruction cache and not owned by the L1 data cache, and (5) cachelines owned by the L1 data cache.
