IP Library Granted Patent US 12,332,792
Granted Patent B2
US 12,332,792 · App. 18/582,333 · Granted Jun 17, 2025

Scalable cache coherency protocol

Inventors: James Vash (San Ramon, CA); Gaurav Garg (San Jose, CA); Brian P. Lilly (San Francisco, CA); Ramesh B. Gunna (San Jose, CA); Steven R. Hutsell (San Jose, CA); Lital Levy-Rubin (Tel Aviv, IL); Per H. Hammarlund (Sunnyvale, CA); Harshavardhan Kaushikkar (Santa Clara, CA)
Assignee: Apple Inc.
G06F12/0815G06F12/0831G06F2212/1032
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,332,792
App. No.
18/582,333
Granted
Jun 17, 2025
Kind
B2
Abstract

A system may include multiple coherent agents, where a given coherent agent includes one or more caches configured to cache data. Memory controller circuitry may control one or more memory circuits from which the one or more caches are configured to cache data and maintain a directory that tracks which of the multiple coherent agent circuits is caching copies of a plurality of cache blocks and states of the cached copies in the multiple coherent agent circuits. A first agent may transmit a first request for a first cache block. The first agent may store, in request buffer circuitry, information corresponding to the first request then detect a second snoop from a second agent circuit to the first cache block. The first agent may absorb the second snoop, including to store information corresponding to the second snoop with the information corresponding to the first request in the request buffer circuitry.

Claims (85)

1. A system, comprising:

multiple coherent agent circuits, wherein a given coherent agent circuit includes one or more caches configured to cache data;

memory controller circuitry configured to:

control one or more memory circuits from which the one or more caches are configured to cache data;

maintain a directory that tracks which of the multiple coherent agent circuits is caching copies of a plurality of cache blocks and states of the cached copies in the multiple coherent agent circuits;

wherein:

a first agent circuit of the multiple coherent agent circuits is configured to:

transmit a first request for a first cache block, wherein the memory controller circuitry is configured to generate a first snoop based on the first request;

store, in request buffer circuitry, information corresponding to the first request, wherein the request buffer circuitry implements, in a given entry:

one or more fields configured to store information for a request initiated by the first agent circuit; and

one or more fields configured to store information that describes an absorbed snoop;

detect a second snoop from a second agent circuit to the first cache block;

absorb the second snoop, including to store information that describes the second snoop with the information corresponding to the first request in the request buffer circuitry, wherein the information that describes the second snoop specifies at least: a type of the second snoop among multiple supported types of snoops; and

process the second snoop, based on the information corresponding to the second snoop in the request buffer circuitry, subsequent to completion of the first request.

2. The system of claim 1 , wherein:

the information that describes the second snoop includes an identification of a third agent circuit;

the second snoop is a forward request; and

to process the second snoop subsequent to completion of the first request, the first agent circuit is configured to forward the first cache block to the third agent circuit.

3. The system of claim 1 , wherein:

the second snoop is an invalidate request; and

to process the second snoop subsequent to completion of the first request, the first agent circuit is configured to update cache line state for the first cache block to invalid.

4. The system of claim 1 , wherein the system is configured not to store information for the absorbed second snoop in a snoop buffer or in any other entry of the request buffer circuitry.

5. The system of claim 4 , wherein, for a third snoop that is not absorbed, the first agent circuit is configured to allocate a new entry in the request buffer circuitry.

6. The system of claim 1 , wherein the first agent circuit is configured to:

compare an address of the second snoop with addresses of requests in the request buffer circuitry; and

determine to absorb the second snoop based on an address conflict to the first cache block detected by the comparison.

7. The system of claim 1 , wherein the second snoop is received prior to a corresponding fill completion and the absorption reduces backpressure on a communication fabric.

8. The system of claim 1 , wherein:

the first snoop includes an identifier of a first state of the first cache block in the first agent circuit; and

the system includes a third agent circuit configured to, based on the first snoop:

compare the first state to a second state of the first cache block in the third agent circuit, and

delay processing of the first snoop based on the first state not matching the second state until the second state is changed to the first state in response to a different communication related to a different request than the first request.

9. The system of claim 1 , wherein the system is a computing device that further includes:

the one or more memory circuits;

a display device; and

network interface circuitry.

10. A method, comprising:

controlling, by a memory controller, one or more memory circuits from which multiple coherent agents are configured to cache data in one or more respective data caches;

maintaining, by the memory controller, a directory that tracks which of the multiple coherent agents is caching copies of a plurality of cache blocks and states of the cached copies in the multiple coherent agents;

transmitting, by a first agent circuit of the multiple coherent agents, a first request for a first cache block, wherein the memory controller generates a first snoop based on the first request;

storing, by the first agent in a request buffer, information corresponding to the first request, wherein the request buffer implements, in a given entry:

one or more fields configured to store information for a request initiated by the first agent circuit; and

one or more fields configured to store information that describes an absorbed snoop;

detecting, by the first agent, a second snoop from a second agent to the first cache block;

absorbing, by the first agent, the second snoop, including storing information that describes the second snoop with the information corresponding to the first request in the request buffer, wherein the information that describes the second snoop specifies at least: a type of the second snoop among multiple supported types of snoops; and

processing the second snoop, by the first agent based on the information corresponding to the second snoop in the request buffer, subsequent to completion of the first request.

11. The method of claim 10 , wherein:

the information that describes the second snoop includes an identification of a third agent circuit;

the second snoop is a forward request; and

the processing the second snoop includes forwarding the first cache block to the third agent.

12. The method of claim 10 , wherein:

the second snoop is an invalidate request; and

the processing the second snoop includes updating cache line state for the first cache block to invalid.

13. The method of claim 10 , wherein information for the absorbed second snoop is not stored in a snoop buffer or in any other entry of the request buffer.

14. The method of claim 10 , further comprising:

for a third snoop that is not absorbed, the first agent allocating a new entry in the request buffer.

15. The method of claim 10 , further comprising:

comparing, by the first agent, an address of the second snoop with addresses of requests in the request buffer; and

determining, by the first agent, to absorb the second snoop based on an address conflict to the first cache block detected by the comparing.

16. The method of claim 10 , wherein the second snoop is received prior to a corresponding fill completion and the absorption reduces backpressure on a communication fabric.

17. The method of claim 10 ,

wherein the first snoop includes an identifier of a first state of the first cache block in the first agent;

the method further comprising:

comparing, by a third agent, the first state to a second state of the first cache block in the third agent, and

delaying, by the third agent, processing of the first snoop based on the first state not matching the second state until the second state is changed to the first state in response to a different communication related to a different request than the first request.

18. An apparatus, comprising:

a coherent agent circuit configured to:

cache data from one or more memory circuits;

communicate with memory controller circuitry that controls the one or more memory circuits, wherein the memory controller circuitry maintains a directory that tracks which of multiple coherent agent circuits is caching copies of a plurality of cache blocks and states of the cached copies in the multiple coherent agent circuits;

transmit a first request for a first cache block, wherein the memory controller circuitry is configured to generate a first snoop based on the first request;

store, in request buffer circuitry, information corresponding to the first request, wherein the request buffer circuitry implements, in a given entry:

one or more fields configured to store information for a request initiated by the coherent agent circuit; and

one or more fields configured to store information that describes an absorbed snoop;

detect a second snoop from a second agent circuit to the first cache block;

absorb the second snoop, including to store information that describes the second snoop with the information corresponding to the first request in the request buffer circuitry, wherein the information that describes the second snoop specifies at least: a type of the second snoop among multiple supported types of snoops; and

process the second snoop, based on the information corresponding to the second snoop in the request buffer circuitry, subsequent to completion of the first request.

19. The apparatus of claim 18 , wherein:

the information that describes the second snoop includes an identification of a third agent circuit;

the second snoop is a forward request; and

to process the second snoop subsequent to completion of the first request, the coherent agent circuit is configured to forward the first cache block to the third agent circuit.

20. The apparatus of claim 18 , wherein:

the first snoop includes an identifier of a first state of the first cache block in the coherent agent circuit; and

a third agent circuit is configured to, based on the first snoop:

compare the first state to a second state of the first cache block in the third agent circuit, and

delay processing of the first snoop based on the first state not matching the second state until the second state is changed to the first state in response to a different communication related to a different request than the first request.

Continuity (4)
Continuation 18058105 · Nov 22, 2022
Continuation 17315725 · May 10, 2021
Provisional Application 63077371 · Sep 11, 2020
Related Publication 20240273024A1 · Aug 15, 2024
References Cited (27)
US 5652859A · Mulla · 1997 [cited by examiner]
US 5893160A · Loewenstein et al. · 1999 [cited by applicant]
US 5897657A · Hagersten et al. · 1999 [cited by applicant]
US 6272604B1 · Nunez · 2001 [cited by examiner]
US 6922756B2 · Hum et al. · 2005 [cited by applicant]
US 7480770B2 · Zeffer et al. · 2009 [cited by applicant]
US 8190820B2 · Thantry et al. · 2012 [cited by applicant]
US 8874855B2 · Conte · 2014 [cited by applicant]
US 9355034B2 · Lepak et al. · 2016 [cited by applicant]
US 11544193B2 · Vash et al. · 2023 [cited by applicant]
US 20030217235A1 · Rowlands · 2003 [cited by applicant]
US 20070055826A1 · Morton et al. · 2007 [cited by applicant]
US 20070130410A1 · Keller · 2007 [cited by examiner]
US 20090177845A1 · Moyer · 2009 [cited by examiner]
US 20100005246A1 · Beers et al. · 2010 [cited by applicant]
US 20110202726A1 · Laycock et al. · 2011 [cited by applicant]
US 20130318308A1 · Jayasimha et al. · 2013 [cited by applicant]
US 20140052916A1 · Lih et al. · 2014 [cited by applicant]
US 20140149686A1 · Blaner et al. · 2014 [cited by applicant]
US 20180322057A1 · Rosenbluth · 2018 [cited by applicant]
US 20190102301A1 · Li · 2019 [cited by examiner]
US 20200167284A1 · Jalal et al. · 2020 [cited by applicant]
US 20210306414A1 · Beard et al. · 2021 [cited by applicant]
Lenoski et al., The Directory-Based Cache Coherence Protocol for the DASH Multiprocessor, Computer Sustems Laboratory, Stanford University, CA 94305, 1990 IEEE12 pages. [cited by applicant]
Raghavan et al., Token Tenure: PATCHing Token Counting Using Directory-Based Cache Coherence, University of Pennsylvania, ScholarlyCommons, Technical Reports CIS, http://repository.upenn.edu/cis_reports/903, http://repo… [cited by applicant]
ISRWO, PCT/US2021049777, mailed Dec. 22, 2021, 12 pages. [cited by applicant]
U.S. Appl. No. 18/160,575, filed Jan. 27, 2023. [cited by applicant]