Embodiments of the present invention relate to schemes to efficiently use processor resources, and more particularly to such schemes in a uniprocessor system.
Processor-based systems are implemented with many different types of architectures. Certain systems are implemented with an architecture based on a peer-to-peer interconnection model, and components of these systems are interconnected via point-to-point interconnects. To enable efficient operation, transactions between different components can be controlled to maintain coherency between at least certain system components.
Some processors operate according to an in-order model, while other processors operate according to an out-of-order execution model. Typically, an out-of-order processor can perform more efficiently than an in-order processor. However, even in out-of-order processors, certain transactions may still be ordered. That is, some ordering rules may dictate that certain transactions take precedence over other transactions. As a result, to maintain memory consistency and coherency, a processor or other resource may be stalled, adversely affecting performance, while waiting for other transactions to complete. This is particularly the case in systems including multiple processors such as multi-socket systems. While such ordering rules may be implemented across different types of system configurations, these rules can adversely affect performance when a system includes only limited resources, for example, a uniprocessor system, although the same consistency and coherency concerns may not exist.
Accordingly, a need exists to improve performance in a uniprocessor system.
Referring now to
System 10 may represent any one of a desired desktop, mobile, server or other platform, in different embodiments. In certain embodiments, interconnections between different components of
The interconnects may provide support for a plurality of virtual channels, often referred to herein as “channels” that together may form one or more virtual networks and associated buffers to communicate data, control and status information between various devices. In one particular embodiment, each interconnect may virtualize a number of channels. For example in one embodiment, a point-to-point interconnect between two devices may include up to at least six such channels, including a home (HOM) channel, a snoop (SNP) channel, a no-data response (NDR) channel, a short message (e.g., request) via a non-coherent standard (NCS) channel, data (e.g., write) via a non-coherent bypass (NCB) channel and a data response (DR) channel, although the scope of the present invention is not so limited.
In other embodiments, additional or different virtual channels may be present in a desired protocol. Further, while discussed herein as being used within a coherent system, it is to be understood that other embodiments may be implemented in a non-coherent system to provide for deadlock-free routing of transactions. In some embodiments, the channels may keep traffic separated through various layers of the system, including, for example, physical, link, and routing layers, such that there are no dependencies.
In such manner, the components of system 10 may coherently interface with each other. System 10 may operate in an out-of-order fashion. That is, all components and channels within system 10 may handle transactions in a random order. By allowing for out-of-order operation, higher performance may be attained. However, out-of-order implementation conflicts with in-order requirements occasionally required, such as for write transactions. Thus embodiments of the present invention may provide for improved handling of certain out-of-order transactions depending upon a given system configuration.
Still referring to
As further shown in
It is to be understood that
In the embodiment of
While the embodiment of
MCH 30 may include a plurality of ports and may realize various functions using a combination of hardware, firmware and software. Such hardware, firmware, and software may be used so that MCH 30 may act as an interface between a coherent portion of the system (e.g., memory 40 and processor 20) and devices coupled thereto such as I/O device 50. In addition, MCH 30 of
Referring now to
In certain implementations of the systems shown in
In various embodiments, the major caching agent may be the processor socket of the system. Furthermore, to aid in effective data processing, the system may implement extensions to a coherency protocol to provide for improved handling of operations within the uniprocessor system. These protocol extensions may effectively handle conflicts within the system by providing a rule that upon a conflict between the processor and another agent of the system, the processor is allowed first access. In accordance with this rule, the processor is able to reach a global observation (GO) point early. Accordingly, the time that a processor is stalled waiting for such a GO point is minimized. In such manner, these protocol extensions for a uniprocessor coherent system thus define an in-order and early GO capability to provide optimum performance. Furthermore, the processor can operate with minimal stalls, while memory consistency and producer/consumer models remain intact. The protocol extensions may be particularly applicable to a series of write transactions from a core of a processor socket.
In various embodiments, a serialization point for transactions may be contained within a processor socket of a system. More specifically, the serialization point may be located directly after a processor pipeline. Alternately, the serialization point may be located at a last level cache (LLC) of the processor socket. As such, when the processor completes an operation, this serialization point is reached and accordingly, the processor can continue forward progress on a next operation.
A system in accordance with an embodiment of the present invention may include multiple virtual channels that couple components or agents together. In various embodiments, these virtual channels all may be implemented as ordered channels. Thus, a processor can be given an early GO point and the order of write transactions can be maintained.
If one transaction is ordered dependent on another transaction occurring in a different virtual channel, the dependent transaction may wait for completion of transaction occurring in the other channel. In such manner, ordering requirements are met. Thus, if an ordered request is dependent on a transaction in another virtual channel, the requester will complete all previously issued requests before granting a GO to a new request. That is, all previously issued requests may first receive a completion (CMP) before a new request is granted a GO signal. For example, a first core may write data along a first channel and then provide a completion indication via a second channel that the data is available (e.g., via writing to a register). Because the information in these two channels may arrive at different times, the requester may thus complete all previously issued requests before giving a GO signal to the new request. In such manner, dependencies are maintained while performance may be sacrificed. However, a second core may be unaffected by this channel change of the first core. That is, early GO signals may still be provided to transactions of the second core even if the first core is stalled pending the channel change.
Because the serialization point is located in the processor socket, an early GO point may be granted to a processor request once the request clears against any currently outstanding requests. The early global observation also indicates that the processor core takes responsibility and provides a guarantee that requests will occur in program order. That is, requests may be admitted whenever they are issued, however program order is still guaranteed. For example, when a conflict occurs, in some instances the conflict may be resolved by sleeping the second request until the first request completes.
Although an early GO signal is given to a processor, a new value of data for an address in conflict is not exposed until a completion (CMP) has occurred. For example, a tracker table may be present within a processor that includes a list of active transactions. Each active tracker entry in the table holds an address of a currently pending access. The entry is valid until after the action is completed. Accordingly, the new data value is not exposed until the active tracker entry indicates that the prior action has completed.
As described above, in various embodiments a processor may be the only major caching agent in a system. Accordingly, the processor does not need to issue any snoop requests to other agents within the system. For example, a processor socket interface does not need to snoop an I/O device, as the device is not a caching agent. By limiting snoop accesses, a minimum memory latency to the processor is provided. However, in other embodiments, other caching agents may be present within a system. In such embodiments a snoop filter may be implemented within the processor to track accesses of other agents within the system. If a snoop filter is completely inclusive, one or more other agents may act to cache data.
In various embodiments, an early GO may allow I/O agents to correctly observe the program order of writes from a given core of a processor socket via any type of read transaction (e.g., coherent or non-coherent). Via an early GO, it may also be guaranteed that the I/O agent observes the processor caching agent program order of writes and allows the writes to be pipelined. In such manner, unnecessary snoops to an I/O agent write cache may be eliminated.
Transactions from the same source that are issued in different message classes or channels may sometimes have guaranteed order. However, packets in different virtual channels cannot be considered to be in ordered channels, and thus ordering may be provided by source serialization. Accordingly, a first transaction completes before a second transaction begins, in an out-of-order implementation. However, within message classes, ordering may be guaranteed. For example, for a HOM channel, a sending agent's ordered write requests are delivered into a link layer in order of issue. Further, link/physical layers may maintain strict order of all HOM requests and snoop responses, regardless of address. Furthermore, the HOM agent commits and completes processor caching agent writes in the order received. Similar ordering requirements may be present for other channels.
In embodiments in which an integrated memory configuration is present (e.g., an embodiment such as
In various embodiments, the processor caching agent may be the issuer of early GO signals. Accordingly, the snoop filter may be located in the processor caching agent. In some embodiments, the snoop filter may be a circular buffer with a depth equal to or greater than an I/O agent's write cache. Thus, an I/O agent may not hold more cache lines in a modified (M) state than the depth of the snoop filter. In other embodiments, a snoop filter may be located in a HOM agent, and the HOM agent updates the snoop filter based on certain requests. In still other embodiments, the snoop filter may be updated by a receiver as messages are issued out of a receive flit buffer.
When a core cacheable transaction misses in the snoop filter, an early GO is issued to the corresponding core request. Furthermore, in some embodiments the HOM agent may be notified of an implied invalid response from an I/O agent. When instead a core cacheable transaction hits in the snoop filter, a corresponding snoop is issued to the appropriate I/O agent, and an early GO is not issued to the corresponding core request.
A core can assume an exclusive (E) state ownership at the point an early GO is received for request for ownership (RFO) stores, in that an uncacheable (UC) store is guaranteed to complete and may be observed in order of program issue.
In a uniprocessor configuration, conflict resolution rules may specify that the processor agent requests always wins an E-state access on all HOM conflicts. However, the HOM agent may enforce a use-once resolution in the conflict case to regain the E-state and data before ending a transaction flow by sending a completion, giving the I/O agent final ownership.
In various embodiments, write transactions from non-processor agents to memory may be atomic. In such manner, a system may ensure that the correct memory value is written to memory. For example, with reference to system 10 of
Referring now to
The controller, whether implemented within the processor socket or elsewhere within a system, may include logic to handle ordering of transactions in accordance with a given protocol. For example, in one embodiment a controller may include logic to implement rules to handle ordering based upon the protocol. In addition, the controller may further include logic to handle extensions to a given protocol. For example, in various embodiments the controller may include logic to handle special rules for conflict resolution and/or to permit early GO signals within a uniprocessor system. Accordingly, when a processor socket is implemented within a system, the controller may be programmed to handle such extensions if it is implemented in a uniprocessor system. For example, during configuration of a system that includes a processor socket in accordance with an embodiment of the present invention, one or more routines within the controller may be executed to query other components of the system and perform an initialization process. Based on the results of the process, the controller may configure itself for operation in a uniprocessor or multiprocessor mode.
Still referring to
If instead at diamond 220 it is determined that a conflict exists (e.g., by indication of a processor hit for the snoop request), control passes to block 240. There, the conflict may be resolved in favor of the processor (block 240). For example, the I/O device's request may be put to sleep until the processor transaction is completed. Then at block 250 the processor transaction may be performed and completed. After completion of the processor request, the desired I/O device transaction, namely the write transaction, may occur and the data is written from the I/O device to memory (block 260).
With reference back to system 100 of
In the case of a cacheable read transaction, I/O device 140 may issue a read code (RdCode) to processor 110. Such a transaction does not cause a state change of a cacheline within processor 110.
Referring now to
First it may be determined whether there is a channel change (diamond 320). For example, it may be determined whether the current request is sent on the same channel as the previous transaction (e.g., a write transaction on the NCB channel). In some implementations, such cannel changes may occur infrequently. If it is determined that the channels have changed at diamond 320, this is an indication that the transaction's ordering cannot be guaranteed while providing an early GO signal. Accordingly, control passes to block 330. There, the current transaction may be held until the core's previous write completions occur (block 330). Upon such completion(s), a GO signal may be issued to the processor (block 340). Control next passes to block 390, discussed below.
If instead at diamond 320 it is determined that there is no channel change, control passes to diamond 350. It may then be determined whether there is a hit in a snoop filter (diamond 350). If so, method 300 may execute an invalidation flow in accordance with a standard protocol. That is, when a snoop hit occurs, the special rules described herein for a uniprocessor system do not apply, and standard rules for handling an invalidation flow may be performed. Accordingly, control passes to block 360. There, a snoop may be issued and an early GO signal is withheld from the processor (block 360). Next, data may be written to the depth of a buffer, such as a tracker table (block 365). Then, upon receipt of the snoop response, the GO signal may be issued to processor (block 370). Control next passes to block 390, discussed below.
If instead at diamond 350 it is determined that there is a miss in the snoop filter, control passes to block 380. There, the GO signal is sent to the processor (block 380). This GO signal, sent when there is a miss in the snoop filter, is an early GO signal as there is no need to wait for previous transactions to complete or to issue snoops to any other components within the system. Accordingly, the processor can assume that its write transaction is complete, even if the data has not been exposed. When a GO signal is issued, a next processing operation can begin (block 385). More specifically, upon receipt of a GO signal the core may issue a next dependent transaction. Furthermore, in parallel with issuance of a next dependent transaction, the prior write transaction may be completed and resources accordingly may be released (block 390). Because the program order is guaranteed for this write transaction, the actual completion of the write transaction may thus occur after the GO signal is sent.
Thus in various embodiments, because it is known that a given system is in a uniprocessor configuration and may contain only a single major caching agent, extensions to a protocol, e.g., a coherency protocol may be implemented. In such manner, the processor may perform operations more efficiently, with reduced stalls and other wait states. Furthermore, by moving the GO point as close as possible to one or more cores of the processor, such cores can have more continuous operation. That is, the cores need not wait for transactions to commit before moving onto a next operation. Instead, only if dependent or ordered writes or other such transactions occur, do one or more cores wait for a commit signal before further performing new operations.
Referring now to
As further shown in
Embodiments may be implemented in a computer program. As such, these embodiments may be stored on a medium having stored thereon instructions which can be used to program a system to perform the embodiments. The storage medium may include, but is not limited to, any type of disk including floppy disks, optical disks, compact disk read-only memories (CD-ROMs), compact disk rewritables (CD-RWs), and magneto-optical disks, semiconductor devices such as read only memories (ROMs), random access memories (RAMs) such as dynamic RAMs (DRAMs) and static RAMs (SRAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), flash memories, magnetic or optical cards, or any type of media suitable for storing or transmitting electronic instructions. Similarly, embodiments may be implemented as software modules executed by a programmable control device, such as a general-purpose processor or a custom designed state machine.
While the present invention has been described with respect to a limited number of embodiments, those skilled in the art will appreciate numerous modifications and variations therefrom. It is intended that the appended claims cover all such modifications and variations as fall within the true spirit and scope of this present invention.