# US 2017/0293556 A1 · Read discards in a processor system with write-back caches

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

- Number: US 2017/0293556 A1
- Document ID: US20170293556A1
- Status: Published application
- Kind: A1
- Application number: 15/093,404
- Filed: 2016-04-07
- Published: 2017-10-12
- Earliest claimed: 2016-04-07
- Assignees: Imagination Technologies Limited
- Applicants: Imagination Technologies Limited
- Inventors: Ranjit J. Rozario
- Web page: https://patentgrep.com/patent/US20170293556A1

## CPC

- G06F 12/0804: with main memory updating (G06F12/0806 takes precedence)
- G06F 12/0811: with multilevel cache hierarchies
- G06F 12/0817: using directory methods
- G06F 12/084: with a shared cache
- G06F 12/0842: for multiprocessing or multitasking
- G06F 12/0864: using pseudo-associative means, e.g. set-associative or hashing
- G06F 12/0897: with two or more cache hierarchy levels (with multilevel cache hierarchies G06F12/0811)
- G06F 2212/6042: Allocation of cache space to multiple users or processors
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and method provide for a better way of managing a shared memory system. A multiprocessor system includes a first and second CPU, with each CPU having a private L1 cache. The system further includes a level 2 (L2) cache shared between the first CPU and the second CPU, and includes a memory coherency manager (CM) and an I/O device. The second CPU is configured to request ownership of a cache line in the L1 cache of the first CPU that is in a Modified state. Later, upon receiving a read discard command from the I/O device, the second CPU is configured to request the CM update the cache line from a Modified state to a Shared state.

## Claims

### Claim 1

A multiprocessor system comprising:
a first CPU with a private level 1 (L1) cache;
a second CPU with a private L1 cache;
a level 2 (L2) cache shared between the first CPU and the second CPU;
a memory coherency manager (CM);
an input/output (I/O) device;
wherein the second CPU is configured to request ownership of a cache line in the L1 cache of the first CPU that is in a Modified state, and wherein the second CPU is configured to request the CM update the cache line from a Modified state to a Shared state upon receiving a read discard command from the I/O device.

### Claim 2 (depends on 1)

The multiprocessor system of claim 1 wherein before the second CPU has an updated copy of the cache line from the first CPU the CM is configured to send an intervention request to the second CPU upon receiving the read discard request from the I/O device.

### Claim 3 (depends on 1)

The multiprocessor system of claim 1 wherein the L1 cache of the first CPU and the L1 cache of the second CPU are write-back caches.

### Claim 4 (depends on 1)

The multiprocessor system of claim 1 wherein the first CPU is configured to write the cache line to the L2 cache before the cache line is updated by the CM from the Modified state to the Shared state.

### Claim 5 (depends on 1)

The multiprocessor system of claim 1 wherein the CM manages cache lines based on the Modified, Exclusive, Shared, and Invalid (MESI) protocol that indicates whether cache lines are in a Modified state, an Exclusive state, a Shared state, or an Invalid state.

### Claim 6 (depends on 1)

The multiprocessor system of claim 1 wherein the CM further comprises:
a directory, wherein the CM stores in the directory whether cache lines in the L1 cache of the first CPU and the L1 cache of the second CPU are in the Shared state or the Modified state.

### Claim 7 (depends on 1)

The multiprocessor system of claim 1 wherein the L1 cache of the first CPU and the L1 cache of the second CPU are N-way set associative caches where N is an integer.

### Claim 8 (depends on 1)

The multiprocessor system of claim 1 further comprising:
a shared main memory connected to the L2 cache.

### Claim 9 (depends on 1)

The multiprocessor system of claim 1 wherein the read discard command is a load request of a word of data that is four bytes of data.

### Claim 10 (depends on 8)

The multiprocessor system of claim 8 wherein the cache line further comprises:
at least four words of data.

### Claim 11 (depends on 1)

The multiprocessor system of claim 1 is a system implemented in single semiconductor chip.

### Claim 12

A method comprising:
receiving a read discard command in a CPU that requests a load of data contained in a cache line of an L1 cache privately controlled by the CPU, wherein the cache line is in a Modified state when the read discard command is received;
changing the cache line from the Modified state to a Shared state after receiving the read discard command; and
writing the cache line back to an L2 cache.

### Claim 13 (depends on 11)

The method of claim 11 further comprising:
receiving the read discard command from a coherency manager (CM) managing a memory system shared by the CPU and at least one other CPU, wherein the memory system includes the L2 cache.

### Claim 14 (depends on 11)

The method of claim 11 further comprising:
determining if it is desirable to change the cache line from the Modified state to the Shared state, and only changing the cache line from the Modified state to a Shared state when it is desirable to change the cache line from the Modified state to the Shared state.

### Claim 15

A multiprocessor processor system comprising:
a first CPU with a private L1 cache;
a second CPU with a private L1 cache;
a L2 cache shared between the first CPU and the second CPU;
a CM tracking states of cache lines in the L2;
block read detection logic in the first CPU configured to detect that read shared instructions sent to the first CPU by the CM are performing a read of a block of data at least partially contained in a cache line of the L1 cache of the first CPU, wherein the block of data is stored at sequential addresses of memory, and wherein when the block read detection logic determines a block of data is being read the first CPU is configured to request the CM send the first CPU one or more read discard commands to read a remaining portion of the block of data.

### Claim 16 (depends on 15)

The multiprocessor processor system of claim 15 wherein the read shared instructions further comprises:
read shared instructions of a format that indicates the read shared instructions are performing a read of the block of data.

### Claim 17 (depends on 16)

The multiprocessor processor system of claim 16 wherein the format further comprises:
one more bits indicating a read shared instruction performing a read of the block of data, and wherein the block read detection logic if configured to detect the one or more bits.

### Claim 18 (depends on 15)

The multiprocessor processor system of claim 15 wherein the block read detection logic is configured to track at least one of the group of: a program counter (PC) and load addresses and to detect the read of the block of data base on a sequence of values of at least one of the group of: the PC and the load addresses.

### Claim 19 (depends on 15)

The multiprocessor processor system of claim 15 further comprising:
a memory copy (Memcpy) routine performing the read of a block of data.

### Claim 20 (depends on 15)

The multiprocessor processor system of claim 15 further comprising:
an I/O device connected to the CM and configured to generate the read shared instructions.
