This invention relates to interrupt processing in a computer.
In interrupt processing in a computer, in order to make a CPU (Central
Processing Unit) respond promptly to an interrupt from a peripheral device, it is required to reduce interrupt processing time from an interrupt generation notification by a peripheral device up to commencement of processing for each interrupt cause by the CPU.
Patent Document 1, for example, discusses a technology to reduce interrupt processing time in an interrupt processing method in which a peripheral device and a CPU are connected via a bus bridge, and notification of generation of an interrupt is performed separately from notification (or read) of an interrupt cause.
In the interrupt processing method of Patent Document 1, the bus bridge receives an interrupt generation notification sent from the peripheral device, and transfers the interrupt generation notification to the CPU. At the same time, the bus bridge reads an interrupt cause from the peripheral device, and stores in the bus bridge the interrupt cause that has been read.
By this arrangement, the CPU can read the interrupt cause from the bus bridge to which the CPU can access faster than to the peripheral device, so that the interrupt processing time can be reduced.
Patent Document 1: JP 2006-236234 A
In the interrupt processing method of Patent Document 1, there is a problem. The problem is that, as shown in
One of the primary objects of the present invention is to solve the above-described problem. The present invention primarily aims to reduce time it takes for the CPU to read the interrupt cause and to reduce interrupt processing time.
An interrupt cause management device according to the present invention includes:
an interrupt generation notification receiving unit that receives an interrupt generation notification sent from a device;
an interrupt cause reading unit that, when the interrupt generation notification is received by the interrupt generation notification receiving unit, reads an interrupt cause from the device that has sent the interrupt generation notification; and an interrupt cause writing unit that writes the interrupt cause read by the interrupt cause reading unit to a memory device to be accessed by a processor device that processes the interrupt generation notification.
According to the present invention, an interrupt cause is read from a device that has sent an interrupt generation notification, and the interrupt cause that has been read is written to a memory device to be accessed by a processor device.
Therefore, the processor device can read the interrupt cause from the memory device which allows fast access, so that interrupt processing time can be reduced.
In this embodiment, description will be directed to a configuration that reduces interrupt processing time in an interrupt processing method in which a peripheral device and a CPU are connected via a bus bridge, and notification of generation of an interrupt is performed separately from notification (or read) of an interrupt cause.
More specifically, in this embodiment, the bus bridge reads an interrupt cause from a peripheral device and writes the interrupt cause to a memory which is an external device allowing fastest access from the CPU. By this arrangement, an amount of time required by the CPU to read the interrupt cause is reduced, thereby reducing the interrupt processing time.
In
A bus bridge 2 transfers the interrupt generation notification and the interrupt cause.
The bus bridge 2 is an example of an interrupt cause management device.
A chipset 3 acts as an intermediary for communications among the bus bridge 2, a CPU 4, and a memory 5.
The CPU 4 which is a processor device receives the interrupt generation notification, reads the interrupt cause, and executes processing for each interrupt cause. The memory device 5 (also to be described as the memory 5) stores the interrupt cause written by the bus bridge 2.
In this interrupt processing system, the CPU 4 has faster access to the memory 5 than to the bus bridge 2.
The CPU 4 and the bus bridge 2 respectively have access to the memory 5.
In
The bus interface circuit 23 is an example of an interrupt generation notification receiving unit.
A bus interface circuit 24 sends to the CPU 4 via the chipset 3 the interrupt generation notification received by the bus interface circuit 23.
The bus interface circuit 24 is an example of an interrupt generation notification sending unit.
When the interrupt generation notification is received by the bus interface circuit 23, an interrupt cause transfer circuit 21 reads an interrupt cause from the peripheral device 1 that has sent the interrupt generation notification.
The interrupt cause transfer circuit 21 is an example of an interrupt cause reading unit.
A bus conversion circuit 22 converts communications between the peripheral device 1 and the chipset 3.
The bus conversion circuit 22 also writes the interrupt cause read by the interrupt cause transfer circuit 21 to the memory 5 to be accessed by the CPU 4.
The bus conversion circuit 22 is an example of an interrupt cause writing unit.
Referring to
First, the peripheral device 1 sends to the bus bridge 2 the interrupt generation notification for notifying generation of an interrupt.
In the bus bridge 2, the bus interface circuit 23 receives the interrupt generation notification, and transfers the received interrupt generation notification to the interrupt cause transfer circuit 21 and the bus conversion circuit 22.
The bus conversion circuit 22 sends the received interrupt generation notification to the CPU 4 via the bus interface circuit 24 and the chipset 3.
Based on the interrupt generation notification, the CPU 4 begins interrupt processing.
On the other hand, upon receiving the interrupt generation notification, the interrupt cause transfer circuit 21 reads an interrupt cause from the peripheral device 1 via the bus interface circuit 23.
The interrupt cause transfer circuit 21 can identify from the interrupt generation notification the peripheral device 1 that has sent the interrupt generation notification.
The received interrupt cause is transferred to the bus conversion circuit 22 by the bus interface circuit 23. The bus conversion circuit 22 writes the interrupt cause to the memory 5 via the bus interface circuit 24 and the chipset 3.
The CPU 4 reads the interrupt cause written to the memory 5 before beginning processing for each interrupt cause.
As shown in
The total time of write time 31 for the bus bridge 2 to write the interrupt cause to the memory 5 and read time 32 for the CPU 4 to read the interrupt cause from the memory 5 is substantially shorter than read time 41 for the CPU of
As described above, the CPU 4 reads the interrupt cause from the memory 5 to which the CPU 4 can access fast. As a result, the interrupt processing time up to commencement of the interrupt processing can be reduced.
Moreover, no modification is required in circuits except for the bus bridge, so that development costs can be kept low.
In this embodiment, the bus bridge that receives an interrupt generation notification and transfers an interrupt cause to the memory has been described, and the interrupt processing system including the bus bridge has been described.
1: peripheral device, 2: bus bridge, 3: chipset, 4: CPU, 5: memory device, 21: interrupt cause transfer circuit, 22: bus conversion circuit, 23: bus interface circuit, 24: bus interface circuit
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/JP10/72479 | 12/14/2010 | WO | 00 | 2/27/2013 |