Increased efficiency in a multiple agent system is provided by allowing all explicit writebacks to continue during a snoop phase. Upon each incoming external bus request, an agent determines if the address of that request matches an address of data within the agent. If there is a match, the agent copies this most recent data, changes the state of the data to unmodified, changes the length of the data to zero (for pending explicit writebacks), and performs an implicit writeback. Additionally, prior to each explicit writeback, an agent determines if the address of the explicit writeback and any incoming snoop request requests are the same. If there is a match, the agent changes the data length of the explicit writeback to zero prior to issuing the explicit writeback.
|
7. A method comprising:
determining whether an access to a transaction queue is a hit; determining whether data corresponding to the hit is dirty; and setting a data length attribute of the data to zero if the data corresponding to the hit is dirty.
29. A transaction management method for a processing agent, comprising:
receiving a request for data, the data being identified by an address; determining whether there is a pending write transaction to the address; posting an altered pending write transaction that nullifies the effect of the pending write transaction.
15. A system comprising:
a bus agent to generate a transaction on a bus; and a first processor is to indicate whether a modified data associated with the transaction is stored in a memory, is to drive the modified data onto the bus, and is to alter a buffered write transaction to nullify an effect of the buffered write transaction.
12. An apparatus comprising:
a bus queue; a cache; and control logic is to detect whether a snoop cycle hits a write transaction of a data element cached in a modified state in said bus queue, and if the snoop cycle hits, said control logic is to alter said write transaction to be an altered transaction that excludes said data element.
1. A method comprising:
by a first agent: posting a read transaction identifying requested data by memory location, by a second agent: in response to the read transaction and if the second agent stores a modified copy of the data at the memory location, providing the modified copy, and posting a write transaction identifying the memory location and a zero data length for the write transaction. 20. A system comprising:
a communications bus; a first agent coupled to the communications bus, wherein the first agent is to post a request for data identified by an address on the communications bus; and a second agent coupled to the communications bus is to receive the request, wherein, if the second agent has the data identified by the address in a modified state, the second agent is to alter a data length attribute of a pending write transaction to the address to zero and is to issue the altered write transaction on the communications bus.
2. The method of
4. The method of
5. The method of
6. The method of
8. The method of
posting the zero data length attribute of the data on a communications bus.
9. The method of
if the access to the transaction queue misses the transaction queue, posting an explicit writeback on a communications bus.
10. The method of
if the access to the transaction queue hits the transaction queue, posting an implicit writeback on a communications bus.
11. The method of
changing the state of the data associated with the implicit writeback to unmodified.
13. The apparatus of
14. The apparatus of
16. The system of
17. The system of
18. The system of
19. The system of
21. The system of
a main memory unit coupled to the communications bus is to receive the altered write transaction with the data length attribute of zero and is to ignore the altered write transaction.
22. The system of
23. The system of
24. The system of
25. The system of
26. The system of
a main memory unit coupled to the communications bus to retrieve the posted data from the communications bus and to update an internal copy of the data.
27. The system of
28. The system of
30. The method of
31. The method of
32. The method of
33. The method of
34. The method of
35. The method of
|
This patent application is a continuation application of application Ser. No. 09/323,360, now U.S. Pat. No. 6,434,677, filed Jun. 1, 1999, and entitled "METHOD AND APPARATUS FOR ALTERING DATA LENGTH TO ZERO TO MAINTAIN CACHE COHERENCY".
The present invention relates to an apparatus and method for an improved system of cache coherency in a multiple agent system.
In the electronic arts, a processing system may include a plurality of agents that perform coordinated computing tasks. The agents often share one or more main memory units designed to store addressable data for the use of all agents. The agents communicate with the main memory unit and each other over a communications bus during bus transactions. A typical system is shown in FIG. 1.
In order to improve performance, an agent may include a plurality of tiered internal caches that store and alter data on a temporary basis. In such multiple agent systems, several agents may operate on data from a single address at the same time. Multiple copies of data from a single memory address may be stored in multiple agents. Oftentimes when a first agent must operate on data at an address, a second agent may store a copy of the data that is more current in its internal cache than the copy resident in the main memory unit 40. In order to maintain "cache coherency," the first agent should read the data from the second agent rather than from the main memory unit 40. Without a means to coordinate among agents, an agent may perform a data operation on a copy of data that is stale.
Along with each unit of data, an internal cache may store additional information, which may include the data's address in the main memory unit 50, the length of the data unit, and/or an indicator as to whether the data has been modified by the agent since being retrieved from main memory. This indicator--known as the "state" of the data--may reflect that the data has been modified or unmodified since being retrieved from main memory. Each agent may include cache coherency circuitry that ensures that data in a modified state is eventually returned to the main memory unit 40 via the communications bus 50.
In some agents, modified data may be returned to main memory as part of an "explicit writeback" transaction or as part of an "implicit writeback." In an explicit writeback, an agent generates a bus transaction to write the modified data to external memory in order to make room in the cache for newly requested data. That is, the agent (e.g., 10 in
By contrast, an implicit writeback typically occurs as part of a transaction initiated by another agent. Consider an example where agent 10 stores a copy of data in modified state; the copy in agent 10 is more current than a copy stored in the main memory unit 40. If another agent 20 posts a request on the communications bus 50 and requests the data, an implicit writeback would cause agent 10 to provide the requested data to agent 20 rather than the main memory unit 40.
In an implicit writeback, when agent 20 posts the request each of the other non-requesting agents performs an internal check to determine whether it possesses a modified copy of the data at the requested address in its internal cache system. If a non-requesting agent (agent 10 in the example) does have a modified of the requested data in its internal cache system it so indicates in a cache coherency signal of the transaction. The agent 10 drives the modified data on the external communications bus 50. The requesting agent 20 and the main memory unit 40 may read the data from the communications bus 50.
In almost all circumstances, explicit writebacks and implicit writebacks can proceed concurrently in a multiple agent system without violating cache coherency. Because explicit writebacks and implicit writebacks are not acted upon immediately, but are often placed in a pipeline of operations to be performed at a later time by an agent or a communications bus, a problem in cache coherency can occur in the boundary condition when an agent initiates an implicit writeback for data at a particular address while the agent is in the process of performing an explicit writeback of data from the same address. In this situation, it is possible for the agent to report newly updated data to the main memory unit via the implicit writeback before agent processes the external writeback for the same address. Cache coherency would be violated when the agent then processes the explicit writeback, because the explicit writeback will update memory with a copy of data from a particular address that is not the most current copy.
In the prior art, the solution to this problem was to temporarily halt all explicit writebacks during the time an implicit writeback was being processed. This suspension of all explicit writebacks resulted in a substantial performance loss, given that the probability that an implicit writeback and an explicit writeback involved data from the same address, and thus that cache coherency would actually be compromised, was quite small.
Accordingly, there is a need in the art for a system and method that allows the performance of explicit writebacks to continue during the processing of implicit writebacks while still maintaining cache coherency during the boundary condition where an agent initiates an implicit writeback for data at a particular address while the agent is in the process of performing an explicit writeback of data from the same address.
Embodiments of the present invention provide for a transaction management method for a processing agent in which the agent receives a request for data identified by an address. The agent then determines whether it has in store a pending write transaction to the address and, if so, sets a transaction length associated with the pending write transaction to zero.
The present invention provides for a system and method for allowing explicit writebacks to continue during snoop phases in a multiple agent system. Upon each incoming snoop request, the agent determines if the address of the snoop request matches an address of data within the agent. If there is a match, the agent copies the most recent data, changes the state of the data within the agent to unmodified, and transmits the copied data to the requesting agent and the main memory unit. If the data resides in the external transaction queue, the agent also changes the length of the data to zero. Additionally, prior to issuing each explicit writeback on the communications bus, an agent determines if the address of the explicit writeback and any incoming snoop requests are the same. If there is a match, the agent changes the data length of the explicit writeback to zero before transmitting the explicit writeback to the main memory unit.
In an embodiment, the principles of the present invention may be applied in an agent 10 shown in FIG. 2A and FIG. 2B. As shown in
The internal cache 140 stores data in a plurality of cache entries. It possesses logic responsive to a data request to determine whether the internal cache 140 stores a valid copy of requested data and, if so, it furnishes the requested data in response thereto.
The ITQ 80 receives and stores data requests issued by the agent core 130. It coordinates with the internal cache 140 to determine if the requested data "hits" (can be furnished by) the internal cache 140. If not, if a data request "misses" the internal cache 140, the ITQ 80 forwards the data request to the ETQ 90. The ITQ 80 also coordinates with the internal cache 140 to process explicit writebacks by passing along data with a modified state to the ETQ 90 for eventual updating of the main memory unit 40. Such a process may be accomplished by eviction, wherein data with a modified state is evicted from a lower level of a cache to higher level of a cache. Such an eviction may occur when the lower level of cache is full and space is required for more recent cache entries.
The ETQ 90 interprets data requests and generates external bus transactions to fulfill them. The ETQ 90 is populated by several queue entries. The ETQ 90 manages the agent's transactions as they progress on the external bus 50.
The snoop queue 110 causes cache coherency checks to be performed within the agent. Typically, in response to a new bus transaction issued by another agent, the snoop queue 110 causes the generation of snoop probes to various caches within the agent (such as internal cache 140) and to the ITQ 80 and ETQ 90. It receives responses to the snoop probes and generates snoop responses therefrom. If necessary, the snoop queue 110 manages implicit writebacks of modified data from the agent.
The external bus controller 100 drives signals on the external bus as commanded by the ETQ 90 and snoop queue 110.
As shown in
The control logic 220 may, among other tasks, identify particular data 240 based on the address field 260 of the data. The control logic 220 may obtain this information using content addressable logic ("CAM") 210 in conjunction with the address field 260 and the input 230 from other devices, using a method known in the art. The control logic 220 may also alter the length field of the chosen data to zero in the ETQ 90.
In an embodiment of the present invention, the agent 10 may operate in accordance with the method of FIG. 3 and
As shown in
If the snoop queue 110 finds that there is an address match in a line containing modified data within the agent 10 (Step 2030), the snoop queue 110 proceeds to perform an implicit writeback. Among other operations, the snoop queue copies the data from the appropriate location in the agent 10 if the data is not in the ITQ 80 or ETQ 90 (Step 2040), changes the state of the data in the agent 10 to unmodified (Step 2050), and changes the data length attribute of the data in the agent 10 to a length of zero if the data is in the ITQ 80 or the ETQ 90 (Step 2060). The snoop queue 110 then reports that a match occurred to the requesting agent 20, 30 over the communications bus 40 (Step 2070) and the snoop phase ends for the agent 10 (Step 2100). The snoop queue 110 then transmits the copied data via an implicit writeback (Step 2110). Such a transmission may use the external bus controller 100 to communicate with the other agents 20, 30 and the main memory unit 40 via the communications bus 50.
To insure cache coherency, the snoop queue 110 changes the state of the data in the agent 10 to an unmodified state (Step 2050) and changes the length of the data in the agent 10 to zero if the data is in the ITQ 80 or the ETQ 90 (Step 2060). These measures are necessary if this data is in a section of the agent 10, for example in the ETQ 90, where the data is awaiting to be transmitted to the communications bus 50 via an explicit writeback. It is advantageous for the snoop queue 110 to alter the data in such a way to nullify any effect of such a potential explicit writeback. Because the main memory unit 40 and the other agents 20, 30 will ignore any explicit writebacks with a data length of zero, altering the data length attribute of the data to zero will nullify the effect of an explicit writeback of this data. One advantage of altering the data length to zero is that the ETQ 90 will process this nullified explicit writeback in the same manner as all other transactions. There is no need as in the prior art system to impede the orderly processing of explicit writebacks in order to maintain cache coherency.
As previously discussed, in order to maintain cache coherency while allowing explicit writebacks to continue during snoop phases, it is necessary to nullify the effect of those explicit writebacks of data with the same address as any incoming, but not yet processed, snoop requests. As shown in
If the address of the explicit writeback does not match the address of an incoming snoop request (Step 1040), there is no cache coherency problem and the ETQ 90 completes the explicit writeback in the normal fashion (Steps 1050, 1060). If, however, the address of the explicit writeback matches the address of an incoming snoop request, (Step 1040) the ETQ 90 changes the data length attribute of the data to zero (Step 1070) and then completes the explicit writeback with this altered parameter (Steps 1080, 1060). This will be effective in nullifying the effect of this explicit writeback because the main memory unit 40 and the other agents 20, 30 will ignore any explicit writebacks with a data length of zero. This nullified explicit writeback, however, may proceed in its normal fashion along with other, proper, explicit writebacks. Moreover, the ETQ 90 does not alter the state of the data from its modified state. Accordingly, when the snoop queue 110 later issues the matching snoop request, the snoop queue 110 will find the modified data with the matching address in the ETQ 90 and will perform an implicit writeback using the most recently modified copy of data to update the main memory unit 40, as depicted in FIG. 3.
Accordingly, the present invention allows an agent to continue performing explicit writebacks while concurrently processing snoop requests. The effect of explicit writebacks that would otherwise violate cache coherency is nullified by altering the data length attribute to zero of the offending explicit writeback. It will be appreciated by those skilled in the art that the specific embodiments disclosed above may be readily utilized as a basis for modifying or designing other methods and techniques for carrying out the same purposes of the present invention. It should also be realized by those skilled in the art that such equivalent constructions do not depart from the spirit and scope of the invention as set forth in the following claims.
Hill, David Lawrence, Prudvi, Chinna, Bachand, Derek T., Breuder, Paul D.
Patent | Priority | Assignee | Title |
10580107, | Sep 29 2016 | Intel Corporation | Automatic hardware ZLW insertion for IPU image streams |
6711652, | Jun 21 2001 | International Business Machines Corporation | Non-uniform memory access (NUMA) data processing system that provides precise notification of remote deallocation of modified data |
7472228, | Oct 27 2004 | International Business Machines Corporation | Read-copy update method |
8990510, | Oct 27 2004 | International Business Machines Corporation | Read-copy update system and method |
9983877, | Sep 29 2016 | Intel Corporation | Automatic hardware ZLW insertion for IPU image streams |
Patent | Priority | Assignee | Title |
5623628, | Mar 02 1994 | Intel Corporation | Computer system and method for maintaining memory consistency in a pipelined, non-blocking caching bus request queue |
5737759, | Dec 06 1995 | Intel Corporation | Method and apparatus for maintaining cache coherency in a computer system with a highly pipelined bus and multiple conflicting snoop requests |
5905876, | Dec 16 1996 | Intel Corporation | Queue ordering for memory and I/O transactions in a multiple concurrent transaction computer system |
5914727, | Sep 09 1997 | Hewlett Packard Enterprise Development LP | Valid flag for disabling allocation of accelerated graphics port memory space |
6145062, | Jan 26 1998 | Intel Corporation | Selective conflict write flush |
6195735, | Dec 31 1996 | Texas Instruments Incorporated | Prefetch circuity for prefetching variable size data |
6434677, | Jun 01 1999 | Intel Corporation | Method and apparatus for altering data length to zero to maintain cache coherency |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Jun 26 2002 | Intel Corporation | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
Jun 19 2003 | ASPN: Payor Number Assigned. |
Dec 08 2006 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Dec 03 2010 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Nov 19 2014 | M1553: Payment of Maintenance Fee, 12th Year, Large Entity. |
Date | Maintenance Schedule |
Jun 10 2006 | 4 years fee payment window open |
Dec 10 2006 | 6 months grace period start (w surcharge) |
Jun 10 2007 | patent expiry (for year 4) |
Jun 10 2009 | 2 years to revive unintentionally abandoned end. (for year 4) |
Jun 10 2010 | 8 years fee payment window open |
Dec 10 2010 | 6 months grace period start (w surcharge) |
Jun 10 2011 | patent expiry (for year 8) |
Jun 10 2013 | 2 years to revive unintentionally abandoned end. (for year 8) |
Jun 10 2014 | 12 years fee payment window open |
Dec 10 2014 | 6 months grace period start (w surcharge) |
Jun 10 2015 | patent expiry (for year 12) |
Jun 10 2017 | 2 years to revive unintentionally abandoned end. (for year 12) |