Re: [PATCH] x86/tsc: RFC: re-synchronize TSCs to boot cpu TSC
From: Thomas Gleixner
Date: Thu Dec 08 2016 - 02:59:47 EST
On Thu, 8 Dec 2016, sroland@xxxxxxxxxx wrote:
> From: Roland Scheidegger <rscheidegger_lists@xxxxxxxxxx>
> 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
which contains a solution to this problem.