[Bug 256781] EC2 Nitro: TSC-low timecounter lags
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 12 Aug 2025 11:34:18 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256781 --- Comment #40 from dwmw2@infradead.org --- Apologies for not confirming sooner. Yes, this was due to a bug in the PIT implementation. The PIT counter counts down, and the interrupt was supposed to fire when it reaches zero and wraps back to its start value (often 65535). In some circumstances the timer interrupt could be delivered slightly too soon, and the guest could read a counter value which hasn't quite reached zero yet — which the guest would take to mean that a whole extra countdown has occurred in the interim! This would overestimate the amount of actual time taken, as measured by the PIT, and thus underestimate the frequency of the TSC which was being calibrated. I hereby rescind the advice to use the KVM clock. Use the TSC instead. It's much more reliable. The KVM clock has... problems: https://lore.kernel.org/all/20240522001817.619072-1-dwmw2@infradead.org/ The TSC on modern hardware has none of the issues which made the KVM clock make sense in the first place. And now the KVM clock is the buggy one. -- You are receiving this mail because: You are the assignee for the bug.