Open ehuss opened 12 years ago
BTW, I found a really interesting document that talks about timing and TSC issues: http://www.mjmwired.net/kernel/Documentation/virtual/kvm/timekeeping.txt
We probably want clock_gettime (MONOTONIC_FAST) where we can get it.
Not sure yet about Darwin, since mach_absolute_time() is returning a scaled version of TSC on my machine (i.e., I have a 2.26GHz machine and it is scaled by exactly that amount to return nanoseconds since boot).
I would like for the TSC code to stay in there as an option for those platforms that don't care about the various issues. Another fun thing might be to implement RDTSCP and keep track of TSC on each CPU?
Another thing that might be nice: integrating the SNTP code. Did that make it out?
Using TSC has a variety of problems.
We need a new API for handling high-resolution time. Preferably something that can use multiple types of time. See https://github.com/ironport/aplib/issues/2 for more detail.
Preferably, this new API would be in shrapnel to help remove the dependency with aplib.