# US 2006/0080506 A1 · Data replication in multiprocessor NUCA systems to reduce horizontal cache thrashing

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

- Number: US 2006/0080506 A1
- Document ID: US20060080506A1
- Status: Published application
- Kind: A1
- Application number: 10/960,611
- Filed: 2004-10-07
- Published: 2006-04-13
- Earliest claimed: 2004-10-07
- Assignees: International Business Machines Corporation
- Inventors: Ramakrishnan Rajamony; Xiaowei Shen; Balaram Sinharoy
- Web page: https://patentgrep.com/patent/US20060080506A1

## CPC

- G06F 12/0846: Cache with multiple tag or data arrays being simultaneously accessible
- G06F 12/0813: with a network or matrix configuration
- G06F 12/084: with a shared cache
- G06F 12/122: of the least frequently used [LFU] type, e.g. with individual count value
- G06F 2212/271: Non-uniform cache access [NUCA] architecture
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method of managing a distributed cache structure having separate cache banks, by detecting that a given cache line has been repeatedly accessed by two or more processors which share the cache, and replicating that cache line in at least two separate cache banks. The cache line is optimally replicated in a cache bank having the lowest latency with respect to the given accessing processor. A currently accessed line in a different cache bank can be exchanged with a cache line in the cache bank with the lowest latency, and another line in the cache bank with lowest latency is moved to the different cache bank prior to the currently accessed line being moved to the cache bank with the lowest latency. Further replication of the cache line can be disabled when two or more processors alternately write to the cache line.

## Claims

### Claim 1

A method of managing a distributed cache structure of a multiprocessor computer system, comprising:
accessing a line of a cache repeatedly from two or more processors which share the cache, wherein the cache has a plurality of separate cache banks that store cache lines;
detecting that the cache line has been repeatedly accessed by two or more processors; and
replicating the cache line in at least two separate cache banks of the cache in response to said detecting.

### Claim 2 (depends on 1)

The method of claim 1 wherein:
the separate cache banks have different access latencies with respect to a given one of the accessing processors; and
the cache line is replicated in a cache bank having a lowest latency with respect to the given accessing processor.

### Claim 3 (depends on 2)

The method of claim 2 wherein a currently accessed line in a different cache bank is exchanged with a cache line in the cache bank with the lowest latency.

### Claim 4 (depends on 3)

The method of claim 3 wherein another line in the cache bank with lowest latency is moved to the different cache bank prior to the currently accessed line being moved to the cache bank with the lowest latency.

### Claim 5 (depends on 1)

The method of claim 1 wherein said detecting includes counting the accesses of the cache line by each of the accessing processors.

### Claim 6 (depends on 5)

The method of claim 5 wherein said detecting further includes determining that access counts for at least two accessing processors have exceeded a preset threshold.

### Claim 7 (depends on 5)

The method of claim 5 wherein access count values for the entire cache are reset at periodic intervals.

### Claim 8 (depends on 5)

The method of claim 5 wherein access count values for the cache are reset on a per-line basis when more than one of the access count values saturate.

### Claim 9 (depends on 1)

The method of claim 1 further comprising updating a value for the cache line in only one cache bank while invalidating other replications of the cache line, in response to a write operation directed to the cache line.

### Claim 10 (depends on 9)

The method of claim 9 wherein further replication of the cache line is disabled when two or more processors alternately write to the cache line.

### Claim 11 (depends on 1)

The method of claim 1 wherein a check for migration or replacement is performed after a preset number of accesses to a line.

### Claim 12 (depends on 1)

The method of claim 1 wherein the cache uses an affinity set having weights to indicate how much latency is required to access data from a particular cache bank.

### Claim 13 (depends on 1)

The method of claim 1 further comprising updating a value for the cache line in each cache bank having a replication of the cache line, in response to a write operation directed to the cache line.

### Claim 14

A cache memory unit for a multiprocessor computer system, comprising:
an array of cache lines distributed among multiple cache banks;
a cache directory having state information for each of the cache lines; and
control logic which replicates a given cache line in at least two separate cache banks when said cache line has been repeatedly accessed by two or more processors.

### Claim 15 (depends on 14)

The cache memory unit of claim 14 wherein:
said cache banks have different access latencies with respect to the accessing processors; and
said cache line is replicated in a cache bank having a lowest latency with respect to a given accessing processor.

### Claim 16 (depends on 15)

The cache memory unit of claim 15 wherein a currently accessed line in a different cache bank is exchanged with a cache line in said cache bank with the lowest latency.

### Claim 17 (depends on 16)

The cache memory unit of claim 16 wherein another line in said cache bank with lowest latency is moved to said different cache bank prior to the currently accessed line being moved to said cache bank with the lowest latency.

### Claim 18 (depends on 14)

The cache memory unit of claim 14 wherein said control logic counts the accesses of said cache line by each of the accessing processors.

### Claim 19 (depends on 18)

The cache memory unit of claim 18 wherein said control logic determines that access counts for at least two accessing processors have exceeded a preset threshold.

### Claim 20 (depends on 18)

The cache memory unit of claim 18 wherein access count values for the entire cache are reset at periodic intervals.

### Claim 21 (depends on 18)

The cache memory unit of claim 18 wherein access count values for said cache are reset on a per-line basis when more than one of the access count values saturate.

### Claim 22 (depends on 14)

The cache memory unit of claim 14 wherein said control logic further updates a value for said cache line in only one cache bank while invalidating other replications of said cache line, in response to a write operation directed to said cache line.

### Claim 23 (depends on 22)

The cache memory unit of claim 22 wherein said control logic further disables replication of said cache line when two or more processors alternately write to said cache line.

### Claim 24 (depends on 14)

The cache memory unit of claim 14 wherein said control logic checks for migration or replacement after a preset number of accesses to a line.

### Claim 25 (depends on 14)

The cache memory unit of claim 14 wherein said control logic uses an affinity set having weights to indicate how much latency is required to access data from a particular cache bank.

### Claim 26 (depends on 14)

The cache memory unit of claim 14 wherein said control logic further updates a value for said cache line in each cache bank having a replication of said cache line, in response to a write operation directed to said cache line.

### Claim 27

A computer system comprising:
two or more processing cores;
a main memory;
a distributed cache memory interconnected with said two or more processing cores and said main memory, said distributed cache memory including an array of cache lines distributed among multiple cache banks, a cache directory having state information for each of the cache lines, and control logic which replicates a given cache line in at least two separate cache banks when said cache line has been repeatedly accessed by two or more of said processor cores.

### Claim 28 (depends on 27)

The computer system of claim 27 wherein:
said cache banks have different access latencies with respect to the accessing processor cores; and
said cache line is replicated in a cache bank having a lowest latency with respect to a given accessing processor core.

### Claim 29 (depends on 28)

The computer system of claim 28 wherein a currently accessed line in a different cache bank is exchanged with a cache line in said cache bank with the lowest latency.

### Claim 30 (depends on 29)

The computer system of claim 29 wherein another line in said cache bank with lowest latency is moved to said different cache bank prior to the currently accessed line being moved to said cache bank with the lowest latency.

### Claim 31 (depends on 27)

The computer system of claim 27 wherein said control logic counts the accesses of said cache line by each of the accessing processor cores.

### Claim 32 (depends on 31)

The computer system of claim 31 wherein said control logic determines that access counts for at least two accessing processor cores have exceeded a preset threshold.

### Claim 33 (depends on 31)

The computer system of claim 31 wherein access count values for the entire cache are reset at periodic intervals.

### Claim 34 (depends on 31)

The computer system of claim 31 wherein access count values for said cache are reset on a per-line basis when more than one of the access count values saturate.

### Claim 35 (depends on 27)

The computer system of claim 27 wherein said control logic further updates a value for said cache line in only one cache bank while invalidating other replications of said cache line, in response to a write operation directed to said cache line.

### Claim 36 (depends on 35)

The computer system of claim 35 wherein said control logic further disables replication of said cache line when two or more processor cores alternately write to said cache line.

### Claim 37 (depends on 27)

The computer system of claim 27 wherein said control logic checks for migration or replacement after a preset number of accesses to a line.

### Claim 38 (depends on 27)

The computer system of claim 27 wherein said control logic uses an affinity set having weights to indicate how much latency is required to access data from a particular cache bank.

### Claim 39 (depends on 27)

The computer system of claim 27 wherein said control logic further updates a value for said cache line in each cache bank having a replication of said cache line, in response to a write operation directed to said cache line.
