A bug or a feature of CONFIG_HZ on a low clock frequency FPGA
From: 赵夏
Date: Fri Nov 18 2022 - 04:32:03 EST
Hi guys,
We are running the linux kernel on a FPGA board with 20MHz clock
frequency. If we configure the CONFIG_HZ as 12, the kernel executes
perfectly. However, after configuring the CONFIG_HZ to 250 as a test,
the kernel boot stucks after printing "rcu: Hierarchical SRCU
implementation".
We added one printk sentence in the timer_interrupt function to
check the next instruction pc stored in regs. It keeps printing the pc
of the replay_soft_interrupts function.
We guess this is because the timer interrupt happens again when the
kernel is still processing the previous timer interrupt. Thus, the
kernel jmps into timer_interrupt again and again.
If we are right, are there any guidelines to configure the CONFIG_HZ
based on the hardware platform clock frequency? If we are wrong, how
do we explain the stucking case that we met?
Thanks
Xia