# US 2015/0149722 A1 · Delaying cache data array updates

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

- Number: US 2015/0149722 A1
- Document ID: US20150149722A1
- Status: Published application
- Kind: A1
- Application number: 14/089,014
- Filed: 2013-11-25
- Published: 2015-05-28
- Earliest claimed: 2013-11-25
- Assignees: Apple Inc.
- Applicants: Apple Inc.
- Inventors: Hari S. Kannan; Brian P. Lilly; Perumal R. Subramoniam; Pradeep Kanapathipillai
- Web page: https://patentgrep.com/patent/US20150149722A1

## CPC

- G06F 12/0811: with multilevel cache hierarchies
- G06F 12/0842: for multiprocessing or multitasking
- G06F 12/0857: {by multiple requestors}
- G06F 12/0888: using selective caching, e.g. bypass
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems, methods, and apparatuses for reducing writes to the data array of a cache. A cache hierarchy includes one or more L1 caches and a L2 cache inclusive of the L2 cache(s). When a request from the L1 cache misses in the L2 cache, the L2 cache sends a fill request to memory. When the fill data returns from memory, the L2 cache delays writing the fill data to its data array. Instead, this cache line is written to the L1 cache and a clean-evict bit corresponding to the cache line is set in the L1 cache. When the L1 cache evicts this cache line, the L1 cache will write back the cache line to the L2 cache even if the cache line has not been modified.

## Claims

### Claim 1

A system comprising:
a first cache; and
a second cache, wherein the second cache is inclusive of the first cache;
wherein the first cache is configured to convey a first memory request to the second cache responsive to detecting a miss for the first memory request in the first cache;
wherein the second cache is configured to:
issue a fill request responsive to detecting a miss for the first memory request in the second cache;
receive a first cache line corresponding to the fill request;
convey the first cache line to the first cache; and
delay writing the first cache line to the second cache until the first cache line is evicted from the first cache.

### Claim 2 (depends on 1)

The system as recited in claim 1, wherein the second cache comprises a data array and a tag array, wherein the second cache is further configured to update a first tag in the tag array with attributes corresponding to the first memory request responsive to receiving the first cache line.

### Claim 3 (depends on 1)

The system as recited in claim 1, wherein the first cache line is received by the second cache in an exclusive state.

### Claim 4 (depends on 1)

The system as recited in claim 1, wherein the first cache comprises a data array and a tag array, and wherein responsive to receiving the first cache line from the second cache, the first cache is configured to:
write the first cache line to a first cache line storage location allocated in the data array; and
set a clean-evict bit in a first tag corresponding to the first cache line storage location, wherein the clean-evict bit indicates the first cache should write back the first cache line to the second cache when the first cache line is evicted regardless of the dirty status of the first cache line.

### Claim 5 (depends on 1)

The system as recited in claim 1, wherein the first cache is a level one (L1) cache, and wherein the second cache is a level two (L2) cache.

### Claim 6 (depends on 1)

The system as recited in claim 1, wherein the first cache is a level two (L2) cache, and wherein the second cache is a level three (L3) cache.

### Claim 7 (depends on 1)

The system as recited in claim 1, wherein the second cache is at a lower level of a cache hierarchy than the first cache.

### Claim 8

An apparatus comprising:
a first cache; and
a second cache, wherein the second cache is at a lower level of a cache hierarchy than the first cache, and wherein the second cache is configured to:
receive a first memory request from the first cache;
detect a miss for the first memory request in the second cache;
issue a fill request corresponding to the first memory request;
receive a first cache line corresponding to the fill request;
convey the first cache line to the first cache; and
delay writing the first cache line to the second cache until the first cache line is evicted from the first cache.

### Claim 9 (depends on 8)

The apparatus as recited in claim 8, wherein the first memory request corresponds to a first memory request generated by a first requesting agent.

### Claim 10 (depends on 9)

The apparatus as recited in claim 9, wherein the first requesting agent is a processor core.

### Claim 11 (depends on 9)

The apparatus as recited in claim 9, wherein the first requesting agent is a graphics processing unit (GPU).

### Claim 12 (depends on 8)

The apparatus as recited in claim 8, wherein the first cache line is received by the second cache with write permissions.

### Claim 13 (depends on 8)

The apparatus as recited in claim 8, wherein the second cache is further configured to notify the first cache that the first cache line has not been written to the second cache.

### Claim 14 (depends on 8)

The apparatus as recited in claim 8, wherein the second cache is inclusive of the first cache.

### Claim 15 (depends on 14)

The apparatus as recited in claim 14, further comprising a third cache, wherein the third cache is a level one (L1) cache, and wherein the second cache is inclusive of the third cache.

### Claim 16

A method comprising:
conveying a first memory request from a first cache to a second cache, wherein the second cache is inclusive of the first cache;
issuing a fill request responsive to detecting a miss for the first memory request in the second cache;
receiving a first cache line at the second cache corresponding to the fill request, wherein the first cache line is received in an exclusive state;
conveying the first cache line to the first cache; and
delay writing the first cache line to the second cache until the first cache line is evicted from the first cache

### Claim 17 (depends on 16)

The method as recited in claim 16, wherein the first cache line is received from a memory.

### Claim 18 (depends on 16)

The method as recited in claim 16, wherein the first cache line is received from a third cache.

### Claim 19 (depends on 16)

The method as recited in claim 16, wherein responsive to receiving the first cache line at the first cache, the method further comprising:
writing the first cache line to a data array of the first cache; and
setting a clean-evict bit in a first tag in a tag array of the first cache, wherein the first tag corresponds to the first cache line.

### Claim 20 (depends on 19)

The method as recited in claim 19, further comprising:
evicting the first cache line from the first cache, wherein the first cache line has not been modified; and
writing the first cache line to the second cache responsive to detecting the clean-evict bit of the first tag is set.
