มี hardware interrupt มาก

จาก Asterisk DIY - VoIP Opensource WiKi, สารานุกรมฟรี

Jump to: navigation, search

เราสามารถที่จะ assign irq ในระบบของเราเข้าให้ทำงานกับ CPU ใดๆก็ได้ตามต้องการ เพิ่มลดปัญหาการกวนกันระหว่าง interrupt ที่เกิดจากการ์ดสายนอกกับ asterisk process

1. ทำการ disable "irqbalance" service

chkconfig irqbalance off  ;ทำการปิดโดยถาวร
service irqbalance stop   ;ทำการ stop process 

2. ตรวจสอบ interrupt/process ที่ต้องการยัาย

more /proc/interrupt

3. ทำการย้าย irq ไปยัง CPU ที่ต้องการ

echo <เบอร์CPU> > /proc/irq/<irq_number>/smp_affinity
echo "15" > /proc/irq/7/smp_affinity

โดย เบอร์ cpu จะเป็นค่า binary คือ 
cpu 0 = 1
cpu 1 = 2
cpu 2 = 4
cpu 3 = 8
cpu 4 = 10  (hexadecimal)
cpu 5 = 20  (hexadecimal)
cpu 6 = 40 (hexadecimal)
...

เช่น assign ใน irq เบอร์ 185 ไป run ที่ CPU เบอร์ 2

echo 4 > /proc/irq/185/smp_affinity
เราสามารถให้ system automatic run command นี้ตอน boot โดยใส่ command ไปที่
/etc/rc.local
Personal tools