Skip to content
Commit c445535c authored by Ani Sinha's avatar Ani Sinha Committed by Wei Liu
Browse files

x86/hyperv: fix for unwanted manipulation of sched_clock when TSC marked unstable



Marking TSC as unstable has a side effect of marking sched_clock as
unstable when TSC is still being used as the sched_clock. This is not
desirable. Hyper-V ultimately uses a paravirtualized clock source that
provides a stable scheduler clock even on systems without TscInvariant
CPU capability. Hence, mark_tsc_unstable() call should be called _after_
scheduler clock has been changed to the paravirtualized clocksource. This
will prevent any unwanted manipulation of the sched_clock. Only TSC will
be correctly marked as unstable.

Signed-off-by: default avatarAni Sinha <ani@anisinha.ca>
Reviewed-by: default avatarMichael Kelley <mikelley@microsoft.com>
Tested-by: default avatarMichael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20210713030522.1714803-1-ani@anisinha.ca


Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
parent ba3f5839
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment