News for hackers. Stuff that matters.
Re:Measuring Latency in Linux (2014) by xakahnx on Thursday February 27, 2020 @08:57PM (#22439901)
Any idea why this is? I'm even more curious since you've singled out "cloud VMs" from all VMs.
Re:Measuring Latency in Linux (2014) by thedance on Thursday February 27, 2020 @09:05PM (#22439935)
My understanding is one of the reasons that the virtual time stuff in clouds doesn't work in a straightforward way is that your VM can migrate to another host, where reading TSC could give the appearance of discontinuous time, including jumping backwards in time which would be very bad. This is not a problem unless your VMs are migratory, which I guess is something I associate with GCE. And clouds seem to me to have more variety of hardware than I'd expect in my own private infrastructure, and that variety comes with a great many TSC quirks.
Re:Measuring Latency in Linux (2014) by jsolson on Thursday February 27, 2020 @09:56PM (#22440128)
Intel's VMCS includes a TSC offset field as well as TSC scaling. These allow for a stable RDTSC across migrations between hosts, modulo actual time lost to migration blackout.

(I work on virtualization in GCE)

Re:Measuring Latency in Linux (2014) by xakahnx on Friday February 28, 2020 @12:04AM (#22440645)
Cool! I looked up more info on this and ended up here, http://www.brendangregg.com/blog/2017-05-04/the-pmcs-of-ec2....

But I only skimmed this and I don't see that it mentions about migration across hosts. Only that the hypervisor is able to expose the MSRs or PMCs.

Re:Measuring Latency in Linux (2014) by BeeOnRope on Thursday February 27, 2020 @10:20PM (#22440231)
So do gettimeofday and the various clock_gettime methods [1] hit the vDSO on GCP, or do they incur a syscall, or something else?

---

[1] Not all of the clock_gettime sources hit the vDSO even on bare metal Linux on typical x86 hardware, but many of the important ones do.

Re:Measuring Latency in Linux (2014) by saagarjha on Thursday February 27, 2020 @10:58PM (#22440413)
Wouldn't preventing access to high-resolution clocks also be a mitigation for speculative side channels?