Re:The slow currentTimeMillis()
by bitcharmer on Friday August 04, 2017 @10:22AM
(#14928845)
Please check for what features like constant_tsc or nonstop_tsc are for before spreading misinformation
That thing is intel-only, or at least Linux kernel thinks so: https://github.com/torvalds/linux/blob/master/arch/x86/kerne...
And even on Intel, TSC is not reliable: https://lwn.net/Articles/388286/
AMD CPUs have supported constant_tsc and nonstop_tsc since the Phenom era too.
There have also been some multi-socket configurations where TSC will gradually become desynchronized across sockets.
That lkml thread was back in 2010, before invariant TSC was a thing.
Re:The slow currentTimeMillis()
by yjftsjthsd-h on Friday August 04, 2017 @02:11PM
(#14930641)
> intel-only
So... >99% of servers and the vast majority of desktops?
This is covered in the fine article.
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.