TW200839522A - Method for dynamically arranging interrupt pins - Google Patents

Method for dynamically arranging interrupt pins Download PDF

Info

Publication number
TW200839522A
TW200839522A TW96111247A TW96111247A TW200839522A TW 200839522 A TW200839522 A TW 200839522A TW 96111247 A TW96111247 A TW 96111247A TW 96111247 A TW96111247 A TW 96111247A TW 200839522 A TW200839522 A TW 200839522A
Authority
TW
Taiwan
Prior art keywords
interrupt
path
pins
paths
interrupt pins
Prior art date
Application number
TW96111247A
Other languages
Chinese (zh)
Other versions
TWI325537B (en
Inventor
Ying-Chih Lu
Original Assignee
Inventec Corp
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 Inventec Corp filed Critical Inventec Corp
Priority to TW96111247A priority Critical patent/TWI325537B/en
Publication of TW200839522A publication Critical patent/TW200839522A/en
Application granted granted Critical
Publication of TWI325537B publication Critical patent/TWI325537B/en

Links

Landscapes

  • Bus Control (AREA)

Abstract

A method for dynamically arranging interrupt pins is provided. The present method is used for arranging a plurality of interrupt pins of a control chip. In the present method, a number of interrupts sent from each of a plurality of device paths in a unit time is detected. These device paths are sorted according to the interrupt numbers thereof. Then, from the one in the head of the sequence, the devices paths are arranged to the interrupt pins. Herein, when arranging a device path, an interrupt checking number required to check the device path sending the interrupt every time an interrupt is produced in each interrupt pin is calculated. Then, when arranging the next device path, the device path is arranged to the interrupt pin with least interrupt checking number.

Description

200839522 IFDUVUUIUTW 23276twf.doc/n 九、發明說明: 【發明所屬之技術領域】 本發明是有關於一種佈線(Routing)方法,士 e 有關於一種動態分配中斷接腳的方法。 且将別疋 【先前技術】 中斷請求(Intermp ReqUest,IRQ )是在某 、 o i) 行特定的動作時,用以通知並要求處理器暫停工=置要進 行對應的計算動作。此中斷請求的發送是透‘所浐二= 線來,行’而這些中斷線的數目又會因主機板採二 控制器而有所不同。傳統的電腦採用可程式化中斷控 (Programmable Interrupt Controller,PIC),其包括有丨欠的 斷線。然而’這些中斷線對於功能曰漸強大、輪入 備推陳出新的電腦設備來說仍是太少,大部分的中^線ς 會被佔用,甚至必須多個硬體裝置一起共用。據此,;_些 新的主機板縣用了先進可程式化巾斷控彻(杨_二d 朽ogrammable Interrupt Ccmtmllei·,APIC) ’ 此種中斷控制器 就可以管理-般為24個情請求(例如内建於咖ich: 及ESB2系列之l〇APIC,但其中有些又為訊息訊號中斷 (Message Signal lnterrupt)所用),而能夠提供數目較多的 硬體裝置使用,也比較不會有中斷線共用的情形。 若使用PIC的主機板,通常在實際上只有4個中斷線 可供PCI匯流排使用;另一方面,若是使用APIC的新主 機板,則有8個中斷線可用。這表示即便主機板上有6個 PCI插槽,它們也必須勉強使用4或8個IRQ。此外,圖 5 200839522 IFUU/uuiurw 23276twf.doc/n 形加速埠(Accelerated Graphics Port,AGP )、通用序列匯 流排(Universal Serial Bus,USB )、獨立磁盤冗餘陣列 (Redundant Array of Independent Disks,RAID )控制器及 '~ 些板載區域網路(Local Area Network,LAN )介面、1394 介面及SATA (Serial ΑΤΑ)介面也都要用IRQ。在這種情況 下,多個PCI插槽共用一個IRQ的情況是無法避免的。 圖1所繪示為習知PIC/IOAPIC主機板之硬體配置 f) 圖。請參照圖1,習知的nc主機板係配置有中央處理單 元110、北橋晶片120、南橋晶片130及4個PCI插槽140、 150、160 及 170。其中,PCI 插槽 140、150、160 及 170 會分別傳送4個中斷訊息(interrUpt message ) INTA/INTB/INTC/INTD給北橋晶片120上的中斷佈線暫 存器(Interrupt routing register) Rx—A、Rx B、Rx C 及200839522 IFDUVUUIUTW 23276twf.doc/n IX. Description of the Invention: [Technical Field] The present invention relates to a routing method, and relates to a method for dynamically allocating interrupt pins. [Prior Art] Intermp ReqUest (IRQ) is used to notify and request the processor to suspend work = set to perform the corresponding calculation action when a certain action is performed. The transmission of this interrupt request is through the "two lines, the line", and the number of these lines will be different depending on the motherboard controller. Traditional computers use the Programmable Interrupt Controller (PIC), which includes broken wires. However, these interrupt lines are still too small for the function of the computer, and most of the computer equipment will be occupied, and even multiple hardware devices must be shared. According to this,; _ some new motherboards with advanced programmable towel off control (Yang _ 2 d imaginary morphmable Interrupt Ccmtmllei, APIC) 'This interrupt controller can be managed - like 24 requests (For example, built in café: and ESB2 series l〇APIC, but some of them are used for Message Signal lnterrupt), but can provide a larger number of hardware devices, and there will be less The situation in which the disconnection is shared. If a PIC motherboard is used, usually only four interrupt lines are available for the PCI bus; on the other hand, if the APIC's new host board is used, there are 8 interrupt lines available. This means that even if there are 6 PCI slots on the motherboard, they must barely use 4 or 8 IRQs. In addition, Figure 5 200839522 IFUU/uuiurw 23276twf.doc/Accelerated Graphics Port (AGP), Universal Serial Bus (USB), Redundant Array of Independent Disks (RAID) IRQ is also required for controllers and '~ some Local Area Network (LAN) interfaces, 1394 interfaces, and SATA (Serial) interfaces. In this case, the case where multiple PCI slots share an IRQ is unavoidable. Figure 1 shows the hardware configuration of the conventional PIC/IOAPIC motherboard f). Referring to FIG. 1, a conventional nc motherboard is provided with a central processing unit 110, a north bridge wafer 120, a south bridge wafer 130, and four PCI slots 140, 150, 160, and 170. Among them, PCI slots 140, 150, 160 and 170 respectively transmit 4 interrupt messages (interrUpt message) INTA/INTB/INTC/INTD to the interrupt routing register Rx-A on the north bridge chip 120. Rx B, Rx C and

Rx一D (x=l,2,3,4)。而由於nC的主機板僅支援4個irq, 因此北橋晶片120實際在傳送中斷訊息給南橋晶片i3〇 時,PCI插槽140、150、160及170是共用4條中斷線來 發出中斷亂息。南橋晶片130則是藉由4個中斷路由暫存 器(Interrupt router register) RA、RB、RC 及 RD 分別接 收由北橋曰曰片120傳送而來的中斷訊息。這些中斷訊息接 著會被送至一個可程式化中斷控制器(8259 pic),而由 8259 PIC向中央處理單元ho提出中斷請求。值得一提的 疋,習知的IOAPIC主機板則是比pjc主機板多出一個先 進可程式化中斷控制器(I0Anc),而藉由8259 ioapic向中央處理單元no提出中斷請求。 6Rx-D (x=l, 2, 3, 4). Since the nC motherboard only supports 4 irqs, when the north bridge chip 120 actually transmits an interrupt message to the south bridge chip i3, the PCI slots 140, 150, 160, and 170 share four interrupt lines to issue an interrupt. . The south bridge chip 130 receives the interrupt message transmitted by the north bridge chip 120 by four interrupt router registers RA, RB, RC and RD, respectively. These interrupt messages are then sent to a programmable interrupt controller (8259 pic), and the 8259 PIC makes an interrupt request to the central processing unit ho. It is worth mentioning that the conventional IOAPIC motherboard has an advanced programmable interrupt controller (I0Anc) than the pjc motherboard, and the 8259 ioapic requests interrupts to the central processing unit no. 6

圖2所繪示為習知中斷接腳的佈線配置表。請夂昭 2,其中每個PCI插槽的接腳A、B、C、〇係對二‘二; 的中斷訊息iNTA/iNTB/mTC/mTD,而基本輸入輪出系统 (Basic Input/Output System,BIOS)在執行開機自我測試 (Power-On Self Test,POST )時也會對應不同的中訊: INTAANTBANTC/mTD,配置所使用/共用的中斷請求了 舉例來說,插槽#2的接腳A、B、C、D係對映到中&訊息 INTD/INTA/INTB/INTC,因此在配置中斷請求時,也是^ 照順序,在對應的中斷佈線暫存器R2_a、R2_B、R2 C oFIG. 2 is a diagram showing a wiring configuration table of a conventional interrupt pin. Please see Zhao 2, in which each PCI slot pin A, B, C, 〇 is two 'two; interrupt message iNTA/iNTB/mTC/mTD, and the basic input/output system (Basic Input/Output System) , BIOS) will also correspond to different intercoms when performing Power-On Self Test (POST): INTAANTBANTC/mTD, configure the interrupt request used/shared. For example, the pin of slot #2 A, B, C, and D are mapped to the medium & INTD/INTA/INTB/INTC. Therefore, when configuring the interrupt request, it is also in the order, in the corresponding interrupt wiring registers R2_a, R2_B, R2 C o

不均的情況’因此習知技術仍舊不是最佳的分配方式 【發明内容】 200839522 IFDU/UUIUTW 23276twf.doc/n 及R2JD中儲存數字4小2、3以便分別對I〇 Apic之中 斷接腳1、2、3觸發中斷請求。 —假若上述4個PCI插槽皆各插上一張ρα介面卡,而 且每個PCI介面卡皆需要用從中斷接腳i、2、3、4分別 觸發(trigger) 4個中斷時,則每個I〇Apic中斷線上共用 的硬體裝置數目均為4,而這4條情線上所需串接的硬 體驅動私式也都是4支。由此可知,在此情況下,每個 IOAPIC巾崎被共㈣情形均相同,已是最佳化的情形。 上述的方法是基於配置在每個pc]^^槽上之pci裝置 叙出中斷的頻率相差不大的情況下來配置PCI插槽,然 而,在實際的應用上,每個不同的ρα裝置在單位時間内 發出中斷的次數均不相同,即某^ρα裝置㈣繁忙,而 某些PCI裝置則相對空閒。此躲仍會造成情接腳分配 7 oUneven situation 'so the conventional technology is still not the best distribution method [invention content] 200839522 IFDU/UUIUTW 23276twf.doc/n and R2JD store the number 4 small 2, 3 in order to separate the I pin Apic pin 1 , 2, 3 trigger interrupt request. - If each of the four PCI slots is plugged into a ρα interface card, and each PCI interface card needs to trigger four interrupts from the interrupt pins i, 2, 3, and 4 respectively, then each The number of hardware devices shared by the I〇Apic interrupt line is 4, and the hardware drivers for serial connection in these 4 lines are also 4 pieces. It can be seen from this that in this case, each IOAPIC towel is uniformly the same (four), and it is optimized. The above method is to configure the PCI slot based on the fact that the frequency of the pci device configured on each pc]^^ slot is not much different, however, in practical applications, each different ρα device is in the unit. The number of interrupts issued during the time is different, that is, a certain device (4) is busy, and some PCI devices are relatively idle. This hiding still causes emotional pin assignments 7 o

G 200839522 IPD070U10 TW 23276twf. doc/n 有鑑於此,本發明的目的就是在提供一種 斷接腳的方法,依據各個中斷接腳上發生中斷的頻^^ 配裝置路徑,以減少每次發生中斷時,判斷是 ς 動程式發出所需的檢查次數。 … 為達上述或其他目的,本發明提出一種動 ::::適於分配-控制晶片的多個中斷接腳,此方 法t括下列步驟:首先,偵測單位時間内在多個裝置靜 =生之情次數,接著則根據各個裝置路徑上發生之; 數’對這些裝置路徑進行财,然後再 綠 的裝置路徑開始,依序將這些裝 ,在月j 二’以使各個中斷接腳上每產生—: 中斷之衫路徑所需之情檢查次數為最低。4出此 =本發明之一實施例中’將該些裝置路徑分配至該些 =腳的步驟包括依據各個裝置路徑之 ;個中斷接腳上每產生-個中斷時,檢查發m 先斷檢查次數’而在分配下-個裝置路徑時, 置路徑後,各個中斷接腳上入此裳 需之中斷檢查次數’最後才選擇將此裝 置路^配至中斷檢查次數最少之中斷接腳。 ^發明之—實施例中’檢查發出中斷之裝置路 的方式是透過對應各個裝置路徑上所配 置之硬體裝置的驅動程式來檢查。 8 200839522 IFDU7UUWTW 23276twf.d〇c/n 數的步驟包括針對分配至各個中斷接腳上的裝^路徑建^ -個順序,射最新加人巾斷獅 ^ 然後再軸各_置路歡巾斷:= 重’亚將計算結果相加轉得帽檢查次數。 腳l· 月之t施例中,在將裳置路徑分配至中斷接 张卜之後,更包括依照上述之順序串接各個裝置路 位S己置之硬縣置的㈣程式,這些硬體裝置包括介 面卡。 在本發明之一實施例中,偵測單位時間内在多個裝置 路徑上發生之中斷次數的方式是透過對應各個裝置路徑上 所配置之硬體裝置的驅動程式來偵測,而這些裝置路徑及 八對應之中所—人數則接著被記錄在記憶體中。此記憶體包 括非揮發性_存取記憶體(NGn_VGlatile RandGm Ac⑽G 200839522 IPD070U10 TW 23276twf. doc/n In view of the above, it is an object of the present invention to provide a method of disconnecting a pin according to the path of the frequency interrupting device on each interrupt pin to reduce the occurrence of each interrupt. , to determine the number of checks required by the program. For the above or other purposes, the present invention provides a motion:::: a plurality of interrupt pins adapted to be allocated-controlled, the method t includes the following steps: First, detecting a plurality of devices in a unit time is static The number of times, then according to the path of each device; the number 'for these device paths to make money, and then the green device path begins, in order to install these, in the month j two 'to each of the interrupt pins on each Generated —: The number of checks required to interrupt the shirt path is the lowest. 4 out of this = in one embodiment of the present invention, the steps of assigning the device paths to the = feet include: according to the path of each device; each time an interrupt is generated on an interrupt pin, the check is performed. The number of times 'when the next device path is assigned, after the path is set, the number of interrupt checks required for each of the interrupt pins is selected. Finally, the device is configured to match the interrupt pin with the least number of interrupt checks. ^Inventive - In the embodiment, the manner in which the interrupted device path is checked is checked by a driver corresponding to the hardware device configured on each device path. 8 200839522 IFDU7UUWTW 23276twf.d〇c/n The number of steps includes the order of the installation path assigned to each interrupt pin, the latest addition of the towel to the lion ^ and then the axis _ set the road := Heavy 'Sub-calculation results are added to the number of cap inspections. In the case of the foot l· month t, after the distribution of the skirting path to the interrupted access, the program includes the (four) program of the hard county set in the order of the above devices. Includes interface card. In an embodiment of the present invention, the manner of detecting the number of interruptions occurring on a plurality of device paths per unit time is detected by a driver corresponding to the hardware device configured on each device path, and the device paths and Among the eight correspondences, the number of people is then recorded in the memory. This memory includes non-volatile_access memory (NGn_VGlatile RandGm Ac(10)

Memory,NVRAM )。 在本發明之一實施例中,上述之中斷接腳包括連接至 了程式化中㈣1控制态(pr〇grammabie恤抓叩t c〇ntr〇ner, pic)及輸入輸出先進可程式化中斷控制器(I/〇AdvancedMemory, NVRAM). In an embodiment of the present invention, the interrupt pin includes a connection to a (4) 1 control state (pr〇grammabie shirt tc〇ntr〇ner, pic) and an input and output advanced programmable interrupt controller ( I/〇Advanced

Programmable Interrupt Controller, 10APIC)其中之一,而 上述之控制晶片則包括北橋晶片及南橋晶片其中之一。 在本發明之一實施例中,根據各個裝置路徑上發生之 中斷次數,對裝置路徑進行排序的方式包括由大至小排序。 200839522 IPDUIOOWTW 23276twfdoc/n 斤本發明採用以每個硬體裝置產生 計算各個中斷接腳上發生中斷的頻率,以動〜'、、土礎, ^_雜,並依料_路^=力1 城夕在母一人發生中斷時,判 發出所需的檢查次數。 I亀動私式 為讓本發明之上述和其他目的、料;Φ 明如下。 I口所附圖式,作詳細說 【實施方式】 y讓中斷接腳的分配能夠達到最佳化 法疋在BI0S執行開機自我測試的過程中,即碰月= 個裝置路徑發出中斷的次數,控制 = ,而使付母支情接聊上可能產生之 ί:=縮減在每次發生中斷時,找尋是由何驅動程式 瞭’以下_實_作林刺竹能_以實施的^月 接腳ΐ 3是依照本發明之一實施例所緣示的動態分配中斷 =的方法流程®。請參 3,本實_適於分配一個 :制晶片的多個中斷接腳,此控制晶片例如是北橋晶片或 ^南橋晶片,而這些中斷接腳則例如是連接至可程式化中 斷控制器(Programmable Interrupt Controller,pIC)或是輸 ^輸出先進可程式化中斷控制器(I/0 Adva=二One of the Programmable Interrupt Controllers, 10APIC), and the control chip described above includes one of a Northbridge wafer and a Southbridge wafer. In one embodiment of the invention, the manner in which the device paths are ordered is ordered from large to small, depending on the number of interruptions occurring on each device path. 200839522 IPDUIOOWTW 23276twfdoc/n jin This invention uses each hardware device to calculate the frequency of interruptions on each interrupt pin to move ~', earth foundation, ^_heterogeneous, and according to the material_路^=力1城On the eve of the interruption of the mother, the number of inspections required was issued. The above and other objects and materials of the present invention are as follows. The port of the I port is described in detail. [Embodiment] y allows the allocation of the interrupt pin to be optimized. In the process of performing the self-test in the BI0S, that is, the number of times the device has issued an interrupt, Control =, and make the mother-in-law hang on the ί:= reduction in every time an interruption occurs, the driver is looking for the following 'the following _ real _ for the forest thorn bamboo can _ to implement the ^ month The pedal 3 is a method flow® of dynamically assigning an interrupt = according to an embodiment of the present invention. Please refer to 3, the actual _ is suitable for allocating one: a plurality of interrupt pins of the wafer, the control chip is, for example, a north bridge chip or a south bridge chip, and the interrupt pins are, for example, connected to the programmable interrupt controller ( Programmable Interrupt Controller, pIC) or output and output advanced programmable interrupt controller (I/0 Adva=2

Programmable Interrupt Controller, IOAI>IC )。 200839522 irjJU/uuiufW 23276twf.doc/n 首先’在一單位時間内,彳貞測多個裝置路經上所發生 之中斷次數(步驟S310)。此中斷次數是透過各個裝置路 徑上所配置之硬體裝置的驅動程式(driver)而取得,驅動 程式將會統計在此單位時間内,由其所發出之中斷的次 數,而將其所對應之PCI裝置/功能位址(PCI device/function address,PFA)、裝置路徑(廣義的裝置路 徑包含PCI裝置/功能位址)及中斷次數等資料回報給作業 糸統’並由作業糸統搜集所有驅動程式回報的資料後,匯 整為一個中斷發生記錄表存放於系統的記憶體中。其中, 上述之硬體裝置例如是介面卡,而記憶體則例如是一個非 揮發性隨機存取記憶體(Non-Volatile Random Access Memory,NVRAM),而不限制其範圍。圖4是依照本發 明之一貝施例所、纟會示的中斷發生記錄表。請參照圖4,其 中弟一欄係記載裝置路徑(Device Path,DP),而第二搁 則記載了各個裝置路徑所對應產生的中斷次數。 接著,根據上述各個裝置路徑上發生之中斷次數,對 ‘ 這些裝置路徑進行排序(步驟S320)。其中,排序的方式 例如是採用由大至小排序,以便於後續安排中斷接腳之 用。圖5是依照本發明之一實施例所繪示的排序後的中斷 發生記錄表。如圖5所示,在所有裝置路徑中,發生中斷 -人數最多的即為DP3的500次;而最少的則為DP〇的1〇 次。 最後,即可由排序在前的裝置路徑開始,依序將各個 裝置路徑分配至中斷接腳上以使各個中斷接腳在每產生一 11 200839522 ljt^uu/uuiurw 23276twf.doc/n 個^斷時,檢查發出中斷之裂置路徑所需之中斷檢查次數 為最低1此步驟包括先依據先前記錄之裝置路徑的中斷次 數,計算各個中斷接腳上在每次產生中斷時,用來檢查是 哪-個裝置路徑發出中斷所需花費的中斷檢查次數(步驟 S330),並以各個中斷接腳目前計算出的中斷檢查次數為 基礎在刀配下-個裝置路經時,先將此裝置路徑力口入各 個中,接腳,並分別計算加入此裝置路經後,各個中斷接 〇 腳上每產生一個中斷時,檢查發出中斷之裝置路徑所需之 中斷,查次數(步驟S340),最後才選擇將裝置路徑分配 至^斷檢查次數最少的中斷接腳上(步驟S350)。接著, 判畊疋否所有的裝置路徑皆已分配完畢(步驟S360)。若 ,分配完畢,則重新返回步驟S330,繼續計算目前各個中 辦接腳心查中所所需的中斷檢查次數,並分配下一個裝置 路桎,反之,若所有裝置路徑皆已分配完畢,就結束本實 施例之動態分配中斷接腳的步驟。 ^ 士 =得一提的是,本實施例在計算上述之中斷檢查次數 犄,還包括針對分配至各個中斷接腳上的裝置路徑建立一 個順序’而此順序可經由先進架構電源介面(AdvancedProgrammable Interrupt Controller, IOAI>IC). 200839522 irjJU/uuiufW 23276twf.doc/n First, the number of interruptions occurring on a plurality of device paths is measured in one unit time (step S310). The number of interrupts is obtained by the driver of the hardware device configured on each device path, and the driver will count the number of interrupts issued by the driver during the unit time, and the corresponding number is interrupted. PCI device/function address (PFA), device path (generalized device path including PCI device/function address), and number of interrupts are returned to the operating system' and all drivers are collected by the operating system. After the data returned by the program, the summary is recorded as an interrupt occurrence record in the memory of the system. The hardware device is, for example, an interface card, and the memory is, for example, a Non-Volatile Random Access Memory (NVRAM), without limiting its scope. Fig. 4 is a table showing an interrupt occurrence record in accordance with one embodiment of the present invention. Referring to Fig. 4, the first section describes the device path (DP), and the second section describes the number of interrupts generated by the respective device paths. Next, the "device paths" are sorted based on the number of interruptions occurring on the respective device paths (step S320). Among them, the sorting method is, for example, sorting from large to small, so as to facilitate the subsequent arrangement of the interrupt pin. FIG. 5 is a sorted interrupt occurrence record table according to an embodiment of the invention. As shown in Figure 5, in all device paths, an interruption occurs - the highest number of people is 500 times of DP3; and the least is 1〇 of DP〇. Finally, it is possible to start by sorting the preceding device path, and sequentially assign each device path to the interrupt pin so that each interrupt pin generates a each time 11 200839522 ljt^uu/uuiurw 23276twf.doc/n Check the number of interrupt checks required to issue the interrupted split path to a minimum of 1 This step involves first calculating the each interrupt pin on each interrupt pin to check which one is based on the number of interrupts of the previously recorded device path. The number of interrupt checks required for the device path to issue an interrupt (step S330), and based on the number of interrupt checks currently calculated by each interrupt pin, when the device is equipped with a device path, the device path is first inserted into the device path. In each of the pins, and after calculating the path of joining the device, each time an interrupt is generated on each interrupt pin, the interrupt required for the device path for interrupting is checked, the number of times is checked (step S340), and finally the selection is made. The device path is assigned to the interrupt pin with the least number of inspections (step S350). Next, it is determined whether all the device paths have been allocated (step S360). If the allocation is completed, then returning to step S330, continue to calculate the number of interruption checks required in each of the current internal check pins, and assign the next device path. Otherwise, if all the device paths have been allocated, the process ends. The step of dynamically allocating interrupt pins in this embodiment. ^ 士 = It is to be noted that this embodiment calculates the number of interrupt checks described above, and also includes establishing a sequence for the device paths assigned to the respective interrupt pins. This sequence can be via the advanced architecture power interface (Advanced)

Configuration and Power Interface,ACPI)所訂定之先進架 =電源”面源語言(ACpIS〇urceLanguage,asl)碼回報 給系統’而用來串接各個裝置路徑上所配置之硬體裝置的 /式以減少到時要檢查中斷是由哪一個驅動程式發 出時所需花費的中斷檢查次數。 12 200839522 iPDOVOUlUfW 23276twf.doc/n 其中’上树iL順序的作法是將最 的裝置路鋪序錢,而在 ;次加入 個裝置路徑之情次數乘上查遽4,即將各 乘積相加,而獲得最終的中斷檢查次數。&置路傻的 舉例來說’假設目前系統的中斷接腳共有4隹 據圖5所繪示的中斷發生記錄表 又而依 中斷接腳上。起初4隻中斷接腳皆未細壬:Γ置:這些 因此很自然地將财在前4崎置路徑路侵’ 中斷接腳上’此時各個中斷接腳上配置置=這4隻 個’所以在計算各個情接腳的情檢查絲 各個裝置路徑的情次數作為中斷檢查 斷接腳的中斷檢查次數如下·· 此蛉各個中Configuration and Power Interface (ACPI) specifies the advanced rack = power "face source language (ACpIS 〇 urceLanguage, asl) code is returned to the system" and is used to cascade the hardware devices configured on each device path to reduce At that time, check the number of interrupt checks that are required when the driver is issued. 12 200839522 iPDOVOUlUfW 23276twf.doc/n The procedure of 'the tree iL order is to put the most device roads in order, and in; Multiply the number of times of adding a device path by multiplying the query 4, that is, adding the products to obtain the final number of interrupt checks. & For example, it is assumed that 'the current system interrupt pin has 4 maps. The interrupt occurrence record table shown in 5 is based on the interrupt pin. At first, the four interrupt pins are not detailed: Γ: These are naturally natural ways to invade the front 4 At the time, 'there are 4 sets of each interrupt pin', so the number of times of each device path is calculated as the interrupt check. The number of interrupt checks is as follows. One in

Checkcount[l]-500Checkcount[l]-500

Checkcount[2]=130Checkcount[2]=130

Checkcount[3]=l〇〇Checkcount[3]=l〇〇

Checkcount[4]=70 在上,些中斷接腳中,又以第4隻中斷接腳的中斷 檢—次數最少。據此,下一步則是將裝置路徑優先分 配到第4隻中斷接腳上’並重新計算第4隻中斷接腳的中 斷檢查次數。計算的步驟包括先將最新加入之裝置路徑 DP7所對應的驅動程式排序在裝置路徑Dp5之前,再計算 第4隻中斷接腳的中斷檢查次數,而在分配完裝置路徑 DP5後,各個中斷接腳之總中斷檢查次數如下: Checkcount[ 1 ]=5 00 13 200839522 jjtjl/u /uwiuTW 23276twf.doc/nCheckcount[4]=70 On the other interrupt pins, the interrupt detection of the 4th interrupt pin is the least. Accordingly, the next step is to prioritize the device path to the 4th interrupt pin and recalculate the number of interrupt checks for the 4th interrupt pin. The calculation step includes first sorting the driver corresponding to the newly added device path DP7 before the device path Dp5, and then calculating the number of interrupt checks of the fourth interrupt pin, and after allocating the device path DP5, each interrupt pin The total number of interrupt checks is as follows: Checkcount[ 1 ]=5 00 13 200839522 jjtjl/u /uwiuTW 23276twf.doc/n

Checkcount[2]=130Checkcount[2]=130

Checkcount[3]=l 〇〇Checkcount[3]=l 〇〇

Checkcount[4]=70+60*2=190 其中,由於裝置路徑DP7排序在後,若中 路徑DP7發㈣’财際在檢查中岐的者發出時衣合 先檢查排序在前的裝置路徑DP5,若檢查後發現中斷不^ 由裝置路徑DP5發出時,才會再去檢查是否是由裝置路徑 〇 DP7發出。因此,實際在計算中斷檢查次數時,必須把檢 查裝置路徑DP7所需花費的中斷檢查次數7〇次加上檢查 裝置路徑DP5所需花費的中斷檢查次數6〇+6〇次,而得到 總中斷檢查次數190次的結果。 根據上述原理,在分配下一個裝置路徑Dp#時,則可 运擇分配到目鈾中斷檢查次數最少(1〇〇次)的第3隻中 畊接腳,並計异第3隻中斷接腳的中斷檢查次數,而在分 配完裝置路徑DP4後,各個中斷接腳之總中斷檢查次數如 下: ’ Checkcount [ 1 ]=5 00Checkcount[4]=70+60*2=190 Among them, since the device path DP7 is sorted after, if the middle path DP7 sends (4) 'the money is checked in the check, the device first checks the sorted device path DP5 first. If it is found that the interruption is not issued by the device path DP5, it will be checked again whether it is issued by the device path 〇DP7. Therefore, in actual calculation of the number of interruption inspections, it is necessary to add the number of interruption inspections required to inspect the apparatus path DP7 7 times to the number of interruption inspections required to inspect the apparatus path DP5 6〇+6 times, and obtain the total interruption. The number of inspections was 190 times. According to the above principle, when the next device path Dp# is assigned, the third cultivating pin assigned to the least number of uranium interruption inspections (1 〇〇) can be selected, and the third interrupt pin is calculated. The number of interrupt checks, and after the device path DP4 is allocated, the total number of interrupt checks for each interrupt pin is as follows: ' Checkcount [ 1 ]=5 00

Checkcount[2]=l 30Checkcount[2]=l 30

Checkcount[3]=l 00+50*2=200Checkcount[3]=l 00+50*2=200

Checkcount[4]= 70+60*2=190 以此類推,將剩下的裝置路徑陸續分配到中斷檢查次 數最少的中斷接腳上,其中一個中斷接腳上可以串接2個 或2個以上的裝置路徑,並不限定其範圍。最後,可得到 各個中斷接腳之總中斷檢查次數如下·· 14 23276twf.doc/n 200839522Checkcount[4]= 70+60*2=190 and so on, the remaining device paths are successively assigned to the interrupt pins with the least number of interrupt checks, and one or more interrupt pins can be connected in series with 2 or more. The device path does not limit its scope. Finally, the total number of interrupt checks for each interrupt pin is as follows. 14 23276twf.doc/n 200839522

XX JLyyj / uw 1 \J TWXX JLyyj / uw 1 \J TW

Checkcount [ 1 ]=500 Checkcount[2]=l 30+40*2=210 Checkcount[3]=l 00+50*2+10*3=230 Checkcount[4]= 70+60*2+30*3=280 最終的分配結果及各個中斷接腳的中斷檢查次數係繪 示於圖6。请參照圖6 ’原本由各個裝置路徑所發出的總中 斷次數為 500+130+100+70+60+50+40+30+10=990 次,在 經由本實施例之動態分配中斷接腳的方法分配後,僅需 500+210+230+280=1220次的中斷檢查次數就能夠由驅^ 程式檢查出中斷是否是由本身的硬體裝置所發出。據此, 即可達到中斷接腳分配的最佳化。 系;Γ、上所述,本發明之動態分配中斷接腳的方法至少呈 有下列優點:Checkcount [ 1 ]=500 Checkcount[2]=l 30+40*2=210 Checkcount[3]=l 00+50*2+10*3=230 Checkcount[4]= 70+60*2+30*3 =280 The final allocation result and the number of interrupt checks for each interrupt pin are shown in Figure 6. Please refer to FIG. 6 'the total number of interruptions originally issued by each device path is 500+130+100+70+60+50+40+30+10=990 times, in the dynamic allocation interrupt pin via the present embodiment. After the method is allocated, only 500+210+230+280=1220 times of interrupt check times can be used to check whether the interrupt is issued by its own hardware device. According to this, the optimization of the interrupt pin assignment can be achieved. According to the above description, the method for dynamically allocating interrupt pins of the present invention has at least the following advantages:

1·依據每縣置雜上可能產生之巾斷次數,將這些 裝置路好均純給帽接腳,而能夠有效減少在有 發生時,找出是由哪-個驅動程式發出所需的中斷檢查次 2·將分配至同 畊接腳的裝置路徑排序,並用以 =驅動程式,因此㈣減少在單—辦斷接腳上找轉 出中所之驅動程式所需的中斷檢查次數。 、x 雖然本發明已以較佳實施例揭露如上,铁 限定本發明,任何熟習此技藝者,在不脫縣發明 和靶圍内’當可作些許之更動與潤飾,因此 :、= 範圍當視後附之申請專利範圍所界定者為準。x 呆& 15 200839522 iruKj/\jvLv£W 23276twf.doc/n 【圖式簡單說明】 圖ί所繪示為習知PIC/IOAPIC主機板之硬體配置。 圖2所繪示為習知令斷接腳的佈線配置表。 圖 ‘分配中斷 圖3是依照本發明之一實施例所繪示的動 接腳的方法流程圖。 圖4疋依照本發明之一實施例所繪示的中斷發生記錄 表。 a1. According to the number of possible breaks in each county, the devices are all purely pure to the cap pins, which can effectively reduce the number of interrupts that are generated by which driver is generated when it occurs. Check the second time. Sort the device paths assigned to the same ploughing pin and use them for the driver. Therefore, (4) reduce the number of interrupt checks required to find the driver in the single-disconnect pin. x Although the present invention has been disclosed in the preferred embodiments as above, the iron defines the present invention, and any person skilled in the art can make some changes and refinements in the invention and the target area, so: This is subject to the definition of the scope of the patent application. x 呆& 15 200839522 iruKj/\jvLv£W 23276twf.doc/n [Simplified Schematic] Figure ί shows the hardware configuration of the conventional PIC/IOAPIC motherboard. FIG. 2 is a diagram showing a wiring configuration table of a conventional disconnecting leg. Figure ‘Assignment Interruption Figure 3 is a flow chart of a method of a splicing pin in accordance with an embodiment of the present invention. Figure 4 is a diagram showing an interrupt occurrence record in accordance with an embodiment of the present invention. a

o 圖5疋依照本發明之一實施例所缘示的排序後的中斷 發生記錄表。 圖6疋依照本發明之一實施例所緣示的中斷接腳的分 配結果。 【主要元件符號說明】 110 :中央處理單元 120 :北橋晶片 130 :南橋晶片 140、150、160、170 : PCI 插槽 S310〜S360 :本發明較佳實施例的動態分配中斷接腳 的方法之各步驟 16o Figure 5 is a list of sorted interrupt occurrence records in accordance with an embodiment of the present invention. Figure 6 is a diagram showing the results of the assignment of interrupt pins in accordance with an embodiment of the present invention. [Main component symbol description] 110: central processing unit 120: north bridge wafer 130: south bridge wafer 140, 150, 160, 170: PCI slots S310 to S360: each of the methods for dynamically allocating interrupt pins in accordance with a preferred embodiment of the present invention Step 16

Claims (1)

200839522TW 23276twf.doc/n十、申請專利範圍: 動態分配中斷接腳的方法,適於分配 片的多個中斷接腳,該方法包括下列步驟: .[測-早位時間内在多個裝置路徑上發生之—中 控制 晶 數 斷次 根據各該絲i路徑上發生之财斷次數 置路徑進行排序;以及 Γ 由排序在前的該裝置路徑開始,依序將該些裝置路徑 刀,些中斷接腳上,以使各該些中斷接腳上每產生一 中斷% ’檢查發出該中斷之該裝置路徑所需之 次數為最低。 ^ -、2·如申請專利範圍第1項所述之動態分配中斷接腳的 方去,其中將該些裝置路徑分配至該些中斷接腳的步驟包 o ’對該些裝 括 依據各該些裝置路徑之該中斷次數,計算各該些中斷 接腳上每產生該中斷時,檢查發出該中斷之該裝置路徑所 舄之該中斷檢查次數; 在分配下一個裝置路徑時,先將該裝置路徑加入各該 些中斷接腳,並分別計算加入該裝置路徑後,各該些中斷 接腳上每產生該中斷時,檢查發出該中斷之該裝置路徑所 需之該中斷檢查次數;以及 選擇將該裝置路徑分配至該中斷檢查次數最少之該中 斷接腳。 17 200839522 rw 23276twf.doc/n 3. 如申請專利範圍第2項所述之動態分配中斷接腳的 方法,其中計算各該些中斷接腳上每產生該中斷時,檢查 發出該中斷之該裝置路徑所需之該中斷檢查次數的步驟包 括: 針對分配至各該些中斷接腳上的各該些裝置路徑建立 一順序,其中最新加入該些中斷接腳之該裝置路徑排序在 後;以及 依照該順序將各該些裝置路徑之該中斷次數乘上一比 重,並將計算結果相加而獲得該中斷檢查次數。 4. 如申請專利範圍第2項所述之動態分配中斷接腳的 方法,其中檢查發出該中斷之該裝置路徑所需之該中斷檢 查次數的方式是透過對應各該些裝置路徑上所配置之一硬 體裝置的一驅動程式來檢查。 5. 如申請專利範圍第4項所述之動態分配中斷接腳的 方法,其中在將該些裝置路徑分配至該些中斷接腳上的步 驟之後,更包括: 依照該順序串接各該些裝置路徑上所配置之該硬體裝 置的該驅動程式。 6. 如申請專利範圍第4項所述之動態分配中斷接腳的 方法,其中該些硬體裝置包括介面卡。 7. 如申請專利範圍第1項所述之動態分配中斷接腳的 方法,其中偵測該單位時間内在多個裝置路徑上發生之該 中斷次數的方式是透過對應各該些裝置路徑上所配置之一 硬體裝置的一驅動程式來偵測。 18 200839522TW 23276twf.doc/n 8·如申請專利範圍第1項所述之動態分配中斷接腳的 方法,其中在偵測該單位時間内在多個裝置路徑上發生之 該中斷次數的步驟之後,更包括: 記錄該些裝置路徑及其對應之該中斷次數於一記憶 體。 9·如申請專利範圍第8項所述之動態分配中斷接腳的 方法’其中該記憶體包括非揮發性隨機存取記憶體 (Non-Volatile Random Access Memory, NVRAM)。 10·如申請專利範圍第1項所述之動態分配中斷接腳 的方法,其中該些中斷接腳包括連接至一可程式化中斷控 制為(Programmable Interrupt Controller, PIC )及一輸入輸 出先進"T程式化中断控制器(I/O Advanced Programmable Interrupt Controller,IOAPIC )其中之一。 u.如申請專利範圍第1項所述之動態分配中斷接腳 的方法’其巾根據各該些裝置雜上發生之該巾斷次數, 對該些裝置路徑進行排序的方式包括由大至小排序。 12.如申請專利範㈣丨項所述之動態分配中斷接腳 的方法’其中該控制晶片包括北橋^及南橋⑼其中之 19200839522TW 23276twf.doc/n X. Patent Application Range: A method for dynamically allocating interrupt pins, suitable for allocating a plurality of interrupt pins of a slice, the method comprising the following steps: [Measurement - on multiple device paths in the early time period Occurred—the medium control crystal number is sorted according to the path of the number of financial occurrences occurring on each of the wires i path; and Γ starting from the device path that is sorted first, sequentially cutting the device paths, and some interrupts are connected The number of times required to check the path of the device that issued the interrupt is minimized on the foot so that each interrupt is generated on each of the interrupt pins. ^ -, 2 · The method of dynamically allocating interrupt pins as described in claim 1 of the patent application, wherein the steps of assigning the device paths to the interrupt pins are included in the package The number of interruptions of the device paths, the number of times the interrupt check is detected for each device path that issues the interrupt when each interrupt is generated on each of the interrupt pins; when the next device path is allocated, the device is first The path is added to each of the interrupt pins, and the number of interrupt checks required to check the path of the device that issued the interrupt is detected each time the interrupt is generated after joining the device path, respectively; The device path is assigned to the interrupt pin with the least number of interrupt checks. 17 200839522 rw 23276twf.doc/n 3. A method for dynamically allocating interrupt pins as described in claim 2, wherein the device that issues the interrupt is checked each time the interrupt is generated on each of the interrupt pins The step of the number of interrupt checks required by the path includes: establishing an order for each of the device paths allocated to each of the interrupt pins, wherein the device path that newly joins the interrupt pins is sorted backward; The sequence multiplies the number of interruptions of each of the device paths by a specific gravity, and adds the calculation results to obtain the number of interruption inspections. 4. The method of dynamically allocating interrupt pins as described in claim 2, wherein the number of interrupt checks required to check the path of the device that issued the interrupt is transmitted through a path corresponding to each of the device paths. A driver for a hardware device to check. 5. The method of dynamically allocating interrupt pins according to claim 4, wherein after the step of assigning the device paths to the interrupt pins, the method further comprises: serially connecting the plurality of the devices according to the sequence. The driver of the hardware device configured on the device path. 6. The method of dynamically allocating interrupt pins as described in claim 4, wherein the hardware devices comprise interface cards. 7. The method of dynamically allocating interrupt pins according to claim 1, wherein detecting the number of interrupts occurring on the plurality of device paths in the unit time is configured by corresponding to each of the device paths A driver of a hardware device detects it. The method for dynamically allocating interrupt pins according to claim 1, wherein after detecting the number of interruptions occurring on the plurality of device paths in the unit time, the step is further The method includes: recording the device paths and the corresponding number of interruptions in a memory. 9. The method of dynamically allocating interrupt pins as described in claim 8 wherein the memory comprises a Non-Volatile Random Access Memory (NVRAM). 10. The method of dynamically allocating interrupt pins as described in claim 1, wherein the interrupt pins comprise a Programmable Interrupt Controller (PIC) and an Input/Output Advanced " One of the T/I Advanced Programmable Interrupt Controller (IOAPIC). u. The method for dynamically allocating interrupt pins according to claim 1 of the patent application, wherein the manner in which the device paths are sorted according to the number of times the devices are interrupted, includes a large to small Sort. 12. The method of dynamically allocating interrupt pins as described in the application patent (4), wherein the control chip comprises a north bridge and a south bridge (9).
TW96111247A 2007-03-30 2007-03-30 Method for dynamically arranging interrupt pins TWI325537B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW96111247A TWI325537B (en) 2007-03-30 2007-03-30 Method for dynamically arranging interrupt pins

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW96111247A TWI325537B (en) 2007-03-30 2007-03-30 Method for dynamically arranging interrupt pins

Publications (2)

Publication Number Publication Date
TW200839522A true TW200839522A (en) 2008-10-01
TWI325537B TWI325537B (en) 2010-06-01

Family

ID=44820879

Family Applications (1)

Application Number Title Priority Date Filing Date
TW96111247A TWI325537B (en) 2007-03-30 2007-03-30 Method for dynamically arranging interrupt pins

Country Status (1)

Country Link
TW (1) TWI325537B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI687790B (en) * 2018-06-25 2020-03-11 緯創資通股份有限公司 Electronic system capable of detecting number of times for hot plugs

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI687790B (en) * 2018-06-25 2020-03-11 緯創資通股份有限公司 Electronic system capable of detecting number of times for hot plugs

Also Published As

Publication number Publication date
TWI325537B (en) 2010-06-01

Similar Documents

Publication Publication Date Title
US11301406B2 (en) Method, apparatus and system for role transfer functionality for a bus master
TWI334543B (en) Method of scheduling tasks in computer systems architectures, apparatus for implementing task scheduling, and computing system
KR100271336B1 (en) A system and method for increasing functionality on the peripheral component interconnect bus
CN107278299A (en) The functional methods, devices and systems of secondary bus are realized via reconfigurable virtual switch
US8751713B2 (en) Executing virtual functions using memory-based data in a PCI express SR-IOV and MR-IOV environment
US20070294444A1 (en) Method for discovering and partitioning PCI devices
CN1274123A (en) Peripheral component interlink slot controller of partition system with dynamic arrangement
CN1499388A (en) Event transmitting
JP2016518654A (en) Server control method and server control apparatus
JPH11353267A (en) Method and device for registering peripheral device to computer
US5764996A (en) Method and apparatus for optimizing PCI interrupt binding and associated latency in extended/bridged PCI busses
US20120260005A1 (en) Controller for direct access to a memory for the direct transfer of data between memories of several peripheral devices, method and computer program enabling the implementation of such a controller
US10063425B1 (en) Event-based in-band host registration
CN109669822A (en) The creation method and computer readable storage medium of electronic device, spare memory pool
JP2008176682A (en) Semiconductor integrated circuit and data processing system
WO2013075501A1 (en) Method and device for hot-plugging a node
WO2023121775A1 (en) System, method, apparatus and architecture for dynamically configuring device fabrics
TWI273416B (en) Method and apparatus to permit external access to internal configuration registers
TW201805830A (en) Apparatus allocating controller and apparatus allocating method
EP2913771A1 (en) Cluster license server
JP5904948B2 (en) The system that allows direct data transfer between memories of several components of the system
CN111857943A (en) Data processing method, device and equipment
TW200839522A (en) Method for dynamically arranging interrupt pins
WO2023087278A1 (en) Cloud platform permission setting method and apparatus, terminal device, and storage medium
CN105988954B (en) Area description element management method and its electronic device

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees