# US 8,788,761 B2 · System and method for explicitly managing cache coherence

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

- Number: US 8,788,761 B2
- Document ID: US8788761B2
- Status: Granted
- Kind: B2
- Application number: 13/243,948
- Filed: 2011-09-23
- Published: 2012-03-29
- Granted: 2014-07-22
- Earliest claimed: 2010-09-24
- Assignees: NVIDIA Corporation
- Applicants: William James Dally
- Inventors: William James Dally
- Web page: https://patentgrep.com/patent/US8788761B2

## CPC

- G06F 12/0817: using directory methods
- G06F 12/0842: for multiprocessing or multitasking
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

One embodiment of the present invention sets forth am extension to a cache coherence protocol with two explicit control states, P (private), and R (read-only), that provide explicit program control of cache lines for which the program logic can guarantee correct behavior. In the private state, only the owner of a cache line can access the cache line for read or write operations. In the read-only state, only read operations can be performed on the cache line, thereby disallowing write operations to be performed.

## Claims

### Claim 1

A method for implementing cache coherency across a plurality of cache units coupled to a random access memory unit, the method comprising:
receiving a request for setting a state corresponding to one or more cache lines in a set of cache lines to an explicit control state;
transmitting a message to a global directory associated with the plurality of cache units, the message requesting a transition to the explicit control state; and
upon receiving a reply from the global directory, setting the state corresponding to the one or more cache lines to the explicit control state, wherein, when the state corresponding to a first cache line in the one or more cache lines is set to an explicit control state, only a pre-determined set of memory access operations can be performed on the first cache line and any memory access operations performed on the first cache line are not tracked by the global directory.

### Claim 2 (depends on 1)

The method of claim 1, wherein the explicit control state comprises a private state, and, when the first cache line is associated with the private state, the first cache line can only be accessed by a first cache unit.

### Claim 3 (depends on 1)

The method of claim 1, wherein setting the state corresponding to the one or more cache lines to the explicit control state comprises transmitting an invalidation request to a second cache unit that shares the first cache line in the set of cache lines, and wherein, in response to the invalidation request, the second cache unit sets a local state corresponding to the first cache line to invalid.

### Claim 4 (depends on 1)

The method of claim 1, wherein the reply from the global directory indicates that the one or more cache lines may safely transition to the explicit control state.

### Claim 5 (depends on 1)

The method of claim 1, wherein the explicit control state comprises a read-only state, and, when the first cache line is associated with the read-only state the first cache line can be read by the plurality of cache units.

### Claim 6 (depends on 1)

The method of claim 1, further comprising setting the state corresponding to the one or more cache lines to an invalid state based on receiving a release instruction.

### Claim 7 (depends on 1)

The method of claim 1, wherein a region register indicates that a memory operation associated with a range of addresses should cause the cache lines associated with the range of addresses to be requested in the explicit control state.

### Claim 8

A cache controller for implementing cache coherency across a plurality of cache units coupled to a direct random access memory unit, the cache controller configured to:
receive a request for setting a state corresponding to one or more cache lines in a set of cache lines to an explicit control state;
transmitting a message to a global directory associated with the plurality of cache units, the message requesting a transition to the explicit control state; and
upon receiving a reply from the global directory, set the state corresponding to every cache line included in the one or more cache lines to the explicit control state, wherein, when the state corresponding to a first cache line in the one or more cache lines is set to an explicit control state, only a pre-determined set of memory access operations can be performed on the first cache line and any memory access operations performed on the first cache line are not tracked by the global directory.

### Claim 9 (depends on 8)

The cache controller of claim 8, wherein the explicit control state comprises a private state, and, when the first cache line is associated with the private state, the first cache line can only be accessed by a first cache unit.

### Claim 10 (depends on 8)

The cache controller of claim 8, wherein setting the state corresponding to the one or more cache lines to the explicit control state comprises transmitting an invalidation request to a second cache unit that shares the first cache line in the set of cache lines, and wherein, in response to the invalidation request, the second cache unit sets a local state corresponding to the first cache line to invalid.

### Claim 11 (depends on 8)

The cache controller of claim 8, wherein the reply from the global directory indicates that the one or more cache lines may safely transition to the explicit control state.

### Claim 12 (depends on 8)

The cache controller of claim 8, wherein the explicit control state comprises a read-only state, and, when the first cache line is associated with the read-only state, the first cache line can only be read by the plurality of cache units.

### Claim 13 (depends on 8)

The cache controller of claim 8, further configured to set the state corresponding to the one or more cache lines to an invalid state based on receiving a release instruction.

### Claim 14 (depends on 8)

The cache controller of claim 8, wherein a region register indicates that a memory operation associated with a range of addresses should cause the cache lines associated with the range of addresses to be requested in the explicit control state.

### Claim 15

A computer system, comprising:
a plurality of processing engines, each coupled to a different cache unit in a plurality of cache units;
an off-chip memory coupled to the plurality of cache units; and
a cache controller configured to implement cache coherency across the plurality of cache units, the cache controller configured to:
receive a request for setting a state corresponding to one or more cache lines in a set of cache lines to an explicit control state;
transmit a message to a global directory associated with the plurality of cache units, the message requesting a transition to the explicit control state; and
upon receiving a reply from the global directory, set the state corresponding to every cache line included in the one or more cache lines to the explicit control state, wherein, when the state corresponding to a first cache line in the one or more cache lines is set to an explicit control state, only a pre-determined set of memory access operations can be performed on the first cache line and any memory access operations performed on the first cache line are not tracked by the global directory.

### Claim 16 (depends on 15)

The computer system of claim 15, wherein the explicit control state comprises a private state, and, when the first cache line is associated with the private state, the first cache line can only be accessed by a first cache unit.

### Claim 17 (depends on 15)

The computer system of claim 15, wherein the explicit control state comprises a read-only state, and, when the first cache line is associated with the read-only state, the first cache line can only be read by the plurality of cache units.

### Claim 18 (depends on 15)

The computer system of claim 15, wherein a region register indicates that a memory operation associated with a range of addresses should cause the cache lines associated with the range of addresses to be requested in the explicit control state.
