亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪(fǎng)問(wèn)板塊 發(fā)新帖
查看: 48208 | 回復(fù): 89
打印 上一主題 下一主題

關(guān)于LINUX上中斷在各個(gè)CPU之間的負(fù)載平衡問(wèn)題 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2007-06-29 11:04 |只看該作者 |倒序?yàn)g覽
關(guān)于LINUX上中斷在各個(gè)CPU之間的負(fù)載平衡問(wèn)題

看帖子
http://linux.chinaunix.net/bbs/thread-753474-1-1.html

說(shuō)4個(gè)CPU有嚴(yán)重的不平衡問(wèn)題。因?yàn)闊o(wú)條件實(shí)驗(yàn),
LZ也不在回貼。所以請(qǐng)有興趣的來(lái)參加實(shí)驗(yàn)和討論。

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2007-06-29 11:10 |只看該作者
kernel啟動(dòng)參數(shù)加上acpi_irq_balance會(huì)不會(huì)好? 我試驗(yàn)下先,默認(rèn)是不balance

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2007-06-29 11:19 |只看該作者
好。我想應(yīng)該問(wèn)題在于KERNEL而不是NAT(iptables). 所以發(fā)這里了

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2007-06-29 11:24 |只看該作者
原帖由 思一克 于 2007-6-29 11:19 發(fā)表于 3樓  
好。我想應(yīng)該問(wèn)題在于KERNEL而不是NAT(iptables). 所以發(fā)這里了


沒(méi)用。

[root@localhost 21]# cat /proc/cmdline
ro root=LABEL=/ vga=0x31B acpi_irq_balance

[root@localhost 21]# grep eth0 /proc/interrupts
21:      19341          0   IO-APIC-fasteoi   libata, eth0

eth0和libata中斷還是全送到了CPU 0, CPU 1一個(gè)也沒(méi)收到。  我機(jī)器上是Pentium D雙核CPU。



[root@localhost 21]# cat /proc/irq/21/smp_affinity
00000003
這個(gè)值是我寫(xiě)入的, 兩顆cpu的bitmap位都被置1以允許21號(hào)中斷, 但還是只送到cpu 0

論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2007-06-29 11:27 |只看該作者
你cat /proc/interrupts的結(jié)果是什么?

論壇徽章:
0
6 [報(bào)告]
發(fā)表于 2007-06-29 11:35 |只看該作者
原帖由 思一克 于 2007-6-29 11:27 發(fā)表于 5樓  
你cat /proc/interrupts的結(jié)果是什么?


[root@localhost Documentation]# cat /proc/interrupts
           CPU0       CPU1
  0:        358          0   IO-APIC-edge      timer
  1:          2          0   IO-APIC-edge      i8042
  8:       8099          0   IO-APIC-edge      rtc
  9:          0          0   IO-APIC-fasteoi   acpi
12:          4          0   IO-APIC-edge      i8042
14:         33          0   IO-APIC-edge      ide0
16:      88855          0   IO-APIC-fasteoi   HDA Intel, fglrx
17:      22918          0   IO-APIC-fasteoi   uhci_hcd:usb1, ehci_hcd:usb5
18:          0          0   IO-APIC-fasteoi   uhci_hcd:usb2
19:          0          0   IO-APIC-fasteoi   uhci_hcd:usb3, Ensoniq AudioPCI
20:          0          0   IO-APIC-fasteoi   uhci_hcd:usb4
21:      32170          0   IO-APIC-fasteoi   libata, eth0
NMI:          0          0
LOC:     234999     203989
ERR:          0
MIS:          0



貧富懸殊很?chē)?yán)重啊

論壇徽章:
0
7 [報(bào)告]
發(fā)表于 2007-06-29 11:38 |只看該作者
原帖由 思一克 于 2007-6-29 11:04 發(fā)表于 1樓  
關(guān)于LINUX上中斷在各個(gè)CPU之間的負(fù)載平衡問(wèn)題

看帖子
http://linux.chinaunix.net/bbs/thread-753474-1-1.html

說(shuō)4個(gè)CPU有嚴(yán)重的不平衡問(wèn)題。因?yàn)闊o(wú)條件實(shí)驗(yàn),
LZ也不在回貼。所以請(qǐng)有興趣的來(lái)參加實(shí)驗(yàn) ...

??我覺(jué)得是正常的啊,linux默認(rèn)是將網(wǎng)卡給一個(gè)cpu的own的啊,所以你所有的網(wǎng)卡中斷都會(huì)發(fā)給那個(gè)CPU。
要改也很容易的,只要修改APIC的RT表就行了。我不太清楚linux提供的接口函數(shù)是什么,但apic.c文件或許展現(xiàn)出一些線(xiàn)索。

論壇徽章:
0
8 [報(bào)告]
發(fā)表于 2007-06-29 11:39 |只看該作者
Documentation/IRQ-affinity.txt

SMP IRQ affinity, started by Ingo Molnar <mingo@redhat.com>


/proc/irq/IRQ#/smp_affinity specifies which target CPUs are permitted
for a given IRQ source. It's a bitmask of allowed CPUs. It's not allowed
to turn off all CPUs, and if an IRQ controller does not support IRQ
affinity then the value will not change from the default 0xffffffff.

Here is an example of restricting IRQ44 (eth1) to CPU0-3 then restricting
the IRQ to CPU4-7 (this is an 8-CPU SMP box):

[root@moon 44]# cat smp_affinity
ffffffff
[root@moon 44]# echo 0f > smp_affinity
[root@moon 44]# cat smp_affinity
0000000f
[root@moon 44]# ping -f h
PING hell (195.4.7.3): 56 data bytes
...
--- hell ping statistics ---
6029 packets transmitted, 6027 packets received, 0% packet loss
round-trip min/avg/max = 0.1/0.1/0.4 ms
[root@moon 44]# cat /proc/interrupts | grep 44:
44:          0       1785       1785       1783       1783          1
1          0   IO-APIC-level  eth1
[root@moon 44]# echo f0 > smp_affinity
[root@moon 44]# ping -f h
PING hell (195.4.7.3): 56 data bytes
..
--- hell ping statistics ---
2779 packets transmitted, 2777 packets received, 0% packet loss
round-trip min/avg/max = 0.1/0.5/585.4 ms
[root@moon 44]# cat /proc/interrupts | grep 44:
44:       1068       1785       1785       1784       1784       1069       1070       1069   IO-APIC-level  eth1
[root@moon 44]#



他說(shuō)的這種情況在我機(jī)器上完全無(wú)效, 無(wú)論如何設(shè)置smp_affinity, 還是都送到了cpu 0

論壇徽章:
0
9 [報(bào)告]
發(fā)表于 2007-06-29 11:42 |只看該作者
原帖由 zx_wing 于 2007-6-29 11:38 發(fā)表于 7樓  

只要修改APIC的RT表就行了



是ioapic的irq route table吧?  看了/proc下沒(méi)有, /sys/devices/system/下有ioapic、lapic和irqrouter目錄, 但進(jìn)去只有空目錄

猜測(cè)改寫(xiě)/proc/irq/<number>/smp_affinity文件,就是影響ioapic的RT表的──但不知為何,我機(jī)器上不好使

[ 本帖最后由 albcamus 于 2007-6-29 11:46 編輯 ]

論壇徽章:
0
10 [報(bào)告]
發(fā)表于 2007-06-29 11:49 |只看該作者
原帖由 albcamus 于 2007-6-29 11:42 發(fā)表于 9樓  



是ioapic的irq route table吧?  看了/proc下沒(méi)有, /sys/devices/system/下有ioapic、lapic和irqrouter目錄, 但進(jìn)去只有空目錄

猜測(cè)改寫(xiě)/proc/irq/<number>/smp_affinity文件,就是影響ioapic ...

是這個(gè)表。我不清楚在linux下有什么接口可以改它,但既然在/sys有,那就應(yīng)該有相應(yīng)的driver。
不太清楚linux里這部分,只能提供一點(diǎn)線(xiàn)索
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專(zhuān)區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP