linux_dsm_epyc7002/arch/x86/kernel/cpu
Peter Zijlstra f94c8d1169 sched/clock, x86/tsc: Rework the x86 'unstable' sched_clock() interface
Wanpeng Li reported that since the following commit:

  acb04058de ("sched/clock: Fix hotplug crash")

... KVM always runs with unstable sched-clock even though KVM's
kvm_clock _is_ stable.

The problem is that we've tied clear_sched_clock_stable() to the TSC
state, and overlooked that sched_clock() is a paravirt function.

Solve this by doing two things:

 - tie the sched_clock() stable state more clearly to the TSC stable
   state for the normal (!paravirt) case.

 - only call clear_sched_clock_stable() when we mark TSC unstable
   when we use native_sched_clock().

The first means we can actually run with stable sched_clock in more
situations then before, which is good. And since commit:

  12907fbb1a ("sched/clock, clocksource: Add optional cs::mark_unstable() method")

... this should be reliable. Since any detection of TSC fail now results
in marking the TSC unstable.

Reported-by: Wanpeng Li <kernellwp@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Fixes: acb04058de ("sched/clock: Fix hotplug crash")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-03-02 08:50:49 +01:00
..
mcheck Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-02-28 11:46:00 -08:00
microcode Merge branch 'x86/urgent' into x86/microcode, to resolve conflicts 2017-01-31 08:38:17 +01:00
mtrr
.gitignore
amd.c sched/clock, x86/tsc: Rework the x86 'unstable' sched_clock() interface 2017-03-02 08:50:49 +01:00
bugs.c x86/cpu: Merge bugs.c and bugs_64.c 2016-10-25 11:48:50 +02:00
centaur.c sched/clock, x86/tsc: Rework the x86 'unstable' sched_clock() interface 2017-03-02 08:50:49 +01:00
common.c sched/clock, x86/tsc: Rework the x86 'unstable' sched_clock() interface 2017-03-02 08:50:49 +01:00
cpu.h
cyrix.c sched/clock, x86/tsc: Rework the x86 'unstable' sched_clock() interface 2017-03-02 08:50:49 +01:00
hypervisor.c
intel_cacheinfo.c Merge branch 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-22 09:25:45 -08:00
intel_rdt_rdtgroup.c x86/intel_rdt: Implement show_options() for resctrlfs 2016-12-09 14:12:18 +01:00
intel_rdt_schemata.c x86/intel_rdt: Add schemata file 2016-10-30 19:10:16 -06:00
intel_rdt.c x86/intel_rdt: Add scheduler hook 2016-10-30 19:10:16 -06:00
intel.c sched/clock, x86/tsc: Rework the x86 'unstable' sched_clock() interface 2017-03-02 08:50:49 +01:00
Makefile Merge branch 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-22 09:25:45 -08:00
match.c
mkcapflags.sh
mshyperv.c Drivers: hv: vmbus: Move the extracting of Hypervisor version information 2017-01-20 14:48:03 +01:00
perfctr-watchdog.c
powerflags.c
proc.c
rdrand.c
scattered.c Merge branch 'x86/cpufeature' into x86/cache 2016-11-16 14:19:34 +01:00
topology.c
transmeta.c sched/clock, x86/tsc: Rework the x86 'unstable' sched_clock() interface 2017-03-02 08:50:49 +01:00
umc.c
vmware.c Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-12 15:29:06 -08:00