The present invention is related to the following commonly-owned, co-pending United States patent applications filed on even date herewith, the entire contents and disclosure of each of which is expressly incorporated by reference herein as if fully set forth herein. U.S. patent application Ser. No. (YOR920070268US1 (21189)), for “A SHARED PERFORMANCE MONITOR IN A MULTIPROCESSOR SYSTEM”; U.S. patent application Ser. No. (YOR920070293US1 (21233)), for “OPTIMIZED COLLECTIVES USING A DMA ON A PARALLEL COMPUTER”; U.S. patent application Ser. No. (YOR920070295US1 (21232)), for “DMA SHARED BYTE COUNTERS IN A PARALLEL COMPUTER”; U.S. patent application Ser. No. (YOR920070297US1 (21208)), for “MULTIPLE NODE REMOTE MESSAGING”; U.S. patent application Ser. No. (YOR920070298US1 (21209)), for “A METHOD AND APPARATUS OF PREFETCHING STREAMS OF VARYING PREFETCH DEPTH”; U.S. patent application Ser. No. (YOR920070299US1 (21212)), for “PROGRAMMABLE PARTITIONING FOR HIGH-PERFORMANCE COHERENCE DOMAINS IN A MULTIPROCESSOR SYSTEM”; U.S. patent application Ser. No. (YOR920070300US1 (21211)), for “METHOD AND APPARATUS FOR SINGLE-STEPPING COHERENCE EVENTS IN A MULTIPROCESSOR SYSTEM UNDER SOFTWARE CONTROL”; U.S. patent application Ser. No. (YOR920070301US1 (21210)), for “INSERTION OF COHERENCE EVENTS INTO A MULTIPROCESSOR COHERENCE PROTOCOL”; U.S. patent application Ser. No. (YOR920070302US1 (21216), for “METHOD AND APPARATUS TO DEBUG AN INTEGRATED CIRCUIT CHIP VIA SYNCHRONOUS CLOCK STOP AND SCAN”; U.S. patent application Ser. No. (YOR920070303US1 (21236)), for “DMA ENGINE FOR REPEATING COMMUNICATION PATTERNS”; U.S. patent application Ser. No. (YOR920070304US1 (21239)), for “METHOD AND APPARATUS FOR A CHOOSE-TWO MULTI-QUEUE ARBITER”; U.S. patent application Ser. No. (YOR920070305US1 (21238)), for “METHOD AND APPARATUS FOR EFFICIENTLY TRACKING QUEUE ENTRIES RELATIVE TO A TIMESTAMP”; U.S. patent application Ser. No. (YOR920070307US1 (21245)), for “BAD DATA PACKET CAPTURE DEVICE”; U.S. patent application Ser. No. (YOR920070321US1 (21256)), for “EXTENDED WRITE COMBINING USING A WRITE CONTINUATION HINT FLAG”; U.S. patent application Ser. No. (YOR920070322US1 (21255)), for “A SYSTEM AND METHOD FOR PROGRAMMABLE BANK SELECTION FOR BANKED MEMORY SUBSYSTEMS”; U.S. patent application Ser. No. (YOR920070323US1 (21246)), for “AN ULTRASCALABLE PETAFLOP PARALLEL SUPERCOMPUTER”; U.S. patent application Ser. No. (YOR920070324US1 (21264)), for “SDRAM DDR DATA EYE MONITOR METHOD AND APPARATUS”; U.S. patent application Ser. No. (YOR920070337US1 (21281)), for “A CONFIGURABLE MEMORY SYSTEM AND METHOD FOR PROVIDING ATOMIC COUNTING OPERATIONS IN A MEMORY DEVICE”; U.S. patent application Ser. No. (YOR920070338US1 (21293)), for “ERROR CORRECTING CODE WITH CHIP KILL CAPABILITY AND POWER SAVING ENHANCEMENT”; U.S. patent application Ser. No. YOR920070339US1 (21292)), for “STATIC POWER REDUCTION FOR MIDPOINT-TERMINATED BUSSES”; U.S. patent application Ser. No. (YOR920070340US1 (21295)), for “COMBINED GROUP ECC PROTECTION AND SUBGROUP PARITY PROTECTION”; U.S. patent application Ser. No. (YOR920070355US1 (21299)), for “A MECHANISM TO SUPPORT GENERIC COLLECTIVE COMMUNICATION ACROSS A VARIETY OF PROGRAMMING MODELS”; U.S. patent application Ser. No. (YOR920070356US1 (21263)), for “MESSAGE PASSING WITH A LIMITED NUMBER OF DMA BYTE COUNTERS”; U.S. patent application Ser. No. (YOR920070357US1 (21312)), for “ASYNCRONOUS BROADCAST FOR ORDERED DELIVERY BETWEEN COMPUTE NODES IN A PARALLEL COMPUTING SYSTEM WHERE PACKET HEADER SPACE IS LIMITED”; U.S. patent application Ser. No. (YOR9220070361US1 (21215)), for “HARDWARE PACKET PACING USING A DMA IN A PARALLEL COMPUTER”; and U.S. patent application Ser. No. (YOR920070371US1 (21335)), for “POWER THROTTLING OF COLLECTIONS OF COMPUTING ELEMENTS”.
1. Field of the Invention
The present invention generally relates to multiprocessor systems and, more particularly, to a novel technique for examining coherence request processing in a multiprocessor system.
2. Description of the Prior Art
To achieve high performance computing, multiple individual processors have been interconnected to form multiprocessor computer systems capable of parallel processing. Multiple processors can be placed on a single chip, or several chips—each containing one or several processors, forming so-called “compute nodes”, which interconnect into a multiprocessor computer system.
Processors in a multiprocessor computer system use private cache memories because of their short access time (a cache is local to a processor and provides fast access to data) and to reduce the number of memory requests to the main memory. However, managing caches in a multiprocessor system is complex. Multiple private caches introduce the multi-cache coherency problem (or stale data problem) due to multiple copies of main memory data that can concurrently exist in the caches of the multiprocessor system.
The protocols that maintain the coherence between multiple processors are called cache coherence protocols. Cache coherence protocols track any sharing of data blocks (e.g. lines, block and words) between the processors. For example, MESI is a common coherence protocol where every hardware cache line can be in one of four states: modified (M), exclusive (E), shared (S), or invalid (I). Line states are changed by memory references issued by the processors.
In a coherent multiprocessor system, a memory reference issued by one processor can affect the caches of other processors. For example, when a processor stores to a line, the coherence mechanism must insure that eventually all caches either have the new data or have no data for that line at all. This generally involves inter-processor communication for testing the state of the line in the various caches and changing the state, if necessary. Commonly, such inter-processor communication is conducted by passing packets containing coherence protocol actions and responses between processors.
One group of cache coherence protocols is referred to as snooping. In a snooping cache coherence approach, no centralized system coherence state is kept, but rather each cache keeps the sharing status of data blocks locally. The caches are usually on a shared memory bus, and all cache controllers snoop (monitor) the bus to determine whether they have a copy of the data block requested. A commonly used snooping method is the “write-invalidate” protocol. In this protocol, a processor ensures that it has exclusive access to data before it writes that data. On each write, all processors snoop on the bus and check their caches to see if the address written to is also located in their caches. If so, the data corresponding to this address are invalidated. If two or more processors attempt to write the same data simultaneously, only one of them wins the race, causing the other processors' copies to be invalidated.
When a cache coherence request is not properly handled, which may occur for several reasons, an error is introduced in the system. This error may manifest itself much later in the processing, or not at all. Achieving proper handling of coherence requests in a multiprocessor system is one of the biggest challenges in a multiprocessor design. Designers and programmers employ various techniques called debugging to determine the source or sources of any errors.
Sometimes, in debugging a multiprocessor system, it is advantageous to be able to control coherence traffic by having control over coherence events being transferred between processors to enable easier debugging of a multiprocessor coherence mechanism. In a uniprocessor environment, single-stepping is a widely used approach for debugging uniprocessor systems, used to understand their behavior, and detect errors. For example, U.S. Pat. No. 6,986,026 issued to Roth, et al describes a technique for causing a single processor to process one instruction at a time. Uniprocessor single-stepping is executed by taking an exception after each instruction or by invoking an emulator. Roth's disclosure does not describe techniques for debugging a multiprocessor system, and does not describe how to debug coherence requests.
It is desirable to be able to single-step coherence events transferred between processors in a multiprocessor system. Thus, coherence events which are active at a certain processor cycle in a compute node could be processed in a single-step, allowing for designers and programmers to easily troubleshoot multiprocessor systems.
Having set forth the limitations of the prior art, it is clear that what is required is a technique for monitoring coherence event processing in a multiprocessor system.
It is therefore an object of the present invention to provide a simple technique and method for monitoring the processing of coherence events transferred between processors in cache coherent multiprocessor computer systems.
An aspect of the present invention is to provide an apparatus for monitoring the processing of coherence event signals in a multiprocessor system, said multiprocessor system having a plurality of processors, each processor having a dedicated memory storage device, said processors generating coherence events broadcast to other processors, each said processor having an associated snoop unit comprising: a plurality of multiple coherence ports for receiving said coherence event signals from each processor in said multiprocessor system; a coherence traffic processing unit for processing said coherence event signals and forwarding said processed coherence event signals to said processor to which said snoop unit is attached; a coherence port to processor unit for receiving and transmitting said forwarded coherence event signals from said coherence traffic processing unit to said processor; one or more mode registers programmed to receive one or more bits values that, when set, initiate performing a single-step operation in said multiprocessor system; and one or more single-step registers programmed to receive one or more bit values that, when set, initiate processing of a single coherence event signal in a single-step operation mode.
Another aspect of the present invention is a computer-implemented method for monitoring the processing of coherence events in a multiprocessor system, the method comprising the steps of: clearing the memory of a plurality of step registers disposed in a snoop unit; mapping the step registers into a plurality of memory address space; and determining if a bit value has been written into the step registers, wherein if a bit value has been written into the step registers, the computer-implemented method will proceed in a single-step mode and if no bit value has been written into the step registers, the computer-implemented method will proceed in a normal execution mode, wherein the single-step mode provides for processing of coherence requests to the processor in single steps and the normal execution mode provides for processing of the coherence requests to the processor in the normal course.
According another aspect of the present invention, a processor in a multiprocessor system is presented with only coherence requests active at a certain point in time for debugging purposes. Once these coherence requests are processed, the processing continues after an input from the user or from a program. This is accomplished by adding a programmable single-step register, which, when set, enables processing of exactly one step of coherence traffic.
According to another embodiment of the present invention, the step registers are accessible and programmable by all processors in a multiprocessor subsystem.
According to yet another embodiment of the present invention, writing to the step registers can be performed by an associated processor, by another processor in the multiprocessor system, or a processor external to the multiprocessor system.
The objects, features and advantages of the present invention will become apparent to one skilled in the art, in view of the following detailed description taken in combination with the attached drawings, in which:
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. For the purposes of clarity and simplicity, a detailed description of known functions and configurations incorporated herein will be omitted as it may make the subject matter of the present invention unclear.
The following disclosure clarifies the overall structure of an apparatus for monitoring the behavior of a coherence mechanism by single-stepping coherence events in a multiprocessor system under software control, where a novel snoop unit associated with a processor is described in reference to
Referring now to
To implement the write-invalidate memory coherence protocol, a snoop unit 140a, . . . , 140d is provided for each respective processor core 110a, . . . , 110d in the multiprocessor system 100. For transferring coherence request signals, the preferred embodiment implements a plurality of point-to-point interconnection for coherence traffic 160a, . . . 160d, wherein each processor's associated snoop unit is directly connected with each snoop unit associated with every other processor in the system. It is to be understood that, without departing from the scope of the present invention, in another embodiment, a system bus can be used to interconnect a predetermined number of snoop units, or that a single or multiple ring interconnect can be used, or that a switch can be used, or that both memory and coherence traffic can share the same system interconnect, or that the memory and coherence traffic can be separated, as one skilled in the art will appreciate.
All coherence request signals from a single processor are forwarded to that processor's snoop unit 140a, . . . , 140d by the associated L2 cache 120a, . . . , 120d, which then broadcasts them as invalidation request signals to the remote snoop units of other processors. The snoop unit receives all invalidation request signals for that particular processor from remote snoop units and forwards them to the LI cache within the processor. The snoop unit may optionally include one or more snoop filters that reduce the number of invalidations presented to the processor. A snoop filter is described in U.S. Patent Application Publication No. US2006/0224835A1, issued to Blumrich, et al and entitled “Snoop Filtering System in a Multiprocessor system.”
Referring now to
In operation, the incoming processing logic 220 processes the incoming coherence events received on coherence rev ports 210, and forwards them in a sequential manner to its associated processor as shown in
The snoop unit 200 also includes outgoing processing logic 260 that receives invalidate requests from the L2 cache associated with the snoop unit 200 as shown in
In the preferred embodiment, the outgoing processing logic 260 receives invalidate requests from the L2 cache associated with the snoop unit 200. In another embodiment, the outgoing processing logic receives invalidate requests from the L1 cache associated with the processor and the snoop unit 200.
In the preferred embodiment shown in
Similarly, in the preferred embodiment shown in
As shown in the preferred embodiment in
As known to those skilled in the art, in some circumstances, it might be advantageous to present coherence events to the processor one step at a time, and then to examine the state of some memory elements like registers located in the processor, snoop unit, or anywhere else in the multiprocessor system before continuing with processing of more coherence events. Single-step processing is a widely appreciated and used method of debugging a system in uniprocessor systems to understand if an error is induced by software, applications, or hardware, and to identify that error. Debugging may take place during the system hardware and software development phase, or after the system is incorporated in a product, as a tool for software development. There is no known application of single-stepping coherence protocol processing in multiprocessor systems to examine coherence events.
As mentioned above, with respect to
In a preferred embodiment, for example, the step registers 240 are mapped in the memory address space, and are accessible and programmable by all the processors in the multiprocessor system 100. In another embodiment, the step registers 240 are accessible and programmable by the associated processor 100 only. In yet another embodiment, the step registers 240 are accessible and programmable via a special interface which can be accessed from outside of the multiprocessor system 100. In yet another embodiment, the step registers 240 can be accessed in more than one way, using some combination of the above specified methods, as will be understood by those skilled in the art.
Referring now to
In normal execution mode, the state machine 312 implements a flow-control policy to move coherence events from the incoming processing logic 220 to the snoop input of the processor as fast as possible, without losing any events due to congestion of the processor snoop input. If that port indicates that it can no longer accept snoop requests (e.g. the internal cache is busy performing lookups on behalf of the processor pipeline), then the state machine 312 stops the flow of the data path 314 until the processor indicates that it can accept snoop requests.
Single stepping exploits the existing flow-control mechanism of the state machine. When the bit value of the mode register 322 enables single-step mode, the state machine 312 stops the flow of the data path 314, regardless of whether the processor snoop input is capable of accepting snoop requests. Every time the single-step register 324 is written to, a single snoop request is advanced into the snoop input of the processor, so long as the snoop input is ready to accept the request.
Those skilled in the art will recognize that there are various possible implementations of the step registers 240 shown in
Those skilled in the art will recognize that single-stepping as described in the preferred embodiment, could be applied to any coherence event, not just coherence request signals as described for the preferred embodiment. That is, any message or signal sent between processors on behalf of the coherence protocol could be processed one step at a time as disclosed in the preferred embodiment for the purpose of observing the effect of the message or signal. For example, as shown in
It will now be explained in reference to
If a bit or combination of several bits of the mode control register are set to select the normal execution mode, the control flow proceeds to step 424, and the processing of coherence requests will proceed in a normal execution mode. If, however, a bit or combination of several bits are set to select the single-step mode, the control flow proceeds to step 422 where the coherence request processing will proceed in single-step mode.
Referring now to
Writing into the single-step register 240 causes control to proceed to step 530, where exactly one step of operation is performed, for example, a single coherence event signal is presented to the processor. The control loops back to step 520, waiting for the next write to the single-step register.
If at any step, it is determined that the selected mode of operation is execution mode, the control exits single-step mode, and proceeds in execution mode processing coherence requests as fast as possible.
As will be readily apparent to those skilled in the art, the present invention or aspects of the invention can be realized in hardware, or as some combination of hardware and software. Any kind of computer/server system(s)—or other apparatus adapted for carrying out the methods described herein—is suited. A typical combination of hardware and software could be a general-purpose computer system with a computer program that, when loaded and executed, carries out methods described herein. Alternatively, a specific use computer, containing specialized hardware for carrying out one or more of the functional tasks of the invention, could be utilized.
The present invention or aspects of the invention can also be embodied in a computer program product, which comprises all the respective features enabling the implementation of the methods described herein, and which—when loaded in a computer system—is able to carry out these methods. Computer program, software program, program, or software, in the present context mean any expression, in any language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after either or both of the following: (a) conversion to another language, code or notation; and/or (b) reproduction in a different material form.
While there has been shown and described what is considered to be preferred embodiments of the invention, it will, of course, be understood that various modifications and changes in form or detail could readily be made without departing from the spirit of the invention. It is therefore intended that the scope of the invention not be limited to the exact forms described and illustrated, but should be construed to cover all modifications that may fall within the scope of the appended claims.
The U.S. Government has a paid-up license in this invention and the right in limited circumstances to require the patent owner to license others on reasonable terms as provided for by the terms of Contract. No. B554331 awarded by the Department of Energy.