How /proc/interrupts gets updated?
来源:互联网 发布:淘宝主图 500k 编辑:程序博客网 时间:2024/05/22 00:30
As you can see in the source of the kernel, it displays all possible irqs of the system. In source/fs/proc/interrupts.c we can see that /proc/interrupts
has as many lines as interrupts exist in the system. In source/kernel/irq/proc.c we can see that the counters of every interrupt gets extracted from global counters via kstat_irqs_cpu(irq, cpu)
. So the information gets updated in different counters, one for each cpu and the get summed upon reading the proc file. More info about per-cpu variables you can read here. More about interrupts in linux you can get here.(get from http://stackoverflow.com/questions/15217793/how-proc-interrupts-gets-updated)
通过该函数得到,特定CPU上irq中断触发的中断数(*kstat_irqs)
kstat_irqs是中断irq描述符中定义的percpu的指针变量,表示中断特定irq触发的次数
当在控制台中执行"cat /proc/interrupts"时,将执行lfs_linux\kernel\irq\proc.c:show_interrupts函数
root@lrc:~# cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3
29: 0 0 0 0 GIC arch_timer
30: 7294 6561 6554 6547 GIC arch_timer
56: 0 0 0 0 GIC a15-l1l2-ecc-err-irq
80: 7219 0 0 0 GIC hwqueue-8704
86: 48 0 0 0 GIC hwqueue-8710
- How /proc/interrupts gets updated?
- /proc/interrupts
- /proc/uptime和/proc/interrupts
- cat /proc/interrupts, cat /proc/stat
- /proc/interrupts /proc/stat 查看中断信息
- /proc/interrupts 和 /proc/stat 查看中断的情况
- /proc/interrupts 和 /proc/stat 查看中断的情况
- /proc/interrupts 和 /proc/stat 查看中断的情况
- 已经注册的中断为什么在proc/interrupts中不存在
- 查看中断号cat /proc/interrupts |grep sw_irq
- Linux kernel 中断之proc接口之interrupts
- 通过cat /proc/interrupts | tr -s " " 查看中断的情况
- linux中利用/proc/interrupts 和 /proc/stat 查看中断的情况
- how client gets windowmanager.txt
- updated
- How glow.mozilla.org gets its data
- Strategy for how to crawl/index frequently updated webpages?
- How can I kill defunc proc?
- BZOJ 3261 最大异或和
- Objective-C的hook方案(一): Method Swizzling
- 深入理解CSS溢出overflow
- Java容器的特点与接口中的方法
- 【项目管理和构建】——Maven下载、安装和配置(一)
- How /proc/interrupts gets updated?
- [原创]Linux系统启动过程分析
- 【矩阵+十进制快速幂】[NOI2013]矩阵游戏
- Origin
- (OK)(OK) QEMU-KVM —— HOST AND GUEST can ping each other
- 【项目管理和构建】十分钟教程,eclipse配置maven + 创建maven项目(二)
- 第十一天:制定进度计划、错题整理、进度压缩、资源平衡和资源平滑、关键路径和关键链对比
- 205. Isomorphic Strings
- 275. H-Index II