CN105204939B - A kind of processing method of interrupt requests - Google Patents

A kind of processing method of interrupt requests Download PDF

Info

Publication number
CN105204939B
CN105204939B CN201510740141.1A CN201510740141A CN105204939B CN 105204939 B CN105204939 B CN 105204939B CN 201510740141 A CN201510740141 A CN 201510740141A CN 105204939 B CN105204939 B CN 105204939B
Authority
CN
China
Prior art keywords
interrupt requests
system kernel
buffer area
total
interrupt
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510740141.1A
Other languages
Chinese (zh)
Other versions
CN105204939A (en
Inventor
殷雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201510740141.1A priority Critical patent/CN105204939B/en
Publication of CN105204939A publication Critical patent/CN105204939A/en
Application granted granted Critical
Publication of CN105204939B publication Critical patent/CN105204939B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of processing methods of interrupt requests, comprising: when there is continuous multiple pending interrupt requests transmission, multiple interrupt requests are placed in pre-set buffer area by I/O device, and send a total interrupt requests to system kernel;System kernel, by obtaining multiple interrupt requests in buffer area, and transfers data corresponding with multiple interrupt requests according to total interrupt requests to handle it.A kind of processing method of interrupt requests provided by the invention, when there is the transmission of multiple continuous pending interrupt requests, multiple continuous interrupt requests are placed on buffer area, and informing system kernel by a total interrupt requests, it needs buffer area to obtain multiple interrupt requests, i.e., continuous multiple interrupt requests are integrated into the reading of an interrupt requests and buffer area, to greatly reduce the quantity of interrupt requests and the access times of interruption, and then improve system effectiveness and performance.

Description

A kind of processing method of interrupt requests
Technical field
The present invention relates to computer software technical fields, more specifically to a kind of processing method of interrupt requests.
Background technique
In computer software design, interruption is a highly important concept, in modern computer without any exception Interrupt techniques will be used.During executive program, due to there is some event (special circumstances in other words), make It obtains CPU and stops current program, and turn to go to execute the processing routine (being commonly called as interrupt processing or interrupt service routine) for handling the event, It after the processing routine of the event is finished, returns again to breakpoint succession and executes original program, this process is known as interrupting. And during computer executes interrupt service routine, other interruptions can not be reprocessed, it is necessary to interrupt and complete in this time Afterwards, that is, it is finished after the interrupt service routine, just can be carried out other interruptions.
But since system break resource is limited, when the interrupt requests that request is interrupted are more, meeting Because of the finiteness of interrupt resources, cause partial interruption request that longer time may be waited processed;And it interrupts The interruption conflict formed when requesting more is easy the suspend mode of triggering system and deadlock etc..Especially in server and storage equipment High IOPS ((Input/Output Operations Per Second, the number per second being written and read) equipment, such as The case where HBA card such as sonet card, above-mentioned influence system performance, is easier to occur.
In conclusion interrupt requests quantity can be effectively reduced by how providing one kind, asked with improving the interruption of system performance The processing method asked is a problem to be solved by those skilled in the art.
Summary of the invention
The object of the present invention is to provide a kind of processing methods of interrupt requests, to effectively reduce interrupt requests quantity, in turn Improve system performance.
To achieve the goals above, the invention provides the following technical scheme:
A kind of processing method of interrupt requests, comprising:
When there is continuous multiple pending interrupt requests transmission, the multiple interrupt requests are placed in advance by I/O device In the buffer area of setting, and a total interrupt requests are sent to system kernel;
The system kernel, by obtaining the multiple interrupt requests in the buffer area, and is adjusted according to total interrupt requests Take data corresponding with the multiple interrupt requests to handle it.
Preferably, after the system kernel obtains the multiple interrupt requests, further includes:
The system kernel is according to the first call back function carried in total interrupt requests into I/O device transmission Information is completed in disconnected request.
Preferably, after the completion of the system kernel is transferred data corresponding with the multiple interrupt requests and is handled it, Further include:
The system kernel, which is sent according to the second call back function carried in total interrupt requests to the I/O device, appoints Information is completed in business processing.
Preferably, the system kernel obtains multiple interrupt requests in the buffer area, comprising:
The system kernel is by the way of DMA by obtaining the multiple interrupt requests in the buffer area.
Preferably, the system kernel transfers data corresponding with the multiple interrupt requests to handle it, wraps It includes:
The multiple interrupt requests and data corresponding with the multiple interrupt requests that the system kernel will acquire are put into pre- First be arranged task processing queue in, and according to the task processing queue to the corresponding data of the multiple interrupt requests successively It is handled.
Preferably, the I/O device sends total interrupt requests to the system kernel, comprising:
The I/O device sends total interrupt requests to the system kernel, and total interrupt requests carry in described The number of disconnected request, the position of the buffer area, the size of the buffer area and the buffer area service life.
Preferably, after the system kernel receives total interrupt requests, further includes:
The system kernel obtains the interrupt flag carried in total interrupt requests, and is default in the interrupt flag When label, according to total interrupt requests by obtaining the multiple interrupt requests in the buffer area.
The processing method of a kind of interrupt requests provided by the invention, comprising: when in the presence of continuous multiple pending interrupt requests When transmission, the multiple interrupt requests are placed in pre-set buffer area by I/O device, and send one to system kernel Total interrupt requests;The system kernel according to total interrupt requests by obtaining the multiple interrupt requests in the buffer area, And data corresponding with the multiple interrupt requests are transferred to handle it.Compared with prior art, provided by the invention A kind of processing method of interrupt requests, the interrupt resources for breaking the prior art seize the mode used, i.e. I/O device is no longer continuous It is a large amount of to send interrupt requests to occupy interrupt resources, but when there is the transmission of multiple continuous pending interrupt requests, it will be multiple Continuous interrupt requests are placed on buffer area, and it needs to buffer area to obtain by a total interrupt requests informing system kernel Take multiple interrupt requests, that is, continuous multiple interrupt requests are integrated into the reading of an interrupt requests and buffer area, thus significantly Reduce the quantity of interrupt requests and the access times of interruption, greatly reduces the interaction time between I/O device and system kernel Number avoids the feelings such as system sleep or deadlock as caused by interruption conflict being previously mentioned in background technique more to a certain extent The generation of condition, and then improve system effectiveness and performance.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow chart of the processing method of interrupt requests provided in an embodiment of the present invention;
Fig. 2 is the stream handled in a kind of processing method of interrupt requests provided in an embodiment of the present invention interrupt requests Journey schematic diagram.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Referring to Fig. 1, it illustrates a kind of flow chart of the processing method of interrupt requests provided in an embodiment of the present invention, it can With the following steps are included:
S11: when there is continuous multiple pending interrupt requests transmission, multiple interrupt requests are placed in advance by I/O device In the buffer area of setting, and a total interrupt requests are sent to system kernel.
Wherein, I/O device has the function of anticipation, i.e., it can prejudge out the interrupt requests that will be sent, therefore, when its is pre- Sentence out when there are multiple interrupt requests continuous in time that will send, multiple interrupt requests are placed on pre-stored caching In area, and send a total interrupt requests to system kernel, by multiple interrupt requests continuously transmit be changed into one it is total in The transmission of disconnected request, effectively reduces the quantity of interrupt requests.
S12: system kernel, by obtaining multiple interrupt requests in buffer area, and is transferred and multiple interruptions according to total interrupt requests Request corresponding data to handle it.
System kernel determines the relevant information of buffer area according to total interrupt requests, to be asked by obtaining multiple interruptions in buffer area It asks, further completes the processing of data corresponding for multiple interrupt requests.It wherein, may include processing letter in total interrupt requests Number, system kernel complete the acquisition to the corresponding related data of multiple interrupt requests by processing function.
A kind of processing method of interrupt requests provided in an embodiment of the present invention, the interrupt resources for breaking the prior art, which are seized, to be made Mode, i.e. I/O device are no longer continuous to send interrupt requests largely to occupy interrupt resources, but multiple continuous when having When pending interrupt request is sent, multiple continuous interrupt requests are placed on buffer area, and accuse by a total interrupt requests Knowing system kernel, it needs buffer area to obtain multiple interrupt requests, that is, continuous multiple interrupt requests are integrated into an interruption Request and the reading of buffer area greatly reduce IO to greatly reduce the quantity of interrupt requests and the access times of interruption Interaction times between equipment and system kernel, avoid more to a certain extent be previously mentioned in background technique due to interrupt conflict Caused by system sleep or deadlock, and then improve system effectiveness and performance.
A kind of processing method of interrupt requests provided by the above embodiment, system kernel obtain multiple interrupt requests it Afterwards, can also include:
System kernel sends interrupt requests to I/O device according to the first call back function carried in total interrupt requests and completes letter Breath.
System kernel sends interrupt requests to I/O device and completes information after obtaining multiple interrupt requests in buffer area, To inform that this time interrupt requests are completed I/O device, system can discharge interrupt resources at this time, to greatly reduce to being The occupancy of system interrupt resources has advanced optimized system break resource to realize the management for system break resource Service efficiency avoids system because of performance caused by interrupt resources are insufficient or system break resource overuses and function problem Occur, also, due to the release of interrupt resources, it can the effective read or write speed of lifting system under a large pressure.
A kind of processing method of interrupt requests provided by the above embodiment is transferred and multiple interrupt requests pair in system kernel The data answered and after handling it completion, further includes:
System kernel sends task processing to I/O device according to the second call back function carried in total interrupt requests and completes letter Breath.
Since system kernel has informed the I/O device secondary interrupt requests after the multiple interrupt requests for getting buffer area It completes, does not carry out actual treatment also in practice for multiple interrupt requests, therefore, complete multiple interruptions in system kernel processing and ask After seeking corresponding data, also need to send task processing completion information to I/O device according to the second call back function, it is entire to complete It is directed to the treatment process of the secondary interruption.
In addition, system kernel obtains multiple interrupt requests in buffer area, may include:
System kernel is using the mode of DMA (Directional Memory Access, direct memory access) by buffer area It is middle to obtain multiple interrupt requests.
That is, dma mode can be used in the reading of the interrupt requests of buffer area, and then by neatly controlling DMA, Neng Gouti The efficiency of transmission of the interrupt requests in high level cache area, further increases system performance.
It, can be with it should be noted that system kernel transfers data corresponding with multiple interrupt requests to handle it Include:
The multiple interrupt requests and data corresponding with multiple interrupt requests that system kernel will acquire are put into pre-set Task is handled in queue, and is successively handled according to task processing queue the corresponding data of multiple interrupt requests.
After the corresponding data of multiple interrupt requests that system kernel obtains in buffer area, task can be called to handle queue Multiple interrupt requests and the corresponding data of multiple interrupt requests are stored, specifically can be according to the excellent of each interrupt requests First grade is successively handled the data in processing queue, until having handled the corresponding data of all interrupt requests.
A kind of processing method of interrupt requests provided by the above embodiment, I/O device send total interrupt to system kernel and ask It asks, may include:
I/O device sends total interrupt requests to system kernel, and total interrupt requests carry the number of interrupt requests, buffer area Position, the size of buffer area and the service life of buffer area.
Wherein, the position of buffer area can be its IP address, and by the service life of buffer area, it can know in multiple It the term of validity of disconnected request, is timely handled with being made in time to each interrupt requests, guarantees the processing for interrupt requests It smoothly completes.
In addition, can also include: after system kernel receives total interrupt requests
System kernel obtains the interrupt flag carried in total interrupt requests, and when interrupt flag is preset mark, according to Total interrupt requests are by obtaining multiple interrupt requests in buffer area.
It should be noted that in a kind of processing method of interrupt requests provided in an embodiment of the present invention, it can be according to above-mentioned The technical solution that embodiment provides handles interrupt requests, and resource of usually breaking in systems uses when more nervous Technical solution disclosed in above-described embodiment handles interrupt requests, and when system break resource is more idle, can also be with Interrupt requests are handled using the technical solution in background technique, it therefore, can be preparatory with system kernel by I/O device The interrupt flag of setting is realized, when interrupting labeled as default interrupt flag, according to technical side provided by the above embodiment Case handles interrupt requests, when interrupt flag is not preset mark, it is only necessary to according to the technical solution pair in background technique It is handled, and a kind of flexibility of the processing method of interrupt requests provided in an embodiment of the present invention is enhanced.
In a kind of processing method of interrupt requests provided by the above embodiment, the corresponding interrupt requests processing stream of correlation step Journey schematic diagram is as shown in Figure 2, wherein Prepare Buffer (preparing caching) corresponding I/O device will continuous multiple interrupt requests The step of being put into buffer area;Single IRQ (Interrupt Request, interrupt requests) is total interrupt requests, with single IRQ pairs The arrow expression answered is the step of I/O device sends total interrupt requests a to system kernel;Read Buffer (reads caching Area) correspondence system kernel by obtaining multiple interrupt requests in buffer area the step of;Buffer Analysis (caching analysis) is corresponding The step of system kernel is parsed to multiple interrupt requests and transfers corresponding data;It is system that it is corresponding, which to handle request content, The interior process checking the corresponding data of multiple interrupt requests and being handled;And it handles and completes corresponding to be that system kernel processing is completed After the corresponding data of multiple interrupt requests, the step of information is completed in processing is sent to I/O device.
And technical solution disclosed in above-described embodiment is usually to pass through I/O device to register new interruption use to system kernel Mechanism, the i.e. a kind of processing method of interrupt requests disclosed in above-described embodiment are realized.Usually combine FW (Firmware, Firmware) and Driver (driver) completion jointly, specifically: above-mentioned preset mark is arranged by FW and Driver jointly;By FW Apply that the description of interrupt requests being integrated into buffer area when a large amount of interrupt resources, and passes through primary total interrupt requests notice Driver;After total interrupt requests of FW being parsed by Driver, the task queue after parsing is sent into system service program.
The foregoing description of the disclosed embodiments can be realized those skilled in the art or using the present invention.To this A variety of modifications of a little embodiments will be apparent for a person skilled in the art, and the general principles defined herein can Without departing from the spirit or scope of the present invention, to realize in other embodiments.Therefore, the present invention will not be limited It is formed on the embodiments shown herein, and is to fit to consistent with the principles and novel features disclosed in this article widest Range.

Claims (6)

1. a kind of processing method of interrupt requests characterized by comprising
When there is continuous multiple pending interrupt requests transmission, the multiple interrupt requests are placed on and preset by I/O device Buffer area in, and to system kernel send a total interrupt requests;
The system kernel according to total interrupt requests by obtaining the multiple interrupt requests in the buffer area, and transfer with The corresponding data of the multiple interrupt requests are to handle it;
After the system kernel receives total interrupt requests, further includes:
The system kernel obtains the interrupt flag carried in total interrupt requests, and is preset mark in the interrupt flag When, according to total interrupt requests by obtaining the multiple interrupt requests in the buffer area;Wherein, the interrupt flag is pre- Bidding note indicates that the system kernel correspondence system interrupt resources are default tense situation.
2. the method according to claim 1, wherein after the system kernel obtains the multiple interrupt requests, Further include:
The system kernel sends to interrupt and ask according to the first call back function carried in total interrupt requests to the I/O device It asks and completes information.
3. according to the method described in claim 2, it is characterized in that, the system kernel is transferred and the multiple interrupt requests pair The data answered and after the completion of handling it, further includes:
The system kernel is sent at task according to the second call back function carried in total interrupt requests to the I/O device Reason completes information.
4. according to the method described in claim 3, it is characterized in that, the system kernel obtains in multiple in the buffer area Disconnected request, comprising:
The system kernel is by the way of DMA by obtaining the multiple interrupt requests in the buffer area.
5. according to the method described in claim 4, it is characterized in that, the system kernel is transferred and the multiple interrupt requests pair The data answered are to handle it, comprising:
The multiple interrupt requests and data corresponding with the multiple interrupt requests that the system kernel will acquire are put into and set in advance In the task processing queue set, and the corresponding data of the multiple interrupt requests are successively carried out according to task processing queue Processing.
6. according to the method described in claim 5, it is characterized in that, the I/O device to the system kernel send it is described it is total in Disconnected request, comprising:
The I/O device sends total interrupt requests to the system kernel, and total interrupt requests carry the interruption and ask The service life of the position of the number, the buffer area asked, the size of the buffer area and the buffer area.
CN201510740141.1A 2015-11-03 2015-11-03 A kind of processing method of interrupt requests Active CN105204939B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510740141.1A CN105204939B (en) 2015-11-03 2015-11-03 A kind of processing method of interrupt requests

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510740141.1A CN105204939B (en) 2015-11-03 2015-11-03 A kind of processing method of interrupt requests

Publications (2)

Publication Number Publication Date
CN105204939A CN105204939A (en) 2015-12-30
CN105204939B true CN105204939B (en) 2019-02-01

Family

ID=54952635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510740141.1A Active CN105204939B (en) 2015-11-03 2015-11-03 A kind of processing method of interrupt requests

Country Status (1)

Country Link
CN (1) CN105204939B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108153482B (en) * 2016-12-05 2021-09-07 厦门旌存半导体技术有限公司 IO command processing method and medium interface controller

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1215869A (en) * 1997-10-23 1999-05-05 友讯科技股份有限公司 Network interface card capable of decreasing interuption frequency and method therefor
TW200502847A (en) * 2003-07-08 2005-01-16 Benq Corp Control device and method for reducing number of interrupts in a processor
CN1567277A (en) * 2003-07-09 2005-01-19 明基电通股份有限公司 Control device and method for reducing interruption frequency of processor
CN1746873A (en) * 2004-09-10 2006-03-15 明基电通股份有限公司 Method for decreasing processor interruption
CN101158930A (en) * 2007-11-19 2008-04-09 中兴通讯股份有限公司 Method and device for external controlling DMA controller
CN101189588A (en) * 2005-06-01 2008-05-28 索尼株式会社 Method and apparatus for processing information, and program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1215869A (en) * 1997-10-23 1999-05-05 友讯科技股份有限公司 Network interface card capable of decreasing interuption frequency and method therefor
TW200502847A (en) * 2003-07-08 2005-01-16 Benq Corp Control device and method for reducing number of interrupts in a processor
CN1567277A (en) * 2003-07-09 2005-01-19 明基电通股份有限公司 Control device and method for reducing interruption frequency of processor
CN1746873A (en) * 2004-09-10 2006-03-15 明基电通股份有限公司 Method for decreasing processor interruption
CN101189588A (en) * 2005-06-01 2008-05-28 索尼株式会社 Method and apparatus for processing information, and program
CN101158930A (en) * 2007-11-19 2008-04-09 中兴通讯股份有限公司 Method and device for external controlling DMA controller

Also Published As

Publication number Publication date
CN105204939A (en) 2015-12-30

Similar Documents

Publication Publication Date Title
KR102114941B1 (en) Input/output memory map unit and northbridge
US7953915B2 (en) Interrupt dispatching method in multi-core environment and multi-core processor
KR101915198B1 (en) Method and Apparatus for processing the message between processors
CN107046508B (en) Message receiving method and network equipment
JP2007079789A (en) Computer system and event processing method
US20090210583A1 (en) Reserved device access contention reduction
EP1645968A1 (en) Multi-threaded DMA
US9405725B2 (en) Writing message to controller memory space
US8887001B2 (en) Trace data priority selection
TW201237632A (en) Buffer management scheme for a network processor
CN102067083A (en) Lazy handling of end of interrupt messages in a virtualized environment
US20130132960A1 (en) Usb redirection for read transactions
US20120194524A1 (en) Preemptive Context Switching
US20170103031A1 (en) Method for application-aware interrupts management
US8996774B2 (en) Performing emulated message signaled interrupt handling
US8402172B2 (en) Processing an input/output request on a multiprocessor system
US20190303344A1 (en) Virtual channels for hardware acceleration
CN103562895B (en) It is easy to route by selective polymerisation adjacent data cell
DE102012209011A1 (en) System and method for forwarding Fiber Channel input and output data
CN104049955A (en) Multistage cache consistency pipeline processing method and device
US9239804B2 (en) Back-off mechanism for a peripheral page request log
CN105204939B (en) A kind of processing method of interrupt requests
JP5732806B2 (en) Data transfer apparatus and data transfer method
KR101198400B1 (en) Memory management apparatus and method
US20060184948A1 (en) System, method and medium for providing asynchronous input and output with less system calls to and from an operating system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant