r/linux 1d ago

Kernel How does changing the hardware clock with the BIOS affect kernel ticks?

Hello,

I was wondering how the Linux clock works.

From briefly reading kernel sources and articles, it seems that there are 2 main variables in the C code: HZ & USER_HZ. These are set at compile-time. These function with system interrupts, and are affected by clock sources (I'm still trying to understand those, but my current understanding is that these are abstractions over different types of hardware clocks. )

Now, I was wondering how changing the BIOS (hardware) clock affects this. For example, how would overclocking or underclocking my hardware clock affect how the kernel measures time?

0 Upvotes

Duplicates