Kernel Clock的硬件来源是什么?

Kernel Clock的硬件来源是什么?

根据我的南桥 (ICH9M) 的文档,它有 4 个 HPET。我应该如何找到系统时钟(又称内核时钟、软件时钟)所源自的中断线?

看起来是 LOC,但是哪个进程处理它?

root@debian:/home/dzmitry# cat /proc/interrupts
       CPU0       CPU1       
0:      58199      56542   IO-APIC-edge      timer
1:        217        211   IO-APIC-edge      i8042
8:          0          1   IO-APIC-edge      rtc0
9:       3776       3843   IO-APIC-fasteoi   acpi
12:      22136      21159   IO-APIC-edge      i8042
16:        420        432   IO-APIC-fasteoi   uhci_hcd:usb1, snd_hda_intel
18:      28371      27353   IO-APIC-fasteoi   uhci_hcd:usb8, b43
19:          0          0   IO-APIC-fasteoi   uhci_hcd:usb7
20:          1          1   IO-APIC-fasteoi   ehci_hcd:usb3, uhci_hcd:usb5
21:          0          0   IO-APIC-fasteoi   uhci_hcd:usb2
23:      29676      29608   IO-APIC-fasteoi   ehci_hcd:usb4, uhci_hcd:usb6
46:      20440       5269   PCI-MSI-edge      ahci
47:         93         66   PCI-MSI-edge      snd_hda_intel
48:          2          2   PCI-MSI-edge      eth0
49:        538      11493   PCI-MSI-edge      nvidia
NMI:         81         80   Non-maskable interrupts
LOC:     147328     140053   Local timer interrupts
SPU:          0          0   Spurious interrupts
PMI:         81         80   Performance monitoring interrupts
IWI:          4          6   IRQ work interrupts
RTR:          0          0   APIC ICR read retries
RES:      32270      32387   Rescheduling interrupts
CAL:        936        914   Function call interrupts
TLB:       6434       7000   TLB shootdowns
TRM:          0          0   Thermal event interrupts
THR:          0          0   Threshold APIC interrupts
MCE:          0          0   Machine check exceptions
MCP:          2          2   Machine check polls
HYP:          0          0   Hypervisor callback interrupts
ERR:          0
MIS:          0

以下是 rt 内核上的 irq 进程:

98  FF     95 135   - [irq/23-ehci_hcd]
96  FF     85 125   - [irq/16-uhci_hcd]
94  FF     85 125   - [irq/20-ehci_hcd]
56  FF     99 139   - [irq/8-rtc0]
55  FF     80 120   - [irq/1-i8042]
54  FF     79 119   - [irq/12-i8042]
3  TS      -  19   0 [ksoftirqd/0]
36  FF     50  90   - [irq/9-acpi]
361  TS      -  39 -20 [kvm-irqfd-clean]
340  FF     50  90   - [irq/19-i801_smb]
2317  FF     50  90   - [irq/32-eth0]
2264  FF     50  90   - [irq/16-snd_hda_]
2263  FF     50  90   - [irq/31-snd_hda_]
21  TS      -  19   0 [ksoftirqd/1]
1501  FF     50  90   - [irq/33-nvidia]
120  FF     84 124   - [irq/18-uhci_hcd]
118  FF     83 123   - [irq/19-uhci_hcd]
115  FF     80 120   - [irq/23-uhci_hcd]
11569  TS      -  19   0 grep irq
113  FF     82 122   - [irq/20-uhci_hcd]
11364  FF     49  89   - [irq/18-s-b43]
11363  FF     50  90   - [irq/18-b43]
1039  TS      -  19   0 /usr/sbin/irqbalance --pid=/var/run/irqbalance.pid
101  FF     50  90   - [irq/30-0000:00:]
100  FF     81 121   - [irq/21-uhci_hcd]

答案1

我假设你的意思是内核滴答(单位为吉菲斯)。这些的来源通常是 LAPIC,即使有 HPET 可用。如果我理解正确的话,每个 CPU 都有自己的计时器。查看输出以cat /proc/timer_list查看系统上的配置(Tick Device在最后)。

/dev/hpet如果需要,您可以通过用户空间访问 HPET 。

我真的很好奇您打算用特定计时器使用的中断线信息做什么。

相关内容