# US 2015/0178199 A1 · Method and apparatus for shared line unified cache

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

- Number: US 2015/0178199 A1
- Document ID: US20150178199A1
- Status: Published application
- Kind: A1
- Application number: 14/137,359
- Filed: 2013-12-20
- Published: 2015-06-25
- Earliest claimed: 2013-12-20
- Assignees: Intel Corporation
- Inventors: Liang-Min Wang; John M. Morgan; Namakkal N. Venkatesan
- Web page: https://patentgrep.com/patent/US20150178199A1

## CPC

- G06F 12/084: with a shared cache
- G06F 12/082: {Associative directories (G06F12/0822 takes precedence)}
- G06F 12/126: with special data handling, e.g. priority of data or instructions, handling errors or pinning
- G06F 12/0811: with multilevel cache hierarchies
- G06F 12/0831: using a bus scheme, e.g. with bus monitoring or watching means
- G06F 2212/1016: Performance improvement
- G06F 2212/6042: Allocation of cache space to multiple users or processors
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

An apparatus and method for implementing a shared unified cache. For example, one embodiment of a processor comprises: a plurality of processor cores grouped into modules, wherein each module has at least two processor cores grouped therein; a plurality of level 1 (L1) caches, each L1 cache directly accessible by one of the processor cores; a level 2 (L2) cache associated with each module, the L2 cache directly accessible by each of the processor cores associated with its respective module; a shared unified cache to store data and/or instructions for each of the processor cores in each of the modules; and a cache management module to manage the cache lines in the shared unified cache using a first cache line eviction policy favoring cache lines which are shared across two or more modules and which are accessed relatively more frequently from the modules.

## Claims

### Claim 1

A processor comprising:
a plurality of processor cores grouped into modules, wherein each module has at least two processor cores grouped therein;
a plurality of level 1 (L1) caches, each L1 cache directly accessible by one of the processor cores;
a level 2 (L2) cache associated with each module, the L2 cache directly accessible by each of the processor cores associated with its respective module;
a shared unified cache to store data and/or instructions for each of the processor cores in each of the modules; and
a cache management module to manage the cache lines in the shared unified cache using a first cache line eviction policy favoring cache lines which are shared across two or more modules and which are accessed relatively more frequently from the modules.

### Claim 2 (depends on 1)

The processor as in claim 1 wherein further comprising:
a shared state indicator associated with each cache line, the shared state indicator bit to indicate to the cache management module whether the cache line shared between multiple modules.

### Claim 3 (depends on 2)

The processor as in claim 2 further comprising:
a counter associated with each cache line in the shared unified cache, the counter having a value usable by the cache management module to determine whether to evict a cache line.

### Claim 4 (depends on 3)

The processor as in claim 3 wherein the cache management module sets the counter value to a first specified threshold in response to detecting a hit on a cache line from cores in more than one module.

### Claim 5 (depends on 4)

The processor as in claim 4 wherein the cache management module sets the counter value to a second specified threshold in response to detecting a hit on a cache line from cores within the same module.

### Claim 6 (depends on 5)

The processor as in claim 5 wherein the second specified threshold is less than the first specified threshold and wherein the cache management module decrements the counter of a cache line in each processor cycle for which there is no hit on the cache line.

### Claim 7 (depends on 1)

The processor as in claim 1 wherein the cache management module implements a second cache line eviction policy for the L1 and L2 caches.

### Claim 8 (depends on 1)

The processor as in claim 1 wherein each cache line in the shared unified cache includes one or more of the following states:
a shared state to indicate whether the cache line is being shared between more than one module;
a modified state to indicate that the cache line has been modified;
an invalid state to indicate that the cache line is invalid; and
a module ID (MID) identifying the module which moved the cache line out of the invalid state.

### Claim 9 (depends on 1)

The processor as in claim 1 wherein the cache management module includes comparator logic to compare the MID associated with the cache line with an MID of a module causing a hit to the cache line to determine whether the cache line is being shared across two or more modules.

### Claim 10

A method comprising:
logically grouping a plurality of processor cores into modules, wherein each module has at least two processor cores grouped therein;
implementing a first cache management policy with a plurality of level 1 (L1) caches, each L1 cache directly accessible by one of the processor cores, and with a level 2 (L2) cache associated with each module, the L2 cache directly accessible by each of the processor cores associated with its respective module;
storing data and/or instructions in a shared unified cache for each of the processor cores in each of the modules; and
managing the cache lines in a shared unified cache by a cache management module using a first cache line eviction policy favoring cache lines which are shared across two or more modules and which are accessed relatively more frequently from the modules.

### Claim 11 (depends on 10)

The method as in claim 10 wherein further comprising:
indicating to the cache management module whether the cache line shared between multiple modules using a shared state indicator associated with each cache line.

### Claim 12 (depends on 11)

The method as in claim 11 further comprising:
setting a counter associated with each cache line in the shared unified cache, the counter having a value usable by the cache management module to determine whether to evict a cache line.

### Claim 13 (depends on 12)

The method as in claim 12 wherein the cache management module sets the counter value to a first specified threshold in response to detecting a hit on a cache line from cores in more than one module.

### Claim 14 (depends on 13)

The method as in claim 13 wherein the cache management module sets the counter value to a second specified threshold in response to detecting a hit on a cache line from cores within the same module.

### Claim 15 (depends on 14)

The method as in claim 14 wherein the second specified threshold is less than the first specified threshold and wherein the cache management module decrements the counter of a cache line in each processor cycle for which there is no hit on the cache line.

### Claim 16 (depends on 10)

The method as in claim 10 wherein the cache management module implements a second cache line eviction policy for the L1 and L2 caches.

### Claim 17 (depends on 10)

The method as in claim 10 wherein each cache line in the shared unified cache includes one or more of the following states:
a shared state to indicate whether the cache line is being shared between more than one module;
a modified state to indicate that the cache line has been modified;
an invalid state to indicate that the cache line is invalid; and
a module ID (MID) identifying the module which moved the cache line out of the invalid state.

### Claim 18 (depends on 10)

The method as in claim 10 further comprising:
comparing the MID associated with the cache line with an MID of a module causing a hit to the cache line to determine whether the cache line is being shared across two or more modules.

### Claim 19

A system comprising:
a memory for storing instructions and data;
a graphics processor for performing graphics operations in response to certain instructions;
a network interface for receiving and transmitting data over a network; and
a processor comprising:
a plurality of processor cores grouped into modules, wherein each module has at least two processor cores grouped therein;
a plurality of level 1 (L1) caches, each L1 cache directly accessible by one of the processor cores;
a level 2 (L2) cache associated with each module, the L2 cache directly accessible by each of the processor cores associated with its respective module;
a shared unified cache to store data and/or instructions for each of the processor cores in each of the modules; and
a cache management module to manage the cache lines in the shared unified cache using a first cache line eviction policy favoring cache lines which are shared across two or more modules and which are accessed relatively more frequently from the modules.

### Claim 20 (depends on 19)

The system as in claim 19 further comprising:
a shared state indicator associated with each cache line, the shared state indicator bit to indicate to the cache management module whether the cache line shared between multiple modules.
