A method and system for a processor to efficiently accesses a remote First-in First-out (fifo) buffer that is used to record event information. The access involves an interrupt mechanism when the fifo transitions from the empty state, a mechanism for reading a fifo entry including fifo state information, and a mechanism for reading large areas of the fifo while maintaining the pointers and interrupt protocols.
|
1. A method for controllng a computer system having a communication link processor and employing recording mechanisms with a fifo for buffered event entries, comprising the steps of:
controlling descreet events for an asynchronous event recording mechanism by storing discreet events into the fifo at a location determined by an event write pointer; and
causing an attached processor to read the recording mechanism's fifo at a location determined by an event read pointer;
said recording mechanism returning event and status information; and
incrementing the fifo read pointer; and
causing said recording mechanism to store one or more of multiple event entries into main memory of said processor, wherein the said multiple storing of entries from the fifo does not affect the state of the fifo event read pointer or event write pointer.
2. The method as recited in
3. The method as recited in
system status when the fifo is completely empty; and
an event description when the fifo has one or more valid entries.
4. The method as recited in
5. The method as recited in
|
This application is a divisional of U.S. patent application Ser. No. 09/961,011 filed on Sep. 21, 2001, now U.S. Pat. No. 6,775,723 entitled “Efficient Reading of a Remote First In First Out Buffer”, the entirety of which is hereby incorporated herein by reference
The present invention relates generally to buffering events in a computer system in a memory and accessing this memory in way that provides the maximum mount of information with the fewest accesses.
In a computer system, various events are detected by the hardware and must be subsequently handled by a processor. These events include signals received on inbound Input/Output (I/O) interfaces, power and cooling systems alerts, error conditions, and failure conditions. Sometimes these events can happen faster than they can be handled in real time by the processor. To overcome this, a small memory element is typically added to the system to temporarily store the events until they can be handled by the processor. The memory element is often structured as a first-in, first-out (FIFO) buffer in a communication system.
When the processor is physically and logically located at a distance from the FIFO, each access that the processor makes to read the FIFO takes a considerable amount of time. As processors get faster, the number of processor cycles consumed waiting for the returned FIFO data increases. As this problem has been recognized, other related problems have been experience during development. When the FIFO fills with many events, the processor must access the FIFO for each event in the FIFO. Each time an event is put into the FIFO, the system causes an interrupt to the processor. These events cause considerable overhead to the processor since the processor typically makes a context switch to software used to handle the interrupt.
It has been recognized that it would be desireable to present the maximum information to a processor each time it reads the FIFO buffer in a communication system. This invention presents different information depending on the state of the FIFO (its fullness), and the state of the system. The preferred embodiment for a computer system having a communication link processor and employing a FIFO buffer and controling an asynchronous event storing and recording mechanism to write discreet events into the FIFO at a location determined by a write pointer; and then reading with the attached communication link processor reading the recording mechanism's FIFO at a location determined by a read pointer. Then the recording mechanism conditionally returns event and status information and conditionally increments the FIFO read pointer.
In accourdance with the preferred embodiment a fullness indication of the FIFO is returned in the read information as the value of the FIFO read pointer and write pointer. Furthermore, the recording mechanism returns system status when the FIFO is completely empty; and an event description when the FIFO has one or more valid entries.
The preferred embodiment of the invention has a mode where the processor can read multiple entries of the FIFO using a single command. Once again, the format of the returned data is different from the variable information returned by a single FIFO access.
It is another object of the present invention to reduce the number of interrupts presented to the processor by sharing information as to the fullness of the FIFO as observed by the processor and known to the FIFO.
The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, as well as a preferred mode of use, further objectives and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:
Typically, the processor handles multiple recording mechanisms 122 within a system.
The event data 220 includes a description of the event 222 and a time stamp 224 used primarily as a debug tool. Compare circuit 230 compares the write pointer 204 to the read pointer 208. When the two pointers have the same value 232, the FIFO is completely empty. When the pointers differ by exactly one, that is, the write pointer is ahead of the read pointer by exactly 1, or the read pointer+1 equals the write pointer, there is exactly one valid entry 234 in the FIFO. This information 234 is part of the interrupt presentation to the processor and is described below. When the FIFO is completely empty, mupliplexor (MPX) 240 gates the system status 242 back to the processor when the processor reads the FIFO. When the FIFO is not completely empty, the multiplexor 240 gates the event description from the FIFO entry back to the processor. In either case when the FIFO is either completely empty or not completely empty, the value of the write pointer 204, read pointer 208, and interrupt source information 250 is always returned to the processor. The interrupt source information tells the software of any other sources of the interrupt other than FIFO entries. All of this information is read over data path 244 when the processor reads a FIFO entry using its load instructions. The log pointer 260 is loaded from the processor over path 264 when the processor wants the recording mechanism to automatically store one of more FIFO entries directly into the processor's main memory. In this case, data path 246 is used by the recording mechanism, and this path includes different information from data path 244, as described below.
When the processor wants to read multiple entries from the recording mechanism, it first loads the log pointer 260 to the starting location in the FIFO where it wants the recording mechanism to start reading entries. The processor then sends a command to the recording mechanism telling it how many entries to store into the processor's main memory and the starting address in the processor's main memory. The main memory address is on an 8 byte boundary. The recording mechanism starts reading the FIFO entries at the current log pointer address and if it reaches the end of the FIFO array before the entry count of the command is exhausted, it wraps back to the beginning of the FIFO array. In this way, the contents in main memory always progresses from the oldest entry in the FIFO to the newest entry in the FIFO. After the recording mechanism finishes storing the data into the processor's main memory, it sets an indicator in the system status that can be examined by the processor. Also, the recording mechanism can be instructed in the log command to send an interrupt to the processor. After the processor determines that the recording mechanism has finished storing the data into its main memory, it can advance the read pointer to ‘skip over’ the entries that the recording mechanism stored.
The flowchart in
While the preferred embodiment to the invention has been described, it will be understood that those skilled in the art, both now and in the future, may make various improvements and enhancements which fall within the scope of the claims which follow. These claims should be construed to maintain the proper protection for the invention first described.
Gregg, Thomas A., Burrow, Stephen R., Pandey, Kulwant M., Sugrue, Patrick J.
Patent | Priority | Assignee | Title |
Patent | Priority | Assignee | Title |
5708814, | Nov 21 1995 | Microsoft Technology Licensing, LLC | Method and apparatus for reducing the rate of interrupts by generating a single interrupt for a group of events |
5966547, | Jan 10 1997 | AVAGO TECHNOLOGIES GENERAL IP SINGAPORE PTE LTD | System for fast posting to shared queues in multi-processor environments utilizing interrupt state checking |
6269412, | Oct 01 1997 | Round Rock Research, LLC | Apparatus for recording information system events |
20030034797, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Mar 15 2004 | International Business Machines Corporation | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
Sep 23 2008 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Dec 17 2012 | REM: Maintenance Fee Reminder Mailed. |
Apr 18 2013 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Apr 18 2013 | M1555: 7.5 yr surcharge - late pmt w/in 6 mo, Large Entity. |
Dec 09 2016 | REM: Maintenance Fee Reminder Mailed. |
May 03 2017 | EXP: Patent Expired for Failure to Pay Maintenance Fees. |
Date | Maintenance Schedule |
May 03 2008 | 4 years fee payment window open |
Nov 03 2008 | 6 months grace period start (w surcharge) |
May 03 2009 | patent expiry (for year 4) |
May 03 2011 | 2 years to revive unintentionally abandoned end. (for year 4) |
May 03 2012 | 8 years fee payment window open |
Nov 03 2012 | 6 months grace period start (w surcharge) |
May 03 2013 | patent expiry (for year 8) |
May 03 2015 | 2 years to revive unintentionally abandoned end. (for year 8) |
May 03 2016 | 12 years fee payment window open |
Nov 03 2016 | 6 months grace period start (w surcharge) |
May 03 2017 | patent expiry (for year 12) |
May 03 2019 | 2 years to revive unintentionally abandoned end. (for year 12) |