3 ms·
> why the TSC isn't used Because on most modern CPUs, clock frequency is extremely unstable: Turbo Boost, SpeedStep, Cool'n'Quiet, etc. These features make TSC
by Const-me 9y ago
> why the TSC isn't used
Because on most modern CPUs, clock frequency is extremely unstable: Turbo Boost, SpeedStep, Cool'n'Quiet, etc. These features make TSC not suitable for time measures.
- bitcharmer 9y agoPlease check for what features like constant_tsc or nonstop_tsc are for before spreading misinformation
- Const-me 9y agoThat thing is intel-only, or at least Linux kernel thinks so: https://github.com/torvalds/linux/blob/master/arch/x86/kernel/tsc.c https://github.com/torvalds/linux/blob/master/arch/x86/kerne... And even on Intel, TSC is not reliable: https://lwn.net/Articles/388286/ https://lwn.net/Articles/388286/
- makomk 9y agoAMD CPUs have supported constant_tsc and nonstop_tsc since the Phenom era too.
- duskwuff 9y agoThere have also been some multi-socket configurations where TSC will gradually become desynchronized across sockets.
- yjftsjthsd-h 9y ago> intel-only So... >99% of servers and the vast majority of desktops?
- otterley 9y agoThat lkml thread was back in 2010, before invariant TSC was a thing.
- fulafel 9y agoOn modern CPUs the tsc does not count CPU cycles.
- loeg 9y agoThis is covered in the fine article.