# US 2017/0255557 A1 · Self-healing coarse-grained snoop filter

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

- Number: US 2017/0255557 A1
- Document ID: US20170255557A1
- Status: Published application
- Kind: A1
- Application number: 15/063,259
- Filed: 2016-03-07
- Published: 2017-09-07
- Earliest claimed: 2016-03-07
- Assignees: QUALCOMM Incorporated
- Applicants: QUALCOMM Incorporated
- Inventors: Eric Francis ROBINSON; Khary Jason ALEXANDER; Zeid Hartuon SAMOAIL; Benjamin Charles MICHELSON
- Web page: https://patentgrep.com/patent/US20170255557A1

## CPC

- G06F 12/0815: Cache consistency protocols
- G06F 12/0811: with multilevel cache hierarchies
- G06F 12/0831: using a bus scheme, e.g. with bus monitoring or watching means
- G06F 12/0833: {in combination with broadcast means (e.g. for invalidation or updating)}
- G06F 12/084: with a shared cache
- G06F 2212/1024: Latency reduction
- G06F 2212/251: Local memory within processor subsystem
- G06F 2212/621: Coherency control relating to peripheral accessing, e.g. from DMA or I/O device
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The disclosure relates to filtering snoops in coherent multiprocessor systems. For example, in response to a request to update a target memory location at a Level-2 (L2) cache shared among multiple local processing units each having a Level-1 (L1) cache, a lookup based on the target memory location may be performed in a snoop filter that tracks entries in the L1 caches. If the lookup misses the snoop filter and the snoop filter lacks space to store a new entry, a victim entry to evict from the snoop filter may be selected and a request to invalidate every cache line that maps to the victim entry may be sent to at least one of the processing units with one or more cache lines that map to the victim entry. The victim entry may then be replaced in the snoop filter with the new entry corresponding to the target memory location.

## Claims

### Claim 1

A method for filtering snoops in a coherent multiprocessor system, comprising:
receiving a request to update a target memory location at a Level-2 (L2) cache shared among multiple local processing units that each have a Level-1 (L1) cache;
performing a lookup based on the target memory location in a snoop filter that tracks entries in the L1 cache associated with each local processing unit;
selecting a victim entry to evict from the snoop filter in response to the lookup missing the snoop filter and the snoop filter lacking available space to store a new entry that corresponds to the target memory location;
sending a request to invalidate every cache line that maps to the selected victim entry to at least one of the multiple processing units that has one or more cache lines that map to the selected victim entry in the L1 cache associated therewith; and
replacing the selected victim entry in the snoop filter with the new entry that corresponds to the target memory location.

### Claim 2 (depends on 1)

The method recited in claim 1, further comprising:
installing the new entry in the snoop filter in response to the lookup based on the target memory location missing the snoop filter and the snoop filter having the available space to store the new entry.

### Claim 3 (depends on 1)

The method recited in claim 1, further comprising:
establishing the new entry in a temporary overflow area; and
receiving an acknowledgement from the at least one processing unit, the acknowledgement indicating that every cache line that maps to the selected victim entry has been invalidated in the L1 cache associated therewith, wherein the new entry is moved from the temporary overflow area into the snoop filter to replace the selected victim entry upon receiving the acknowledgement.

### Claim 4 (depends on 3)

The method recited in claim 3, further comprising:
receiving a remote snoop after establishing the new entry in the temporary overflow area and before receiving the acknowledgement, the remote snoop indicating that a remote master has requested permission to modify a memory location; and
forwarding the remote snoop to one or more of the multiple local processing units in response to the remote snoop hitting the selected victim entry or the new entry.

### Claim 5 (depends on 1)

The method recited in claim 1, further comprising:
temporarily disabling the snoop filter prior to receiving the acknowledgement;
receiving a remote snoop indicating that a remote master has requested permission to modify a memory location while the snoop filter is disabled; and
forwarding the remote snoop to the L1 cache at each local processing unit.

### Claim 6 (depends on 1)

The method recited in claim 1, further comprising:
identifying, among the multiple local processing units, at least one processing unit that has one or more cache lines that map to the target memory location in response to the lookup hitting the snoop filter;
forwarding a local snoop to the identified at least one processing unit; and
updating one or more metrics associated with the entries tracked in the snoop filter that are used to select the victim entry to be evicted upon the snoop filter lacking the available space to store the new entry.

### Claim 7 (depends on 1)

The method recited in claim 1, wherein the selected victim entry comprises a least-frequently accessed entry selected from among a plurality of entries in the snoop filter that were least-recently accessed.

### Claim 8 (depends on 1)

The method recited in claim 1, wherein the selected victim entry comprises one or more of an entry in the snoop filter that was least-recently accessed, an entry in the snoop filter that was least-recently established, or a random entry in the snoop filter.

### Claim 9 (depends on 1)

The method recited in claim 1, wherein the selected victim entry comprises one or more entries in the snoop filter that remote snoops frequently hit and that the multiple local processing units have not accessed recently.

### Claim 10 (depends on 1)

The method recited in claim 1, further comprising:
flushing the snoop filter and the L1 cache at each local processing unit in response to the lookup missing the snoop filter and the snoop filter lacking available space to store the new entry that corresponds to the target memory location, whereby the selected victim entry to evict from the snoop filter comprises every entry in the snoop filter and the request sent to each L1 cache causes the entire L1 cache to be flushed.

### Claim 11 (depends on 1)

The method recited in claim 1, wherein the L2 cache is non-inclusive.

### Claim 12

A coherent multiprocessor system, comprising:
multiple local processing units that each have a Level-1 (L1) cache;
a Level-2 (L2) cache shared among the multiple local processing units, wherein the L2 cache includes a snoop filter configured to track entries in the L1 cache associated with each local processing unit; and
a processor configured to:
receive a request to update a target memory location at the L2 cache;
perform a lookup in the snoop filter based on the target memory location;
select a victim entry to evict from the snoop filter in response to the lookup missing the snoop filter and the snoop filter lacking available space to store a new entry that corresponds to the target memory location;
send a request to invalidate every cache line that maps to the selected victim entry to at least one of the multiple processing units that has one or more cache lines that map to the selected victim entry in the L1 cache associated therewith; and
replace the selected victim entry in the snoop filter with the new entry that corresponds to the target memory location.

### Claim 13 (depends on 12)

The coherent multiprocessor system recited in claim 12, wherein the processor is further configured to install the new entry in the snoop filter in response to the lookup missing the snoop filter and the snoop filter having the available space to store the new entry.

### Claim 14 (depends on 12)

The coherent multiprocessor system recited in claim 12, wherein the processor is further configured to:
establish the new entry in a temporary overflow area;
receive an acknowledgement from the at least one processing unit, the acknowledgement indicating that every cache line that maps to the selected victim entry has been invalidated in the L1 cache associated therewith; and
move the new entry from the temporary overflow area into the snoop filter to replace the selected victim entry upon receiving the acknowledgement.

### Claim 15 (depends on 14)

The coherent multiprocessor system recited in claim 14, wherein the processor is further configured to:
receive a remote snoop after the new entry has been established in the temporary overflow area and before the acknowledgement is received, the remote snoop indicating that a remote master has requested permission to modify a memory location; and
forward the remote snoop to one or more of the multiple local processing units in response to the remote snoop hitting the selected victim entry or the new entry.

### Claim 16 (depends on 12)

The coherent multiprocessor system recited in claim 12, wherein the processor is further configured to:
disable the snoop filter temporarily before the acknowledgement is received;
receive a remote snoop indicating that a remote master has requested permission to modify a memory location while the snoop filter is disabled; and
forward the remote snoop to the L1 cache at each local processing unit.

### Claim 17 (depends on 12)

The coherent multiprocessor system recited in claim 12, wherein the processor is further configured to:
identify, among the multiple local processing units, at least one processing unit that has one or more cache lines that map to the target memory location in response to the lookup hitting the snoop filter;
forward a local snoop to the identified at least one processing unit; and
update one or more metrics associated with the entries tracked in the snoop filter that are used to select the victim entry to be evicted upon the snoop filter lacking the available space to store the new entry.

### Claim 18 (depends on 12)

The coherent multiprocessor system recited in claim 12, wherein the selected victim entry comprises a least-frequently accessed entry selected from among a plurality of entries in the snoop filter that were least-recently accessed.

### Claim 19 (depends on 12)

The coherent multiprocessor system recited in claim 12, wherein the selected victim entry comprises one or more of an entry in the snoop filter that was least-recently accessed, an entry in the snoop filter that was least-recently established, or a random entry in the snoop filter.

### Claim 20 (depends on 12)

The coherent multiprocessor system recited in claim 12, wherein the selected victim entry comprises one or more entries in the snoop filter that remote snoops frequently hit and that the multiple local processing units have not accessed recently.

### Claim 21 (depends on 12)

The coherent multiprocessor system recited in claim 12, wherein the processor is further configured to:
flush the snoop filter and the L1 cache at each local processing unit in response to the lookup missing the snoop filter and the snoop filter lacking available space to store the new entry that corresponds to the target memory location, whereby the selected victim entry to evict from the snoop filter comprises every entry in the snoop filter and the request sent to each L1 cache causes the entire L1 cache to be flushed.

### Claim 22 (depends on 12)

The coherent multiprocessor system recited in claim 12, wherein the L2 cache is non-inclusive.

### Claim 23

An apparatus, comprising:
means for receiving a request to update a target memory location at a non-inclusive Level-2 (L2) cache shared among multiple local processing units that each have a Level-1 (L1) cache;
means for performing a lookup based on the target memory location in a snoop filter that tracks entries in the L1 cache associated with each local processing unit;
means for selecting a victim entry to evict from the snoop filter in response to the lookup missing the snoop filter and the snoop filter lacking available space to store a new entry that corresponds to the target memory location;
means for sending a request to invalidate every cache line that maps to the selected victim entry to at least one of the multiple processing units that has one or more cache lines that map to the selected victim entry in the L1 cache associated therewith; and
means for replacing the selected victim entry in the snoop filter with the new entry that corresponds to the target memory location.

### Claim 24 (depends on 23)

The apparatus recited in claim 23, further comprising:
means for installing the new entry in the snoop filter in response to the lookup based on the target memory location missing the snoop filter and the snoop filter having the available space to store the new entry.

### Claim 25 (depends on 23)

The apparatus recited in claim 23, further comprising:
means for establishing the new entry in a temporary overflow area; and
means for receiving an acknowledgement from the at least one processing unit, the acknowledgement indicating that every cache line that maps to the selected victim entry has been invalidated in the L1 cache associated therewith, wherein the new entry is moved from the temporary overflow area into the snoop filter to replace the selected victim entry upon receiving the acknowledgement.

### Claim 26 (depends on 25)

The apparatus recited in claim 25, further comprising:
means for receiving a remote snoop after establishing the new entry in the temporary overflow area and before receiving the acknowledgement, the remote snoop indicating that a remote master has requested permission to modify a memory location; and
means for forwarding the remote snoop to one or more of the multiple local processing units in response to the remote snoop hitting the selected victim entry or the new entry.

### Claim 27 (depends on 23)

The apparatus recited in claim 23, further comprising:
means for temporarily disabling the snoop filter prior to receiving the acknowledgement;
means for receiving a remote snoop indicating that a remote master has requested permission to modify a memory location while the snoop filter is disabled; and
means for forwarding the remote snoop to the L1 cache at each local processing unit.

### Claim 28 (depends on 23)

The apparatus recited in claim 23, further comprising:
means for identifying, among the multiple local processing units, at least one processing unit that has one or more cache lines that map to the target memory location in response to the lookup hitting the snoop filter;
means for forwarding a local snoop to the identified at least one processing unit; and
means for updating one or more metrics associated with the entries tracked in the snoop filter that are used to select the victim entry to be evicted upon the snoop filter lacking the available space to store the new entry.

### Claim 29 (depends on 23)

The apparatus recited in claim 23, further comprising:
means for flushing the snoop filter and the L1 cache at each local processing unit in response to the lookup missing the snoop filter and the snoop filter lacking available space to store the new entry that corresponds to the target memory location, whereby the selected victim entry to evict from the snoop filter comprises every entry in the snoop filter and the request sent to each L1 cache causes the entire L1 cache to be flushed.

### Claim 30

A computer-readable medium storing computer-executable instructions, the stored computer-executable instructions configured to cause one or more processors to:
receive a request to update a target memory location at a non-inclusive Level-2 (L2) cache shared among multiple local processing units that each have a Level-1 (L1) cache;
perform a lookup based on the target memory location in a snoop filter that tracks entries in the L1 cache associated with each local processing unit;
select a victim entry to evict from the snoop filter in response to the lookup missing the snoop filter and the snoop filter lacking available space to store a new entry that corresponds to the target memory location;
send a request to invalidate every cache line that maps to the selected victim entry to at least one of the multiple processing units that has one or more cache lines that map to the selected victim entry in the L1 cache associated therewith; and
replace the selected victim entry in the snoop filter with the new entry that corresponds to the target memory location.
