The current invention relates generally to data processing systems, and more particularly to systems and methods for providing transaction tracking of cache in a multiple multiprocessor environment.
A multiprocessor environment may include a shared memory including shared lines of cache. Cache is temporary storage for a processor. In such a system, a single line of cache may be used or modified by one processor in the multiprocessor system. A line of cache is a unit of cache containing information that is useful to one or more processors. In the event a second processor desires to use that same line of cache, the possibility exists for contention. Ownership and control of the specific line of cache is preferably managed so that different sets of data for the same line of cache do not appear in different processors at the same time. It is therefore desirable to have a coherent management system for cache in a shared cache multiprocessor environment. The present invention addresses the aforementioned needs and solves them with additional advantages as expressed herein.
An embodiment of the invention includes system controllers which operating to scale up the interconnection between multiple multiprocessor assemblies. Each multiprocessor assembly is resident in a cell which also includes a coherency director. The coherency director includes an intermediate home agent (IHA), an intermediate cache agent (ICA), and a remote directory (RDIR). Tracker functions within the IHA and ICA keep track of cache transactions occurring between cells and queue up responses in the event of conflicts so that the transactions may be retried at a later time.
The foregoing summary, as well as the following detailed description of preferred embodiments, is better understood when read in conjunction with the appended drawings. For the purpose of illustrating the invention, there is shown in the drawings exemplary constructions of the invention; however, the invention is not limited to the specific methods and instrumentalities disclosed. In the drawings:
a is a block diagram of an example shared multiprocessor system (SMS) architecture;
b is a block diagram of an example SMS showing additional cell and socket level detail;
c is a block diagram of an example SMS showing a first part of an example set of communications transactions between cells and sockets for an unshared line of cache;
d is a block diagram of an example SMS showing a second part of an example set of communications transactions between cells and sockets for an unshared line of cache;
e is a block diagram of an example SMS showing a first of three parts of an example set of communications transactions between cells and sockets for a shared line of cache;
f is a block diagram of an example SMS showing a second of three parts of an example set of communications transactions between cells and sockets for a shared line of cache;
g is a block diagram of an example SMS showing a third of three parts of an example set of communications transactions between cells and sockets for a shared line of cache;
Multiprocessor Component Assembly
The sockets A-D 101, 105, 110, and 115 may communicate with one another via communication links 130-135. The communication links are arranged such that any socket may communicate with any other socket over one of the inter-socket links 130-135. Each socket contains at least one cache agent and one home agent. For example, socket A 101 contains cache agent 102 and home agent 103. Sockets B-D 105, 110, and 115 are similarly configured.
In multiprocessor component assembly 100, caching of information useful to one or more of the processor assemblies (socket) A-D is accommodated in a coherent fashion such that the integrity of the information stored in memory 120 is maintained. Coherency in component 100 may be defined as the management of a cache in an environment having multiple processing entities. Cache may be defined as local temporary storage available to a processor. Each processor, while performing its programming tasks, may request and access a line of cache. A cache line is a fixed size of data, useable as a cache, that is accessible and manageable as a unit. For example, a cache line may be some arbitrarily fixed size of bytes of memory. A cache line is the unit size upon which a cache is managed. For example, if the memory 120 is 64 MB in total size and each cache lines is sized to be 64 Bytes, then 64 MB of memory/64 bytes cache line size=1 Meg of different cache lines.
Cache may have multiple states. One convention indicative of multiple cache states is called the MESI system. Here, a line of cache can be one of: modified (M), exclusive (E), shared (S), or invalid (I). Each socket entity in the shared multiprocessor component 100 may have one or more cache lines in each of these different states. Multiple processors (or caching agents) can simultaneous have read-only copies (Shared coherency state) but only one caching agent can have a writable copy (Exclusive or Modified coherency state) at a time.
An exclusive state is indicative of a condition where only one entity, such as a socket, has a particular cache line in a read and write state. No other sockets have concurrent access to this cache line. A modified state is indicative of an exclusive state where the contents of the cache line varies from what is in shared memory 120. Thus, an entity, such as a processor assembly or socket, is the only entity that has the line of cache, but the line of cache is different from the cache that is stored in memory. One reason for the difference is that the entity has modified the content of the cache after it was granted access in exclusive or modified state. The implication here is that if any other entity were to access the same line of cache from memory, the line of cache from memory may not be the freshest data available for that particular cache line. When a node has exclusive access, all other nodes in the system are in the invalid state for that cache line. A node with exclusive access may modify all or part of the cache line or may silently invalidate the cache line. A node with exclusive state will be snooped (searched and queried) when another node attempts to gain any state other than the invalid state.
Another state of cache is known as the modified state. Modified indicates that the cache line is present at a node in a modified state, and that the node guarantees to provide the full cache line of data when snooped. When a node has modified access, all other nodes in the system are in the invalid state with respect to the requested line of cache. A node with modified access may modify all or part of the cache line, but always either writes the whole cache line back to memory to evict it from its cache or provides the whole cache line in a snoop response.
Another mode or state of cache is known as shared. As the name implies, a shared line of cache is cache information that is a read-only copy of the data. In this cache state type, multiple entities may have read this cache line out of shared memory. Additionally, if one node has the cache line shared, it is guaranteed that no other node has the cache line in a state other than shared or invalid. A node with shared state only needs to be snooped when another node is attempting to gain either exclusive or modified access.
An invalid cache line state indicates that the entity does not have the cache line. In this state, another entity could have the cache line. Invalid indicates that the cache line is not present at an entity node. Accordingly, the cache line does not need to be snooped. In a multiprocessor environment, each processor is performing separate functions and has different caching scenarios. A cache line can be invalid, exclusive in one cache, shared by multiple read only processes, and modified and different from what is in memory. In coherent data access, an exclusive or modified cache line can only be owned by one agent. A shared cache line can be owned by more than one agent. Using write consistency, writes from an agent must be observed by all agents in the same order as the order they are written. For example, if agent 1 writes cache line (a) followed by cache line (b), then if another agent 2 observes a new value for (b) then agent 2 must also observe the new value of (a). In a system that has write consistency and coherent data access, it is desirable to have a scalable architecture that allows building very large configurations via distributed coherency controllers each with a directory of ownership.
In component 100 of
If a processor within a socket 101 seeks a line of cache that is not currently resident in the local processor cache, the socket 101 may seek to acquire that line of cache. Initially, the processor request for a line of cache may be received by a home agent 103. The home agent arbitrates cache requests. If for example, there were multiple local cache stores, the home agent would search the local stores of cache to determine if the sought line of cache is present within the socket. If the line of cache is present, the local cache store may be used. However, if the home agent 103 fails to find the line of cache in cache local to the socket 101, then the home agent may request the line of cache from other sources.
The most logical source of a line of cache is the memory 120. However, in a shared multiprocessor environment, one or more of the processor assembly sockets B-D may have the desired line of cache. In this instance, it is important to determine the state of the line of cache so that when the requesting socket (A 101) accesses the memory, it acquires known good cache information. For example, if socket B had the line of cache that socket A were interested in and socket B had updated the cache information, but had not written that new information into memory, socket A would access stale information if it simply accessed the line of cache directly from memory without first checking on its status. Therefore, the status information on the desired line of cache is preferably retrieved first.
In the instance of the
The home agent 103 would process the responses. If the response from each socket indicates an invalid state, then the home agent 103 could access the desired cache line directly from memory 120 because no other socket entity is currently using the line of cache. If the returned results indicate a mixture of shared and invalid states or just all shared states, then the home agent 103 could access the desired cache line directly from memory 120 because the cache line is read only and is readily accessible without interference from other socket entities.
If the home agent 103 receives an indication that the desired lines of cache is exclusive or modified, then the home agent cannot simply access the line of cache from memory 120 if another socket entity has exclusive use of the line of cache or another entity has modified the cache information. If the current cache line is exclusive then depending on the request the owner must downgrade the state to shared or invalid and memory data can then be used. If the current state is modified then the owner also has to downgrade his cache line holding (except for a “read current value” request) and then 1) the data can be forwarded in the modified state to the requester, or 2) the data must be forwarded to the requester and then memory is updated or 3) memory updated and then sent to the requester. In the instance where the requested cache line is exclusively held, the socket entity that indicated the line of cache is exclusive does not need to return the cache line to memory since the memory copy is up to date. The holding agent can then later provide a status to home agent 103 that the line of cache is invalid or shared. The host agent 103 can then access the cache from memory 120 safely. The same basic procedure is also taken with respect to a modified state status return. The modifying socket may write the modified cache line information to memory 120 and return an invalid state to home agent 103. The home agent 103 may then allow access to the line of cache in memory because no other entity has the line of cache in exclusive or modified use and the cache line of information is safe to read from memory 120. Given a request for a line of cache, the cache holding agent can provide the modified cache line directly to the requestor and then downgrade to shared state or the invalid state as required by the snoop request and/or desired by the snooped agent. The requestor then either maintains the modified state or updates memory and retains exclusive, shared, or modified ownership.
One aspect of the multiprocessor component assembly 100 shown in
Scaling Up the Shared Cache Multiprocessor Environment
The architecture of
The coherency directors 260a-d and 270a-d function to expand component assembly 100 in Cell A 205 to be able to communicate with component assembly 100′ in Cell B 206. A coherency director (CD) allows the inter-system exchange of resources, such as cache memory, without the disadvantage of slower access times and single points of failure as mentioned before. A CD is responsible for the management of a lines of cache that extend beyond a cell. In a cell, the system controller, coherency director, remote directory, coherency director are preferably implemented in a combination of hardware, firmware, and software. In one embodiment, the above elements of a cell are each one or more application specific integrated circuits.
In one embodiment of a CD within a cell, when a request is made for a line of cache not within the component assembly 100, then the cache coherency director may contact all other cells and ascertain the status of the line of cache. As mentioned above, although this method is viable, it can slow down the overall system. An improvement can be to include a remote directory into a call, dedicated to the coherency director to act as a lookup for lines a cache.
If a line of cache is checked out to another cell, the requesting cell can inquire about its status via the interconnection between cells 230. In one embodiment, this interconnection is a high speed serial link with a specific protocol termed Unisys® Scalability Protocol (USP). This protocol allows one cell to interrogate another cell as to the status of a cache line.
The IHA 340 of Cell X 310 communicates to the ICA 394 of Cell Y 360 using path 356 via the global cross bar paths in 344 and 394. Likewise, the IHA 390 of Cell Y 360 communicates to the ICA 344 of Cell X 360 using path 355 via the global cross bar paths in 344 and 394. In cell X 310, IHA 340 acts as the intermediate home agent to multiprocessor assembly 330 when the home of the request is not in assembly 330 (i.e. the home is in a remote cell). From a global view point, the ICA of the cell that contains the home of the request is the global home and the IHA is viewed as the global requester. Therefore the IHA issues a request to the home ICA to obtain the desired cache line. The ICA has an RDIR that contains the status of the desired cache line. Depending on the status of the cache line and the type of request the ICA issues global requests to global owners (IHAs) and may issue the request to the local home. Here the ICA acts as a local caching agent that is making a request. The local home will respond to the ICA with data; the global caching agents (IHAs) issue snoop requests to their local domains. The snoop responses are collected and consolidated to a single snoop response which is then sent to the requesting IHA. The requesting agent collects all the (snoop and original) responses, consolidates them (including its local responses) and generates a response to its local requesting agent. Another function of the IHA is to receive global snoop requests, issue local snoop requests, collect local snoop responses, consolidate them, and issue a global snoop response to global requester.
The intermediate home and cache agents of the coherency director allow the scalability of the basic multiprocessor assembly 100 of
An IHA functions to receive all requests to a given cell. A fairness methodology is used to allows multiple request to be dispatched in a predictable manner that gives nearly equal access opportunity between requests. IHAs are used to determine which remote ICA have a cache line by querying the ICAs under its control. IHAs are used to issue USP requests to ICAs. An IHA may use a local directory to keep track of each cache line for each agent it controls.
An ICA functions to receive and execute requests from IHAs. Here too, a fairness methodology allows a fair servicing of all received requests. Another duty of an ICA is the send out snoop messages to remote IHA that respond back to the ICA and eventually the requesting home agent. The ICA receives global requests from a global requesting agent (IHA), performs a lookup in an RDIR and may issue global snoops and local request to the local home. The snoop response goes directly to the global requesting agent (IHA). The ICA gets the local response and sends it to the global requesting agent. The global requesting agent receives all the responses and determines the final response to the local requester. The other function of the ICA is to receive a local snoop request when the home of a request is local. The ICA does a RDIR lookup and may issue global snoop requests to global agents (IHA). The global agents issue local snoop requests as needed, collect the snoop responses, consolidate them into a single response and send it back to the ICA. The ICA collects the snoop responses, consolidates them and issues a snoop response back to the local home. In one embodiment, the ICA can issue a snoop request back to the local requesting agent. In one aspect of the invention, if an IHA requests a status or line of cache information from an ICA, and the ICA has determined that it cannot respond immediately, the ICA can return a retry indication to the requesting IHA. The requesting IHA then knows to resubmit the request after a determined amount of time. In one aspect of the invention, a deli-ticket style of retry response is provided. Here, a retry response may include a number, such as a time indication, wherein the retry may be performed by the IHA when the number is reached.
If the requested cache line is held in local memory (the home is local) then the requesting agent or home agent sends a snoop request directly to the local ICA. If the requested cache line's home is in a remote cell then the original request is sent to the IHA who then sends the request to the remote ICA of the home cell. The ICA contains the access to the RDIR. The Target ICA (the home ICA) determines if the cache line is owned by a caching agent and the status of the ownership via the RDIR. If the owning agent(s) is in a remote cell (or is a global caching agent) then the RDIR contains an entry for that cache line and its coherency state. The local caching agents are the caching agents that are connected directly to the chip's IHAs. If an RDIR miss occurs or if the cache line status is shared then it is inferred that the local caching agents may have ownership. Upon the occurrence of an RDIR miss, then the local caching agents may have shared, exclusive, or modified ownership status as well as a memory copy. In the event of a shared hit, then a local caching agent might have a shared copy; if exclusive or modified hit then no local agent can have a copy. For some combinations of request type and RDIR status, the original request is sent to the local home and snoop request(s) to global caching agents such as a remote IHA(s).
In one aspect of the invention, an ICA may have a remote directory associated with it. This remote directory can store information relating to which IHA has ownership of the cache that it tracks. This is useful because regular home agents do not store information about which remote home agents has a particular line of cache. As a result having access to a remote directory, ICAs become useful to keep track of the status of remote cache lines.
The information in a remote directory includes 2 bits for a state indication; one of invalid, shared, exclusive, or modified. A remote directory also includes 8 bits of IHA identification and 6 bits of caching agent identification information. Thus each remote directory information may be 16 bits along with a starting address of the requested cache line. Shared memory system may also include an 8 bit presence vector information.
In one embodiment, the RDIR may be sized as follows:
Assuming that the size is based on a 16 MB cache per socket and 64 bits of cache line, then 224 MB/26 bits per cache line=218 cache lines per socket=256 K cache lines per socket. Given that there are 4 sockets per cell, then 1 M cache lines per cell.
Shared Microprocessor System
a is a block diagram of a shared multiprocessor system (SMP) 400. In this example, a system is constructed from a set of cells 410a-410d that are connected together via a high-speed data bus 405. Also connected to the bus 405 is a system memory module 420. In alternate embodiments (not shown), high-speed data bus 405 may also be implemented using a set of point-to-point serial connections between modules within each cell 410a-410d, a set of point-to-point serial connections between cells 410a-410d, and a set of connections between cells 410a-410d and system memory module 420.
Within each cell, a set of sockets (socket 0 through socket 3) are present along with system memory and I/O interface modules organized with a system controller. For example, cell 0410a includes socket 0, socket 1, socket 2, and socket 3430a-433a, I/O interface module 434a, and memory module 440a hosted within a system controller. Each cell also contains coherency directors, such as CD 450a-450d that contains intermediate home and caching agents to extend cache sharing between cells. A socket, as in
Memory modules 440a-440d provide data caching memory structures using cache lines along with directory structures and control modules. A cache line used within socket 2432a of cell 0410a may correspond to a copy of a block of data that is stored elsewhere within the address space of the processing system. The cache line may be copied into a processor's cache memory by the memory module 440a when it is needed by a processor of socket 2432a. The same cache line may be discarded when the processor no longer needs the data. Data caching structures may be implemented for systems that use a distributed memory organization in which the address space for the system is divided into memory blocks that are part of the memory modules 440a-440d. Data caching structures may also be implemented for systems that use a centralized memory organization in which the memory's address space corresponds to a large block of centralized memory of a system memory block 420.
The SC 450a and memory module 440a control access to and modification of data within cache lines of its sockets 430a-433a as well as the propagation of any modifications to the contents of a cache line to all other copies of that cache line within the shared multiprocessor system 400. Memory-SC module 440a uses a directory structure (not shown) to maintain information regarding the cache lines currently in used by a particular processor of its sockets. Other SCs and memory modules 440b-440d perform similar functions for their respective sockets 430b-430d.
One of ordinary skill in the art will recognize that additional components, peripheral devices, communications interconnections and similar additional functionality may also be included within shared multiprocessor system 400 without departing from the spirit and scope of the present invention as recited within the attached claims. The embodiments of the invention described herein are implemented as logical operations in a programmable computing system having connections to a distributed network such as the Internet. System 400 can thus serve as either a stand-alone computing environment or as a server-type of networked environment. The logical operations are implemented (1) as a sequence of computer implemented steps running on a computer system and (2) as interconnected machine modules running within the computing system. This implementation is a matter of choice dependent on the performance requirements of the computing system implementing the invention. Accordingly, the logical operations making up the embodiments of the invention described herein are referred to as operations, steps, or modules. It will be recognized by one of ordinary skill in the art that these operations, steps, and modules may be implemented in software, in firmware, in special purpose digital logic, and any combination thereof without deviating from the spirit and scope of the present invention as recited within the claims attached hereto.
b-4g depict the SMS of
In cell 410a′, CD0450a contains IHA 470a, ICA 480a, remote directory 435a. CD0450a also connects to an assembly containing cache agent CA 460a, and socket S0430a which is interconnected to memory 490a. CD1451a contains IHA 471a, ICA 481a, remote directory 435a. CD1451a also connects to an assembly containing cache agent CA 461a, and socket S1431a which is interconnected to memory 491a. CD2452a contains IHA 472a, ICA 482a, remote directory 436a CD1452a also connects to an assembly containing cache agent CA 462a, and socket S2432a which is interconnected to memory 492a. CD2452a contains IHA 472a, ICA 482a, remote directory 437a. CD2452a also connects to an assembly containing cache agent CA 462a, and socket S2432a which is interconnected to memory 492a. CD3453a contains IHA 473a, ICA 483a, remote directory 438a. CD3453a also connects to an assembly containing cache agent CA 463a, and socket S3433a which is interconnected to memory 493a.
In cell 410b′, CD0450b contains IHA 470b, ICA 480b, remote directory 435b. CD0450b also connects to an assembly containing cache agent CA 460b, and socket S0430b which is interconnected to memory 490b. CD1451b contains IHA 471b, ICA 481b, remote directory 435b. CD1451b also connects to an assembly containing cache agent CA 461b, and socket S1431b which is interconnected to memory 491b. CD2452b contains IHA 472b, ICA 482b, remote directory 436b. CD1452b also connects to an assembly containing cache agent CA 462b, and socket S2432b which is interconnected to memory 492b. CD2452b contains IHA 472b, ICA 482b, remote directory 437b. CD2452b also connects to an assembly containing cache agent CA 462b, and socket S2432b which is interconnected to memory 492b. CD3453b contains IHA 473b, ICA 483b, remote directory 438b. CD3453b also connects to an assembly containing cache agent CA 463b, and socket S3433b which is interconnected to memory 493b.
In cell 410c′, CD0450c contains IHA 470c, ICA 480c, remote directory 435c. CD0450c also connects to an assembly containing cache agent CA 460c, and socket S0430c which is interconnected to memory 490c. CD1451c contains IHA 471c, ICA 481c, remote directory 436c. CD1451c also connects to an assembly containing cache agent CA 461c, and socket S1431c which is interconnected to memory 491c. CD2452c contains IHA 472c, ICA 482c, remote directory 437c. CD1452c also connects to an assembly containing cache agent CA 462c, and socket S2432c which is interconnected to memory 492c. CD2452c contains IHA 472c, ICA 482c, remote directory 437c. CD2452c also connects to an assembly containing cache agent CA 462c, and socket S2432c which is interconnected to memory 492c. CD3453c contains IHA 473c, ICA 483c, remote directory 438c. CD3453c also connects to an assembly containing cache agent CA 463c, and socket S3433c which is interconnected to memory 493c.
In cell 410d′, CD0450d contains IHA 470d, ICA 480d, remote directory 435d. CD0450d also connects to an assembly containing cache agent CA 460d, and socket S0430d which is interconnected to memory 490d. CD1451d contains IHA 471d, ICA 481d, remote directory 436d. CD1451d also connects to an assembly containing cache agent CA 461d, and socket S1431d which is interconnected to memory 491d. CD2452d contains IRA 472d, ICA 482d, remote directory 437d. CD1452d also connects to an assembly containing cache agent CA 462d, and socket S2432d which is interconnected to memory 492d. CD2452d contains IHA 472d, ICA 482d, remote directory 437d. CD2452d also connects to an assembly containing cache agent CA 462d, and socket S2432d which is interconnected to memory 492d. CD3453d contains IHA 473d, ICA 483d, remote directory 438d. CD3453d also connects to an assembly containing cache agent CA 463d, and socket S3433d which is interconnected to memory 493d.
In one embodiment of
c and 4d depict a typical communication exchange between cells where a line if cache is requested that has no shared owners. Thus,
In
Referring now to
The transactions 1-7 shown in
e, 4f, and 4g depict typical a typical communication exchange between cells that can result from the request of an exclusive line of cache from the requesting agent CA 460c of
Beginning with
Referring now to
Referring now to
At this point in the transactions, the requesting agent CA 460c in cell 410c′ has received all of the cache line responses from 410a′, 410b′ and cell 410d′. The status of the requested line of cache that was in the other cells is invalidated in those cells because they have given up their copy of the cache line. At this point, it is the responsibility of the requesting agent to sift through the responses from the other cells and select the most current cache line value to use. After all responses are gathered, a completion response is sent via transaction 16 which informs the home cell that there are no more transactions to be expected with regard to the specific line of cache just requested. Then, a next set of new transactions can then be initiated based on a next cache line request from any suitable requesting agent in the
The global request generator 510 is responsible for issuing global requests on behalf of the Coherency Controller (CC) 530. The global request generator 510 issues Unisys Scalability Protocol (USP) requests such as original cache line requests to other cells. The global request generator 510 provides a watch-dog timer that will insure that if it has any messages to send on the request interface, that it eventually transmits them to make forward progress. The global response input handler 515 receives responses from cells. For example, if an original request was sent for a line of cache from another cell in a system, then the global response input handler 515 is the functionality that receives the response from the responding cell. The global response input handler (RSIH) 515 is responsible for collecting all responses associated with a particular outstanding global request that was issued by the CC 530. The RSIH attempts to coalesce the responses and only sends notifications to the CC when a response contains data, or when all the responses have been received for a particular transaction, or when the home or early home response is received and indicates that a potential local snoop may be required. The RSIH also provides a watch-dog timer insures that if it has started receiving a packet from a remote cell, that it will eventually receive all portions of the packet, and hence make forward progress. The global response generator (RSG) 520 is responsible for generating responses back to an agent the requests cache line information. One example of this is the response provide by a RSG in the transmission of responses to snoop requests for lines of cache and for collections of data to be sent to a remote requesting cell. The RSG will provide a watch-dog timer that will insure that if it has any responses to send on the USP response interface, that it eventually sends them to make forward progress. The Global Request Input Handler 525 (RQIH) is responsible for receiving Global USP Snoop Requests from the Global Crossbar Request Interface and passing them to the CC 530. The RQIH also examines and validates the request for basic errors, extracts USP information that needs to be tracked, and converts the request into the format that the CC can use.
The local data response generator 535 (LDRG) is responsible for interfacing the Coherency Controller 530 to the local crossbar switch for the purpose of sending the home data responses to the multiprocessor component assembly (reference
The coherency controller 530 (CC) functions to drive and receive information to and from the global and local interfaces described above. The CC is comprised of a control pipeline and a data pipeline along with state machines that co-ordinates the functionality of an IHA in a shared multiprocessor system (SMS). The CC handles global and local requests for lines of cache as well as global and local responses. Read and write requests are queued and handled to that all transactions into and out of the IHA are addressed even in times of heavy transaction traffic.
Other functional blocks depicted in
The global request controller 640 (GRC) functions to interface to the global original requests from the global cross bar switch 605 to the coherency controller 630 (CC). The GRC implements global retry functions such as the deli counter mechanism. The GRC generates retry responses based on input buffer capability a retry function, and conflicts detected by the CC 630. Original remote cache line requests are received via the global cross bar interface and original responses are also provided back via the GRC 640. The function of the global snoop controller 610 (GSC) is to receive and process snoop requests from the CC 630. These snoop requests are generated for both local and global interfaces The GSC 610 connects to the global cross bar switch interface 605 and the message generator 650 to accommodate snoop requests and responses. The GSC also contains a snoop tracker to identify and resolve conflicts between the multiple global snoop requests and responses transacted by the GSC 610.
The function of the local snoop buffer 645 (LSB) is to interface local snoop requests generated by a multiprocessor component assembly socket via the local cross bar switch. The LSB 645 buffers snoop requests that conflict or need to be ordered with the current requests in the coherency controller 630. The remote directory 620 (RDIR) functions to receive lookup and update requests from the CC 630. Such requests are used to determine the coherency status of local cache lines that are owned remotely. The RDIR generates responses to the cache line status requests back to the CC 630. The coherency controller 630 (CC) functions to process local snoop requests from LSB 645 and generate responses back to the LSB 645. The CC 630 also processes requests from the GRC 640 and generates responses back to the GRC 640. The CC 630 performs lookups to the RDIR 620 to determine the state of coherency in a cache line and compares that against the current entries of a coherency track 635 (CT) to determine if conflicts exist. The CT 635 is useful to identify and prevent deadlocks between transactions on the local and global interfaces. The CC 630 issues requests to the GSC to issue global snoop requests and also issues requests to the message generator (MG) to issue local requests and responses. The message generator 650 (MG) is the primary interface to the local cross bar interface 655 along with the Local Snoop Buffer 645. The function of the MG 650 is to receive and process requests from the CC 630 for both local and global transactions. Local transactions interface directly to the MG 650 via the local cross bar interface 655 and global transactions interface to the global cross bar interface 605 via the GRC 640 or the GSC 610.
In one aspect of the invention, an intermediate caching agent (ICA) receiving a request for a line of cache, checks the remote directory (RDIR) to determine if the requested line of cache is owned by another remote agent. If it is not, then the ICA can respond with an invalid status indicating that the line of cache is available for the requesting intermediate home agent (IHA). If the line of cache is available, the ICA can grant permission to access the line of cache. Once the grant is provided, the ICA updates the remote directory so that future requests by either local agents or remote agents will encounter correct line of cache status. If the line of cache is in use by a remote entity, then a record of that use is stored in the remote directory and is accessible to the ICA.
At the socket, if the socket has modified data in the requested line of cache, then the local data input handler (LDIH) 545 receives the data itself in step 725. In any case the Local Home Input Handler (LHIH) 550 receives the snoop response(s) from the socket which contains status info in response to the snoop request. This status includes the cache state retained by the snooped agent. (E/S/I). At step 730, the requested cache line data is forwarded by the local data input handler 545 to the coherency controller 530. At this point the coherency controller 530 determines if all snoop responses have been received. The coherency controller collects all snoop responses and combines them. The combined snoop response is sent to the “Global Response Generator”, including cache line data if present. The coherency controller 530 then forwards the combined response and the requested line of cache to the global response generator 520 at step 735. The cache line requested is then returned y the global response generator 520 to the requesting IHA in step 740.
At step 825, the global response input handler 515 receives the home response and any snoop responses to snoop requests that were issued by the “home ICA”. There is a field in each snoop response and home response that specifies the number of snoop response to expect. The home response is a combined response from the local agents of the “home ICA”. If the request was for data then the response contains either memory data from the local home or modified data from a local caching agent. At step 830, the global response input handler 515 passes the home response and any snoop responses to the coherency controller and informs the global request generator 510. The coherency controller 530 collects the global responses and local snoop responses (assuming a local snoop broadcast was issued by the local requesting agent). When all the responses have been received the coherency controller determines the “home response” to the local requesting agent. The coherency controller 530 determines whether a “final completion” response needs to be sent to the “home ICA”. The need for a final completion is determined by the “home ICA” in the “home response”. The “final completion” is needed when global snoop requests were needed or when the original request specified a final completion. The final completion includes the new state of the cache line and includes data if either 1) a snoop response (local or global) had modified and the local requesting agent could not accept modified data, or 2) the requesting agent may use the final completion to modify the data after receiving exclusive ownership. When all of the data is collected by the coherency controller, 530, the global request generator 510 clears the request from the tracking data in step 835. The coherency controller 530 then passes the collected data to the local response generator 535 in step 840. Finally, the local response generator 535 sends the response back to the requesting socket in step 845.
At step 925, the global snoop controller logs the request in the snoop tracker 615 and generates and sends the global snoop request via global cross bar switch 605. At step 930, the global snoop controller 610 waits for a snoop response from every agent that was sent a snoop request (such as an IHA). When completed, the global snoop controller 610 sends a combined snoop response to the coherency controller 630. If there are any linked requests in the local snoop buffer 645, then the coherency controller 630 can issue a request to the local snoop buffer 645 to provide the next snoop request in the link. Otherwise, the coherency tracker 635 entry is de-allocated and made available for new snoop requests and original requests. At step 935, the global snoop controller clears the request from the snoop tracker 615 and forwards the response to the coherency controller 630. At step 940, the coherency controller 630 forwards the response to the message generator 650. Finally, the message generator 650 sends the response to the requesting socket at step 945.
At step 1025, the coherency controller 630 sends a request to the message generator 650 and also sends a request to the message generator 650 to send an original request to the local home agent and broadcast a snoop request to the other local caching agents. At step 1030, the message generator 650 sends a snoop request to the local socket via the local cross bar switch 655. At step 1035, the message generator receives cache line data from the responding socket. This received data response may also include a response from the local home domain which includes home agents and caching agents of the “socket”. At step 1040, the message generator 650 send the home response to the global request controller 640. Finally, the global request controller 640 returns the global response to the requesting entity via the global cross bar switch 605.
Unisys® Scalability Protocol
The access or remote calls from a requesting cell is accomplished using the Unisys® Scalability Protocol (USP). This protocol enables the extension of a cache managements system from one processor assembly to multiple processor assemblies. Thus, the USP enables the construction of very large systems having a collectively coherent cache management system. The USP will now be discussed.
The Unisys Scalability Protocol (USP) defines how the cells having multiprocessor assemblies communicate with each other to maintain memory coherency in a large shared multiprocessor system (SMP). The USP may also support non-coherent ordered communication.
The USP features include unordered coherent transactions, multiple outstanding transactions in system agents, the retry of transactions that cannot be fully executed due to resource constraints or conflicts, the treatment of memory as writeback cacheable, and the lack of bus locks.
In one embodiment, the Unisys Scalability Protocol defines a unique request packet as one with a unique combination of the following three fields:
In one embodiment, the USP employs a number of transaction timers to enable detection of errors for the purpose of isolation. The requesting agent provides a transaction timer for each outstanding request. If the transaction is complete prior to the timer expiring, then the timer is cleared. If a timer expires, the expiration indicates a failed transaction. This is potentially a fatal error, as the transaction ID cannot be reused, and the transaction was not successful. Likewise, the home or target agent generally provides a transaction timer for each processed request. If the transaction is complete prior to the timer expiring, then the timer is cleared. If a timer expires, this indicates a failed transaction. This is may be a fatal error, as the transaction ID cannot be reused, and the transaction was not successful. A snooping agent preferentially provides a transaction timer for each processed snoop request. If the snoop completes prior to the timer expiring, then the timer is cleared. If a timer expires, this indicates a failed transaction. This is potentially a fatal error, as the transaction ID cannot be reused, and the transaction was not successful. In one embodiment, the timers may be scaled such that the requesting agent's timer is the longest, the home or target agent's timer is the second longest, and the snooping agent's timer is the least longest.
In one embodiment, the coherent protocol may begin in one of two ways. The first is a request being issued by a GRA (Global Requesting Agent) such as an IHA. The second is a snoop being issued by a GCHA (Global Coherent Home Agent) such as the ICA. The USP assumes all coherent memory to be treated as writeback. Writeback memory allows for a cache line to be kept in a cache at the requesting agent in a modified state. No other coherent attributes are allowed, and it is up to the coherency director to convert any other accesses to be writeback compatible. The coherent requests supported by the USP are provided by the IHA and include the following:
In one embodiment, the expected responses to the above requests include the following:
A requester may receive snoop responses for a request it issued prior to receiving a home response. Preferentially, the requester is able to receive up to 255 response and invalidate responses for a single issued request. This is based on a maximum size system with 256 SC in as many cells where the requester will not receive a snoop from the home, but possibly all other SCs in cells. Each snoop response and the home response may contain a field that specifies the number of expected snoop responses and if a final completion is necessary. If a final completion is necessary, then the number of expected snoop responses must be 1 indicating that another node had the cache line in an exclusive or modified state. A requestor can tell by the home response the types of snoop responses that it should expect. Snoop responses also contain this same information, and the requester normally validates that all responses, both home and snoop, contain the same information.
In one embodiment, the following pseudo code provides the necessary decode to determine the snoop responses to expect.
When a GRA, such as an IHA, receives a snoop request, it preferentially prioritizes servicing of the snoop request and responds to the snoop request in accordance with the snoop request received and the current state of the GRA. A GRA transitions into the state indicated in the snoop response prior to sending the snoop response. For example, if the snoop code is requested and the node is in the exclusive state, the data is written back into memory, rendering it invalid, then an invalid response is sent and the state of the node is set to invalid. In this instance, the node gave up its exclusive ownership of the cache line and made the cache line available for the requesting agent.
In one aspect of the invention, conflicts may arise because two requesters may generate nearly simultaneous requests. In one embodiment, no lock conditions are placed on transactions. Identifiers are placed on transactions such that home agents may resolve conflicts arising from responding agents. By examining the transaction identifiers, the home agent is able to keep track of which response is associated with which request.
Since it is possible to for certain system agents to retry transactions due to conflicts or lack of resources, it is necessary to provide a mechanism to guarantee forward progress for each request and requesting agent in a system. It is the responsibility of the responding agent to guarantee forward progress for each request and requesting agent. If a request is not making forward progress, the responding agent must eventually prevent future requests from being processed until the starved request has made forward progress. Each responding agent that is capable of issuing a retry to a request must guarantee forward progress for all requests.
In one aspect of the invention, the ICA preferably retries a coherent original read request when it either conflicts with another tracker entry or the tracker is full. In one embodiment, the ICA will not retry a coherent original write request. Instead, the ICA will send a convert response to the requester when it conflicts with another tracker entry.
Request Retries
A cache coherent SMP system prevents live locks by guaranteeing the fairness of transactions between multiple requesters. A live lock is the situation in which a transaction under certain circumstances continually gets retried and ceases to make forward progress thus permanently preventing the system or a portion of the system from making forward progress. This present scheme provides a means of preventing live locks by guaranteeing fair access for all transactions. This is achieved by use of a deli counter retry scheme in which a batch processing mechanism is employed to achieve fairness between transactions. It is difficult to provide fair access to requests when retry responses are used to resolve conflicts. Ideally, from a fairness viewpoint, the order of service would normally be determined by the arrival order of the requests. This could be the case if the conflicting requests were queued in the responding agent. However, it is not practical for each responding agent to provide queuing for all possible simultaneous requests within a systems capability. Instead, it is sometimes necessary to compromise, seeking to maximize performance, sometimes at the expense of arrival order fairness, but only to a limited degree.
In a cache coherent SMP system, multiple requests are typically contending for the same resources. These resource contentions are typically due to either the lack of a necessary resource that is required to process a new request or a conflict exists between a current request being processed and the new request. In either case, the system employs the use of a retry response in which a request is instructed to retry the request at a later time. Due to the use of retries for handling conflicts, there exist two types of requests; new requests and retried requests.
A new request is one in which the request was never previously issued. A retry request is the reissuing of a previously issued request that received a retry response indicating the need for the request to be retried at a later time due to a conflict. When a new or retry request encounters a conflict, a retry response is sent back to the requesting agent. The requesting agent preferably then re-issue the request at a later time.
The retry scheme provides two benefits. The first is that the responding agent does not require very large queue structures to hold conflicting requests. The second is that retries allow requesting agents to deal with conflicts that occur when a snoop request is received that conflicts with an outstanding request. The retry response to the outstanding request is an indication to the requesting agent that the snoop request has higher priority than the outstanding request. This provides the necessary ordering between multiple requests for the same address. Otherwise, with out the retry, the requesting agent would be unable to determine whether the received snoop request precedes or follows the pending request.
In one embodiment of the system, it is expected that the Remote ICA (Intermediate Coherency Agent) in the Coherency Director (CD) will be the only agents capable of issuing a retry to a coherent memory request. A special case is one in which a coherent write request conflicts with a current coherent read request. The request order preferably ensures that the snoop request is ordered ahead of the write request. In this case, a special response is sent instead of a retry response. The special response allows the requesting agent to provide the write data as the snoop result; the write request, however, is not resent. The memory update function can either be the responsibility of the recipient of the snoop response or alternately memory may have been updated prior to issuing the special response.
The batch processing mechanism provides fairness in the retry scheme. A batch is a group of requests for which fairness will be provided. Each responding agent will assign all new requests to a batch in request arrival order. Each responding agent will only service requests in a particular batch insuring that all requests in that batch have been processed before servicing the next sequential batch. Alternately, to improve performance the responding agent can allow the processing of requests from two or more consecutive batches. The maximum number of consecutive batches must be less than the maximum number of batches in order to guarantee fairness. Allowing more than one batch to be processed can improve processing performance by eliminating the situations where processing is temporarily stalled waiting for the last request in a batch to be retried by the requester. In the meantime, the responding agent has many resources available but continues to retry all other requests. The processing of multiple batches is preferably limited to consecutive batches and fairness is only guaranteed in the window of sequential requests which is the sum of all requests in all simultaneous consecutive batches. Thus ultimately it is possible for the responding agent to enter a situation where it must retry all requests while waiting for the last request in the first batch of the multiple consecutive batches to be retried by the requester. Until that last request is complete the processing of subsequent batches is prevented, however having multiple consecutive batches reduces the probability of this situation compared to having a single batch. When processing consecutive batches, once the oldest batch has been completely processed, processing may begin on the next sequential batch, thus the consecutive batch mechanism provides a sliding window effect.
In one embodiment, the responding agent assigns each new request a batch number. The responding agent maintains two counters for assigning a batch number. The first counter keeps track of the number of new requests that have been assigned the same batch number. The first counter is incremented for each new request, when this counter reaches a threshold (the number of requests in a batch), the counter is reset and the second counter is incremented. The second counter is simply the batch number, which is assigned to the new request. All new requests cause the first counter to increment even if they do not encounter a conflict. This is required to prevent new requests from continually causing retried requests from making forward progress.
Additionally, the batch processing mechanism may require a new transaction to be retried even though no conflict is currently present in order to enforce fairness. This can occur when the responding agent is currently not processing the new request's assigned batch number. If a new request requires a retry response due to either a conflict or enforcement of batch fairness, the retry response preferably contains the batch number that the request should send with each subsequent attempted retry request until the request has completed successfully. The batch mechanism preferably dictates that the number of batches multiplied by the batch size be greater than all possible simultaneous requests that can be present in the system by at least the number of batches currently being serviced multiplied by the batch size. Additionally, the minimum batch size is preferably a factor in a few system parameters to insure adequate performance. These factors include the number of resources available for handling new requests at the responding agent and the round-trip delay of issuing a retry response and receiving the subsequent retry request. The USP Protocol allows the maximum number of simultaneous requests in the system to be 256 SC IDs×64 Function IDs×256 Transaction IDs=4,194,304 requests. Thus, the request and response packet formats provide for a 12 bit retry batch number, the minimum batch size is calculated as follows:
N requests/batch>4,194,304 requests/4096 batches N>1024 requests
Therefore, the minimum batch size for the present SMP system is 2048 requests. Batch size could vary from batch to batch, however it is typically easier to fix the size of batches for implementation purposes. It is also possible to dynamically change the batch size during operation allowing system performance to be tuned to changes in latency, number of requesters, and other system variables. The responding agent preferably tracks which batches are currently being processed, and it preferably keeps track of the number of requests from each batch that have been processed. Once the oldest batch has been completed (all requests for that batch have been processed), the responding agent may then begin processing the next sequential batch, and disable processing of the completed batch thus freeing up the completed batch number for reallocation to new requests in the future. In alternate implementations where multiple consecutive batches are used to improve system performance, processing may only begin on a new batch when the oldest batch has been finished. If a batch other than the oldest batch has finished processing, the responding agent preferably waits for the oldest batch to complete before starting processing of one or more new batches.
When a responding agent receives a retry request, the batch number contained in the retry request is checked against the current batch numbers being processed by the responding agent. If the retry request's batch number is not currently being processed, the responding agent will retry the request again. The requesting agent must retry the request at a later time with the batch number from the first retry response it had originally received for that request. The responding agent may additionally retry the retry request due to a new or still unresolved conflict. Initially and at other relatively idle times, the responding agent is processing the same batch number that is also currently being allocated to new requests. Thus, these new requests can be immediately processed assuming no conflicts exist.
In one embodiment, the USP utilizes a deli counter mechanism to maintain fairness of original requests. The USP specification allows original requests, both coherent and non-coherent, to be retried at the destination back to the source. The destination guarantees that it will eventually accept the request. This is accomplished with the deli counter technique. The deli counter is includes two parts. The first part is the batch assignment circuit, and the second part is the batch acceptance circuit. The batch assignment circuit is a counter. The USP performance allows for a maximum number of outstanding transactions based on the following three fields: source SC ID[7:0], source function ID[5:0], and source transaction ID[7:0]. This results in a maximum of 222 or approximately 4 M outstanding transactions.
The batch assignment counter is preferably capable of assigning a unique number to each possible outstanding transaction in the system with additional room to prevent reuse of a batch number before that batch has completed. Hence it is 23 bits in size. When a new original request is received, the request is assigned the current number in the counter, and the counter is incremented. Certain original requests are never retried, and hence do not get assigned a number, such as coherent writes. The deli counter enforces only batch fairness. Batch fairness infers that a group of transactions are treated with equal fairness. The USP employs the batch number to be the most significant 12 bits of the batch assignment counter. If a new request is retried, the retry contains the 12 bit batch number. A requester is obligated to issue retry requests with the batch number received in the initial retry response. Retried original requests can be distinguished between new original requests via the batch mode bit in the request packet. The batch acceptance circuit is designed to determine if a new request or retry request should be retried due to fairness.
The batch acceptance circuit considers requests that fall into one of two consecutive batches that are currently being serviced to pass through. If a request's batch number falls outside of the two consecutive batches currently being serviced, the request should immediately be retried for fairness reasons. Each time a packet that falls within the two consecutive batches that are currently being serviced, if the packet is fully accepted and not retried for another reason such as conflict or resource, then a counter is incremented indicating that a packet has been serviced. The batch acceptance circuit maintains two 11 bit counters, one for each batch currently being serviced. Once a request is considered complete to the point where it will not be retried again, the corresponding counter is incremented. Once that counter has rolled over, the batch is considered complete, and the next batch may begin to be serviced. Batches must be serviced in consecutive order, so unless the oldest batch has completed, a new batch may not begin to be serviced until the oldest batch has completed servicing all requests in that batch.
Thus, the two consecutive batches are considered to leap frog each other. In the even the newer batch being serviced completes all requests before the oldest batch being serviced, then the batch acceptance circuit must wait until the oldest batch has serviced all requests before allowing a new batch to be serviced. The ICA applies deli counter fairness to the following requests: RdCur, RdCode, RdData, RdInvOwn, RdInvItoE, MaintRW, MaintRO.
As mentioned above, while exemplary embodiments of the invention have been described in connection with various computing devices, the underlying concepts may be applied to any computing device or system in which it is desirable to implement a multiprocessor cache coherency system. Thus, the methods and systems of the present invention may be applied to a variety of applications and devices. While exemplary names and examples are chosen herein as representative of various choices, these names and examples are not intended to be limiting. One of ordinary skill in the art will appreciate that there are numerous ways of providing hardware and software implementations that achieves the same, similar or equivalent systems and methods achieved by the invention.
As is apparent from the above, all or portions of the various systems, methods, and aspects of the present invention may be embodied in hardware, software, or a combination of both. For example, the elements of a cell may be rendered in an application specific integrated circuit (ASIC) which may include a standard or custom controller running microcode as part of the included firmware.
While the present invention has been described in connection with the preferred embodiments of the various figures, it is to be understood that other similar embodiments may be used or modifications and additions may be made to the described embodiment for performing the same function of the present invention without deviating therefrom. Therefore, the invention should not be limited to any single embodiment, but rather should be construed in breadth and scope in accordance with the appended claims.
This application claims benefit under 35 U.S.C. § 119(e) of provisional U.S. Pat. Ser. Nos. 60/722,092, 60/722,317, 60/722,623, and 60/722,633 all filed on Sep., 30, 2005, the disclosures of which are incorporated herein by reference in their entirely. The following commonly assigned co-pending applications have some subject matter in common with the current application: U.S. application Ser. No. 11/XXX,XXX filed Sep. 29, 2006, entitled “Providing Cache coherency in an Extended Multiple Processor Environment”, attorney docket number TN344, which is incorporated herein by reference in its entirety; U.S. application Ser. No. 11/XXX,XXX filed Sep. 29, 2006, entitled “Preemptive Eviction Of Cache Lines From A Directory”, attorney docket number TN426, which is incorporated herein by reference in its entirety; and U.S. application Ser. No. 11/XXX,XXX filed Sep. 29, 2006, entitled “Dynamic Presence Vector Scaling in a Coherency Directory”, attorney docket number TN422, which is incorporated herein by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
60722092 | Sep 2005 | US | |
60722317 | Sep 2005 | US | |
60722623 | Sep 2005 | US | |
60722633 | Sep 2005 | US |