3 ms·
I was curious myself, poked around, and found some references. But I'm still woefully incapable of answering that with any confidence and don't want to risk say
by wahern 1y ago
I was curious myself, poked around, and found some references. But
I'm still woefully incapable of answering that with any confidence and don't want to risk saying anything misleading, so here's the code and some other breadcrumbs:
1. Apparently OpenBSD gave up on trying to fix desync'd TSCs. See https://github.com/openbsd/src/commit/78156938567f79506a923cf635bd525907207a76 https://github.com/openbsd/src/commit/78156938567f79506a923c...
2. Relevant OpenBSD kernel code: https://github.com/openbsd/src/blob/master/sys/arch/amd64/amd64/tsc.c#L346 https://github.com/openbsd/src/blob/master/sys/arch/amd64/am...
3. Relevant Linux kernel code: https://github.com/torvalds/linux/blob/master/arch/x86/kernel/tsc_sync.c https://github.com/torvalds/linux/blob/master/arch/x86/kerne..., https://github.com/torvalds/linux/blob/master/arch/x86/kernel/tsc.c https://github.com/torvalds/linux/blob/master/arch/x86/kerne...
4. Linux kernel doc (out-of-date?): https://www.kernel.org/doc/Documentation/virtual/kvm/timekeeping.txt https://www.kernel.org/doc/Documentation/virtual/kvm/timekee...
5. Detailed SUSE blog post with many links: https://www.suse.com/c/cpu-isolation-nohz_full-troubleshooting-tsc-clocksource-by-suse-labs-part-6/ https://www.suse.com/c/cpu-isolation-nohz_full-troubleshooti...
6. Linux patch (uncommitted?) to attempt to directly sync TSCs: https://lkml.rescloud.iu.edu/2208.1/00313.html https://lkml.rescloud.iu.edu/2208.1/00313.html