Re: [PATCH] Implement timekeeping for rumprun/hw (x86)

  • From: Martin Lucina <martin@xxxxxxxxxx>
  • To: rumpkernel-users@xxxxxxxxxxxxx
  • Date: Mon, 6 Jul 2015 10:37:41 +0200

On Saturday, 04.07.2015 at 11:30, Antti Kantee wrote:

However, I am concerned about the case where the host has SMP. Is
tsc always sufficiently virtualized?

To be honest, I don't know. See the references at the end of this email.
The answer is "probably, yes" but we'll have to wait and see what happens
in reality when people start using it.
Bug shakedowns are one thing, but it would be nice to see the author
extrude more confidence than "probably" for if the introduced
technique is not fundamentally broken...

Let me put it this way: The Intel manuals say:

a) Invariant TSC is the "architectural way going forward".
b) OS writers should use the TSC for timekeeping if it is invariant.
c) VMX extensions provide all the appropriate hooks for virtualizing TSC.

I'm confident that the technique I'm using is the right way to do things
today, on modern (since 2008) hardware.

I cannot make any statements about how well hypervisors actually implement
c) above, hence the "we'll have to wait and see what happens".

Other related posts: