From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422863AbdDURIs (ORCPT ); Fri, 21 Apr 2017 13:08:48 -0400 Received: from merlin.infradead.org ([205.233.59.134]:40866 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422840AbdDURIh (ORCPT ); Fri, 21 Apr 2017 13:08:37 -0400 Message-Id: <20170421150734.346212152@infradead.org> User-Agent: quilt/0.63-1 Date: Fri, 21 Apr 2017 16:58:05 +0200 From: Peter Zijlstra To: tglx@linutronix.de, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, ville.syrjala@linux.intel.com, daniel.lezcano@linaro.org, rafael.j.wysocki@intel.com, marta.lofstedt@intel.com, martin.peres@linux.intel.com, pasha.tatashin@oracle.com, peterz@infradead.org, daniel.vetter@ffwll.ch Subject: [PATCH 9/9] sched/clock: Print a warning recommending tsc=unstable References: <20170421145756.305735607@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline; filename=peterz-sched-clock-rubarb-10.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With our switch to stable delayed until late_initcall(), the most likely cause of hitting mark_tsc_unstable() is the watchdog. The watchdog typically only triggers when creative BIOS'es fiddle with the TSC to hide SMI latency. Since the watchdog can only detect TSC fiddling after the fact all TSC clocks (including userspace GTOD) can already have reported funny values. The only way to fully avoid this, is manually marking the TSC unstable at boot. Suggest people do this on their broken systems. Signed-off-by: Peter Zijlstra (Intel) --- kernel/sched/clock.c | 1 + 1 file changed, 1 insertion(+) --- a/kernel/sched/clock.c +++ b/kernel/sched/clock.c @@ -175,6 +175,7 @@ static void __sched_clock_work(struct wo for_each_possible_cpu(cpu) per_cpu(sched_clock_data, cpu) = *scd; + printk(KERN_WARNING "TSC found unstable after boot, most likely due to broken BIOS. Use 'tsc=unstable'.\n"); printk(KERN_INFO "sched_clock: Marking unstable (%lld, %lld)<-(%lld, %lld)\n", scd->tick_gtod, __gtod_offset, scd->tick_raw, __sched_clock_offset);