From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754181AbdCMUMb (ORCPT ); Mon, 13 Mar 2017 16:12:31 -0400 Received: from merlin.infradead.org ([205.233.59.134]:46962 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751700AbdCMUMX (ORCPT ); Mon, 13 Mar 2017 16:12:23 -0400 Date: Mon, 13 Mar 2017 21:12:14 +0100 From: Peter Zijlstra To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, subhransu.s.prusty@intel.com, kevin.b.stanton@intel.com, akataria@vmware.com, john.stultz@linaro.org, christopher.s.hall@intel.com, Ingo Molnar Subject: Re: x86/tsc: Fix ART for TSC_KNOWN_FREQ Message-ID: <20170313201214.GD3328@twins.programming.kicks-ass.net> References: <20170313145712.GI3312@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 13, 2017 at 08:04:14PM +0100, Thomas Gleixner wrote: > On Mon, 13 Mar 2017, Peter Zijlstra wrote: > > > > > Subhransu reported that convert_art_to_tsc() isn't working for him. > > > > It turns out that because of commit: > > > > 57779dc2b3b7 ("x86, tsc: Skip refined tsc calibration on systems with reliable TSC") > > That's the wrong culprit. The problem was introduced with the ART support > patches. I fixed the changelog up. Right; thanks for untangling that history. > > Systems with TSC_KNOWN_FREQ (due to having CPUID.15h) will not run the > > refined calibration thing, and then forget to set the ART clocksource > > relation. > > > > We cannot set the ART relation prior to running the refined calibration; > > therefore duplicate the lines. > > > > XXX: should we clear this in mark_tsc_unstable() ? > > It's already handled. get_device_system_timestamp() which convert ART to > clock monotonic checks whether the timekeeper clocksource is the same as > the correlated ART clocksource, i.e. TSC. So when timekeeping switches away > from TSC get_device_system_timestamp() returns -ENODEV. Ah right. Couldn't find that in a hurry.