[英]Set the process priority and the affinity of an irq process from C/C++
[英]linux irq affinity set cannot take effctive
當我為我的以太網設置irq時無效。 (irq從99-119起)
$ sudo cat /proc/irq/109/smp_affinity
00,00000400
$ sudo sh -c "echo 0 > /proc/irq/109/smp_affinity"
$ sudo cat /proc/irq/109/smp_affinity
00,00000400
我想將所有以太網irq設置為與cpu0綁定。 但是我不幸運設置它。 我不確定遇到什么問題。 而且我注意到affinity_hint具有以下值,無論如何我都無法設置它。
$sudo cat /proc/irq/109/affinity_hint
00,00000400
$ sudo sh -c "echo 0 > /proc/irq/109/affinity_hint"
sh: line 0: echo: write error: Input/output error
這個系統我有2個CPU和6個核心。 並啟用超線程。 共有24個CPU核心。
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 40
On-line CPU(s) list: 0-39
Thread(s) per core: 2
Core(s) per socket: 10
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 62
Model name: Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz
Stepping: 4
CPU MHz: 1201.921
BogoMIPS: 4404.51
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 25600K
NUMA node0 CPU(s): 0-9,20-29
NUMA node1 CPU(s): 10-19,30-39
請幫助建議如何解決。 謝謝!
您需要指定一個位掩碼,以提供一組可以處理中斷的CPU。 對於CPU0,掩碼值為1。
我有解決方案。 我在這里犯了一個錯誤。 對於內核0,應為echo“ 1”,對於內核1,應為echo“ 2”。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.