From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751741AbcLHH7o (ORCPT ); Thu, 8 Dec 2016 02:59:44 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:45322 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751455AbcLHH7n (ORCPT ); Thu, 8 Dec 2016 02:59:43 -0500 Date: Thu, 8 Dec 2016 08:56:48 +0100 (CET) From: Thomas Gleixner To: sroland@vmware.com cc: Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, Roland Scheidegger Subject: Re: [PATCH] x86/tsc: RFC: re-synchronize TSCs to boot cpu TSC In-Reply-To: <1481179042-968-1-git-send-email-sroland@vmware.com> Message-ID: References: <1481179042-968-1-git-send-email-sroland@vmware.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 8 Dec 2016, sroland@vmware.com wrote: > From: Roland Scheidegger > > Some bios (Dell T5810 here) mess up the perfectly synced TSCs on boot > and resume (probably trying to set some continuous time, but writing > TSC directly instead of TSC_ADJUST which can only result in failure). > This will cause the kernel to reject the tsc as clocksource due to > the detected time warp. > Try to fix this up by syncing the TSCs of non-boot cpus to the boot > cpu, both on boot and resume. > I've got some use case here which relies on really fast time > measurements, without TSCs things run noticeably slower (ok the > measurements probably are excessive) (and the timing information is > probably useless too without TSCs). > (This is quite a big hack, I have no idea what happens with > multi-socket systems for instance, but it near certainly won't be > right. I really don't know what I'm doing here, it is not a proper > patch but a working (for me) proof-of-concept hack I've been using > since a while although actually only with kernel 4.4 - I suppose > some proper quirk would be needed. I guess there's also some chance > SMM in general could do further damage to TSCs sometimes making this > hack fail.) Can you please try git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/timers which contains a solution to this problem. Thanks, tglx